posthog-js 1.418.11 → 1.418.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rrweb.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputId"],o=["inputId"],a=["type"],h=Object.defineProperty,u=(t,e,r)=>((t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),l=Object.defineProperty,f=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),c=(t=>(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))(c||{});function v(t,e){return-1!==t.indexOf(e)}var d={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(t){if(m[t])return m[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in d?d[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in p?p[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return m[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(v(h=navigator.userAgent,"AppleWebKit")&&!v(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),m[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var g={};function w(t,e,r){var i,n=t+"."+String(r);if(g[n])return g[n].call(e);var s=y(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(g[n]=o,o.call(e)):e[r]}var b={};function S(t,e,r){var i=t+"."+String(r);if(b[i])return b[i].bind(e);var n=y(t)[r];return"function"!=typeof n?e[r]:(b[i]=n,n.bind(e))}var k={childNodes:t=>w("Node",t,"childNodes"),parentNode:t=>w("Node",t,"parentNode"),parentElement:t=>w("Node",t,"parentElement"),textContent:t=>w("Node",t,"textContent"),contains:(t,e)=>S("Node",t,"contains")(e),getRootNode:t=>S("Node",t,"getRootNode")(),host:t=>t&&"host"in t?w("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null,querySelector:(t,e)=>S("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>S("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}},C=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,A=0,E=6e4;function R(){x+=1}function I(){return x}function T(){return A}function O(t,e){return(e!==x||t>E)&&(A+=1,!0)}var _=0,D=0,N=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},G=t=>t&&t>0?t:null;function z(t){(_+=1)>1||(L=C(),P=[],j=0,B=G(t),D=M(),N=x)}function V(){return 0===_?F||C():(_-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=j,H.deferredCount+=j,B=null,O(L.durationMs,N)?L:F=L)}function Y(){return F}var q=32;function Z(t,e,r){var i=t.length;if(r>=q)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=Z(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=Z(h,e,r+1))}}}catch(t){}}return i}function J(t){if(0!==_){var e=Z(t,null,0);L.cssRuleCount+=e,U>0&&(L.nonDeferrableCssRuleCount+=e)}}function X(t){U+=1;try{return t()}finally{U-=1}}function K(t){_>0&&(L.stylesheetMs+=t)}function Q(t){if(0===_||null===B)return!1;var e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=B||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),Z(e,r,0)}catch(t){return 0}}(t)>B}function tt(){H.failedCount+=1}function et(t){t>0&&(H.abandonedCount+=t)}function rt(){return r({},H)}function it(){return r({},W)}function nt(){_=0,D=0,N=0,x=0,A=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function st(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}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){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var lt=0;function ft(t){var e=0===lt,r=e?M():0;lt+=1;try{var i=t.rules||t.cssRules;if(!i)return null;J(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),ht(Array.from(i,(t=>ct(t,n))).join(""))}catch(t){return null}finally{lt-=1,e&&K(M()-r)}}function ct(t,e){var r;if(dt(t)){var i;try{i=ft(t.styleSheet)||ut(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return _t(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return pt(t)&&t.selectorText.includes(":")&&(n=vt(n)),e?_t(n,e):n}function vt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function dt(t){return"styleSheet"in t}function pt(t){return"selectorText"in t}var mt=/^-?[A-Za-z_][\w-]*$/,yt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function gt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){var i;try{var n;try{n=r||ut(e)}catch(t){n=e.cssText}try{n&&(null==(i=e.styleSheet)?void 0:i.href)&&(n=_t(n,e.styleSheet.href))}catch(t){}n&&t.parts.push(n),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&dt(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e,r=t;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(pt(t)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return t.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!mt.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(e=t.constructor)?void 0:e.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?mt.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":yt.test(r.name)?"@layer "+r.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?_t(i,n):i,fixColons:"sheet"===r.kind&&pt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&pt(r)&&r.selectorText.includes(":")&&(s=vt(s)),t.parts.push(t.sheetHref?_t(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;J(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!dt(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some((t=>t.sheet===i)))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;J(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=M(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?vt(l):l}else u=ht(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{K(M()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}class wt{constructor(){f(this,"idNodeMap",new Map),f(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),st(t)){var r=k.shadowRoot(t);r&&this.removeNodeFromMap(r),"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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bt(){return new wt}function St(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&kt(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function kt(t){return t.toLowerCase()}var Ct=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 Mt(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&Ct.has(kt(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var xt="__rrweb_original__";function At(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?kt(e):null}catch(t){return null}}function Et(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var Rt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,It=/^(?:[a-z+]+:)?\/\//i,Tt=/^www\..*/i,Ot=/^(data:)([^,]*),(.*)/i;function _t(t,e){return(t||"").replace(Rt,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(It.test(h)||Tt.test(h))return"url("+u+h+u+")";if(Ot.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"}))}var Dt,Nt,Lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Ft=4096,Bt=1e5,Pt=10,jt=new Map,Ut=1,Wt=new RegExp("[^a-z0-9-_:]"),Ht=-2;function Gt(){return Ut++}var zt=/^[^ \t\n\r\u000c]+/,Vt=/^[, \t\n\r\u000c]+/,$t=new WeakMap;function Yt(t,e){return e&&""!==e.trim()?qt(t,e):e}function qt(t,e){var r=$t.get(t);if(r||(r=t.createElement("a"),$t.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Zt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?Lt:t}(t,e.maxBase64ImageLength):t}function Jt(t,e,r,i,n,s){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var a=null==(o=n.sheet)?void 0:o.href;if(a)return a}var h=Yt(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(Bt>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>Ft||t.naturalHeight>Ft)return e;var n=jt.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(jt.size>=Pt){var u=jt.keys().next().value;void 0!==u&&jt.delete(u)}return jt.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Zt(u,s)}if("image"===e)return Zt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=Yt(t,i);return"image"===e&&l.startsWith("data:")?Zt(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(Vt),e.length>r;){var s=i(zt);if(","===s.slice(-1))s=Yt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=Yt(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?_t(i,qt(t)):"object"===e&&"data"===r?Yt(t,i):i:Yt(t,i)}function Xt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Kt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Kt(k.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Kt(k.parentNode(t),e,r)}function Qt(t,e,r,i){var n;if(st(t)){if(!k.childNodes(n=t).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Kt(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function te(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var ee=new Map;function re(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function ie(t){return null==t?"":t.toLowerCase()}var ne=50,se=!1,oe=!1;function ae(){return oe}function he(){oe=!1,se=!1}function ue(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,u=void 0!==h&&h,l=e.inlineStylesheet,f=void 0===l||l,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,b=e.slimDOMOptions,S=e.dataURLOptions,C=void 0===S?{}:S,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,R=e.canvasMaskingConfigured,I=e.onSerialize,T=e.onIframeLoad,O=e.iframeLoadTimeout,D=void 0===O?5e3:O,N=e.onIframeListenerRegistered,F=e.onStylesheetLoad,B=e.stylesheetLoadTimeout,U=void 0===B?5e3:B,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,z=void 0!==G&&G,V=e.depth,Y=void 0===V?0:V,q=e.maxDepth,Z=void 0===q?ne:q,J=e.needsMask,K=e.preserveWhiteSpace,tt=void 0===K||K;if(Y>=Z)return oe=!0,se||(se=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+Z+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;J||(J=Qt(t,o,a,void 0===J)),_>0&&(L.nodeCount+=1);var et,rt=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskTextFn,l=e.maskInputFn,f=e.maskAllElementAttributes,v=void 0!==f&&f,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,b=e.keepIframeSrcFn,S=e.newlyAddedElement,C=void 0!==S&&S,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:c.Document,childNodes:[],compatMode:t.compatMode}:{type:c.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:c.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s=e.doc,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskInputFn,l=e.maskAllElementAttributes,f=void 0!==l&&l,v=e.maskAttributeFn,d=e.dataURLOptions,p=void 0===d?{}:d,m=e.inlineImages,y=e.recordCanvas,g=e.canvasMaskingConfigured,w=e.keepIframeSrcFn,b=e.newlyAddedElement,S=void 0!==b&&b,C=e.rootId,M=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),x=function(t){if(t instanceof HTMLFormElement)return"form";var e=kt(t.tagName);return Wt.test(e)?"div":e}(t),A=new Set,E={},R=t.attributes.length,I=0;R>I;I++){var T=t.attributes[I];Xt(x,T.name)||(E[T.name]=Jt(s,x,kt(T.name),T.value,t,p))}if("link"===x&&o&&!M){var O=t.sheet;if(!O){var D=function(t){return t.href}(t);D&&!(O=re(s,D))&&D.includes(".css")&&(O=re(s,window.location.origin+"/"+D.replace(window.location.href,"")))}var N=null;O&&(Q(O)?_>0&&(P.push(t),j+=1):N=ft(O)),N&&(delete E.rel,delete E.href,E._cssText=N)}if("style"===x&&t.sheet&&!(t.innerText||k.textContent(t)||"").trim().length){var L=X((()=>ft(t.sheet)));L&&(E._cssText=L)}if("input"===x||"textarea"===x||"select"===x){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=St({element:t,type:At(t),tagName:x,value:F,maskInputOptions:h,maskInputFn:u}):B&&(E.checked=B)}if("option"===x&&(t.selected&&!h.select?E.selected=!0:delete E.selected),"dialog"===x&&t.open){try{E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){E.rr_open_mode="modal",E.ph_rr_could_not_detect_modal=!0}A.add("rr_open_mode")}if("canvas"===x&&y&&!(null==g?void 0:g()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((xt in n?n[xt]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(p.type,p.quality));else if(!("__context"in t)){var U=t.toDataURL(p.type,p.quality),W=s.createElement("canvas");W.width=t.width,W.height=t.height,U!==W.toDataURL(p.type,p.quality)&&(E.rr_dataURL=U)}var H,G,z=!1;if("img"===x&&m){Dt||(Dt=s.createElement("canvas"),Nt=Dt.getContext("2d"));var V=t,Y=V.currentSrc||V.getAttribute("src")||"<unknown-src>",q=V.crossOrigin,Z=(e,r)=>z?Mt({element:t,name:e,value:r,maskAllElementAttributes:f,maskAttributeFn:v}):r,J=()=>{te(V,"load",J);try{Dt.width=V.naturalWidth,Dt.height=V.naturalHeight,Nt.drawImage(V,0,0);var t=Dt.toDataURL(p.type,p.quality);E.rr_dataURL=Z("rr_dataURL",t)}catch(t){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J));console.warn("Cannot inline img src="+Y+"! Error: "+t)}"anonymous"===V.crossOrigin&&(q?E.crossOrigin=Z("crossOrigin",q):V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J)}if("audio"===x||"video"===x){var K=E;K.rr_mediaState=t.paused?"paused":"played",A.add("rr_mediaState"),K.rr_mediaCurrentTime=t.currentTime,K.rr_mediaPlaybackRate=t.playbackRate,K.rr_mediaMuted=t.muted,K.rr_mediaLoop=t.loop,K.rr_mediaVolume=t.volume}if(S||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),M){var tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null==(r=s.defaultView)?void 0:r.getComputedStyle(t);E={class:E.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null==(i=s.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(nt+((null==(n=s.defaultView)?void 0:n.scrollY)||0))+"px"},A.add("rr_width"),A.add("rr_height"),A.add("rr_left"),A.add("rr_top"),st&&(E.rr_position=st.position||"static",A.add("rr_position"),st.transform&&"none"!==st.transform&&(E.rr_transform=st.transform,A.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(E.rr_display=st.display,A.add("rr_display")))}if("iframe"!==x||w(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src),f||v)for(var ot of Object.entries(E)){var at=ot[0],ht=ot[1];"string"!=typeof ht&&null!==ht||(E[at]=Mt({element:t,name:at,value:ht,maskAllElementAttributes:f,maskAttributeFn:v,isGenerated:A.has(at)}))}z=!0;try{customElements.get(x)&&(H=!0)}catch(t){}return{type:c.Element,tagName:x,attributes:E,childNodes:[],isSVG:(G=t,Boolean("svg"===G.tagName||G.ownerSVGElement)||void 0),needBlock:M,rootId:C,isCustom:H}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:b,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r,i=e.needsMask,n=e.maskTextFn,s=e.rootId,o=k.parentNode(t),a=o&&o.tagName,h=k.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(Q(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var f=ft(o.sheet);f&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(f)&&(h=f)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=_t(h,qt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,k.parentElement(t)):h.replace(/[\S]/g,"*")),{type:c.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:s,maskTextFn:u,rootId:M});case t.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:c.Comment,textContent:k.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,keepIframeSrcFn:H,newlyAddedElement:z});if(!rt)return console.warn(t,"not serialized"),null;et=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===c.Comment)return!0;if(t.type===c.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"===Et(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ie(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ie(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ie(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ie(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ie(t.attributes.property).match(/^(og|twitter|fb):/)||ie(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ie(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(ie(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(ie(t.attributes.name))||ie(t.attributes.property).match(/^article:/)||ie(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(ie(t.attributes.name)))return!0}}return!1}(rt,b)&&(tt||rt.type!==c.Text||rt.isStyle||rt.textContent.replace(/^\s+|\s+$/gm,"").length)?Gt():Ht;var it=Object.assign(rt,{id:et});if(i.add(t,it),et===Ht)return null;I&&I(t);var nt=!u;if(it.type===c.Element){nt=nt&&!it.needBlock,delete it.needBlock;var ht=k.shadowRoot(t);ht&&at(ht)&&(it.isShadowHost=!0)}if((it.type===c.Document||it.type===c.Element)&&nt){b.headWhitespace&&it.type===c.Element&&"head"===it.tagName&&(tt=!1);var ut={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z};if(it.type===c.Element&&"textarea"===it.tagName&&void 0!==it.attributes.value);else for(var lt of Array.from(k.childNodes(t))){var ct=ue(lt,ut);ct&&it.childNodes.push(ct)}var vt=null;if(st(t)&&(vt=k.shadowRoot(t)))for(var dt of Array.from(k.childNodes(vt))){var pt=ue(dt,ut);pt&&(at(vt)&&(pt.isShadow=!0),it.childNodes.push(pt))}}var mt=k.parentNode(t);if(mt&&ot(mt)&&at(mt)&&(it.isShadow=!0),it.type===c.Element&&"iframe"===it.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),te(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?te(t,"load",o):(a=!0,te(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),te(t,"load",o)}}return t.addEventListener("load",o),()=>{te(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&T){var r=ue(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z});r&&T(t,r)}}),D);null==N||N(t,yt)}return it.type===c.Element&&"link"===it.tagName&&"stylesheet"===it.attributes.rel&&function(e,h,u){if(!ee.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var c=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(F){var e=ue(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y,maxDepth:Z});e&&F(t,e)}})()}finally{ee.delete(e),c.abort()}}},S=setTimeout(y,u);c.signal.addEventListener("abort",(()=>clearTimeout(S)),{once:!0}),e.addEventListener("load",y,{signal:c.signal,once:!0}),ee.set(e,c)}}}(t,0,U),it}function le(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}var fe=new RegExp(/(max|min)-device-(width|height)/.source,"g"),ce={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(fe)&&(t.params=t.params.replace(fe,"$1-$2"))}}}},ve={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function de(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function pe(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var me,ye={exports:{}};function ge(){if(me)return ye.exports;me=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ye.exports=e(),ye.exports.createColors=e,ye.exports}var we,be,Se,ke,Ce,Me,xe=pe(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ae(){if(be)return we;be=1;var t=ge(),e=xe;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return we=r,r.default=r,we}function Ee(){if(ke)return Se;ke=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(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)}}return Se=h,h.default=h,Se}function Re(){if(Me)return Ce;Me=1;var t=Ee();function e(e,r){new t(r).stringify(e)}return Ce=e,e.default=e,Ce}var Ie,Te,Oe,_e,De,Ne,Le,Fe,Be,Pe,je,Ue,We,He,Ge,ze,Ve,$e,Ye,qe,Ze,Je,Xe,Ke,Qe,tr,er,rr,ir,nr,sr,or,ar,hr,ur,lr,fr,cr,vr,dr,pr,mr,yr,gr,wr,br,Sr,kr,Cr,Mr,xr,Ar,Er,Rr={};function Ir(){return Ie||(Ie=1,Rr.isClean=Symbol("isClean"),Rr.my=Symbol("my")),Rr}function Tr(){if(Oe)return Te;Oe=1;var t=Ae(),e=Ee(),r=Re(),i=Ir(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var 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(var e in void 0===t&&(t={}),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){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=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:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Te=a,a.default=a,Te}function Or(){if(De)return _e;De=1;var t=Tr();class e extends t{constructor(t){super(t),this.type="comment"}}return _e=e,e.default=e,_e}function _r(){if(Le)return Ne;Le=1;var t=Tr();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Ne=e,e.default=e,Ne}function Dr(){if(Be)return Fe;Be=1;var t,e,r,i,n=Or(),s=_r(),o=Tr(),a=Ir(),h=a.isClean,u=a.my;class l extends o{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(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"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,r){return t[e]===r||(t[e]=r,"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){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Fe=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Fe}function Nr(){if(je)return Pe;je=1;var t=Dr();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Pe=e,e.default=e,t.registerAtRule(e),Pe}function Lr(){if(We)return Ue;We=1;var t,e,i=Dr();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Ue=n,n.default=n,Ue}function Fr(){return Ge?He:(Ge=1,He={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Br(){if(Ve)return ze;Ve=1;var t=xe.existsSync,e=xe.readFileSync,r=xe.dirname,i=xe.isAbsolute,n=xe.join,s=xe.relative,o=xe.sep,a=xe.SourceMapConsumer,h=xe.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}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){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"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 a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return ze=u,u.default=u,ze}function Pr(){if(Ye)return $e;Ye=1;var t=Fr().nanoid,e=xe.isAbsolute,i=xe.resolve,n=xe.SourceMapConsumer,s=xe.SourceMapGenerator,o=xe.fileURLToPath,a=xe.pathToFileURL,h=Ae(),u=Br(),l=xe,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return $e=p,p.default=p,l&&l.registerInput&&l.registerInput(p),$e}function jr(){if(Ze)return qe;Ze=1;var t,e,r=Dr();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},qe=i,i.default=i,r.registerRoot(i),qe}function Ur(){if(Xe)return Je;Xe=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Je=t,t.default=t,Je}function Wr(){if(Qe)return Ke;Qe=1;var t=Dr(),e=Ur();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Ke=r,r.default=r,t.registerRule(r),Ke}function Hr(){if(ir)return rr;ir=1;var t=xe.dirname,e=xe.relative,r=xe.resolve,i=xe.sep,n=xe.SourceMapConsumer,s=xe.SourceMapGenerator,o=xe.pathToFileURL,a=Pr(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return rr=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}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;var 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(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Gr(){if(sr)return nr;sr=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return nr=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function zr(){if(ar)return or;ar=1;var t=Nr(),e=Or(),r=_r(),i=jr(),n=Wr(),s=Gr(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return or=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.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){var e=new n;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){var 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){var 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){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[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,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var 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})}}}function Vr(){if(ur)return hr;ur=1;var t=Dr(),e=Pr(),r=zr();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return hr=i,i.default=i,t.registerParse(i),hr}function $r(){if(fr)return lr;fr=1;var t=Dr(),e=Ir().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return lr=r,r.default=r,lr}function Yr(){if(vr)return cr;vr=1;var t=$r();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return cr=e,e.default=e,cr}function qr(){if(pr)return dr;pr=1;var t={};return dr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Zr(){if(yr)return mr;yr=1;var t=Dr(),i=Lr(),n=Hr(),s=Vr(),o=Yr(),a=jr(),h=Re(),u=Ir(),l=u.isClean,f=u.my,c=qr(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},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){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}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){var 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();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(var t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},mr=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),mr}function Jr(){if(Cr)return kr;Cr=1;var t=Nr(),e=Or(),n=Dr(),o=Ae(),a=_r(),h=Lr(),u=function(){if(er)return tr;er=1;var t=Nr(),e=Or(),n=_r(),o=Pr(),a=Br(),h=jr(),u=Wr();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:o.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(o,a,l){var f,c=r({},o);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,s);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+o.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return tr=c,c.default=c,tr}(),l=Pr(),f=Zr(),c=Ur(),v=Tr(),d=Vr(),p=function(){if(Sr)return br;Sr=1;var t=Lr(),e=Zr(),r=function(){if(wr)return gr;wr=1;var t=Hr(),e=Vr(),r=Yr(),i=Re(),n=qr();class s{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;var t,r=e;try{t=r(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(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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[]}}return gr=s,s.default=s,gr}(),i=jr();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return br=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),br}(),m=Yr(),y=jr(),g=Wr(),w=Re(),b=$r();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=o,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),kr=S,S.default=S,kr}var Xr=de(function(){if(Er)return Ar;Er=1;var t=Jr().Input,e=function(){if(xr)return Mr;xr=1;var t=Or(),e=zr(),r=Gr();return Mr=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(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){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Ar=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),Kr=de(Jr()),Qr={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 ti(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=Kr([ce,ve]).process(t,{parser:Xr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function ei(){return{stylesWithHoverClass:new Map}}var ri=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ii=new Set;function ni(t,e){var r,i,n=e.doc,s=e.mirror,o=e.skipChild,a=void 0!==o&&o,h=e.hackCss,u=void 0===h||h,l=e.afterAppend,f=e.cache;if(s.has(t.id)){var v=s.getNode(t.id),d=s.getMeta(v);if(i=t,(r=d)&&i&&r.type===i.type&&(r.type===c.Document?r.compatMode===i.compatMode:r.type===c.DocumentType?r.name===i.name&&r.publicId===i.publicId&&r.systemId===i.systemId:r.type===c.Comment||r.type===c.Text||r.type===c.CDATA?r.textContent===i.textContent:r.type===c.Element&&r.tagName===i.tagName&&JSON.stringify(r.attributes)===JSON.stringify(i.attributes)&&r.isSVG===i.isSVG&&r.needBlock===i.needBlock))return s.getNode(t.id)}var p=function(t,e){var r,i=e.doc,n=e.hackCss,s=e.cache;switch(t.type){case c.Document:return i.implementation.createDocument(null,"",null);case c.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case c.Element:var o,a=function(t){var e=Qr[t.tagName]?Qr[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(ri.has(t))return!1;if(!t.includes("-"))return!1;var 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){ii.has(t.tagName)||(ii.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var f="textarea"===a&&"value"===u,v="style"===a&&"_cssText"===u;if(v&&n&&"string"==typeof l&&(l=ti(l,s)),!f&&!v||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Et(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case c.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ti(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case c.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case c.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:u,cache:f});if(!p)return null;if(t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===c.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==c.DocumentType&&n.write(t.childNodes[0].type===c.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" "">'),p=n),s.add(p,t),(t.type===c.Document||t.type===c.Element)&&!a){var m=function(){var e=ni(y,{doc:n,mirror:s,skipChild:!1,hackCss:u,afterAppend:l,cache:f});if(!e)return console.warn("Failed to rebuild",y),1;if(y.isShadow&&st(p)&&p.shadowRoot)p.shadowRoot.appendChild(e);else if(t.type===c.Document&&y.type==c.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),p.appendChild(e),r.appendChild(i)):p.appendChild(e)}else if(t.type===c.Document&&y.type===c.DocumentType){var o=p.doctype;o&&p.removeChild(o),p.firstChild&&1===p.firstChild.nodeType?p.insertBefore(e,p.firstChild):p.appendChild(e)}else p.appendChild(e);l&&l(e,y.id)};for(var y of t.childNodes)m()}return p}var si=Object.defineProperty,oi=(t,e,r)=>((t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),ai=Object.defineProperty,hi=(t,e,r)=>((t,e,r)=>e in t?ai(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function ui(t,e){return-1!==t.indexOf(e)}var li={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},ci={};function vi(t){if(ci[t])return ci[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in li?li[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in fi?fi[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return ci[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(ui(h=navigator.userAgent,"AppleWebKit")&&!ui(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),ci[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var di={};function pi(t,e,r){var i,n=t+"."+String(r);if(di[n])return di[n].call(e);var s=vi(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(di[n]=o,o.call(e)):e[r]}var mi={};function yi(t,e,r){var i=t+"."+String(r);if(mi[i])return mi[i].bind(e);var n=vi(t)[r];return"function"!=typeof n?e[r]:(mi[i]=n,n.bind(e))}var gi={childNodes:t=>pi("Node",t,"childNodes"),parentNode:t=>pi("Node",t,"parentNode"),parentElement:t=>pi("Node",t,"parentElement"),textContent:t=>pi("Node",t,"textContent"),contains:(t,e)=>yi("Node",t,"contains")(e),getRootNode:t=>yi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?pi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?pi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>yi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>yi("Element",t,"querySelectorAll")(e),mutationObserver:()=>vi("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}},wi=class{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var 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)){var r=gi.shadowRoot(t);r&&this.removeNodeFromMap(r),"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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function bi(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Si,ki={exports:{}};function Ci(){if(Si)return ki.exports;Si=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ki.exports=e(),ki.exports.createColors=e,ki.exports}var Mi,xi,Ai,Ei,Ri,Ii,Ti=bi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Oi(){if(xi)return Mi;xi=1;var t=Ci(),e=Ti;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Mi=r,r.default=r,Mi}function _i(){if(Ei)return Ai;Ei=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(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)}}return Ai=h,h.default=h,Ai}function Di(){if(Ii)return Ri;Ii=1;var t=_i();function e(e,r){new t(r).stringify(e)}return Ri=e,e.default=e,Ri}var Ni,Li,Fi,Bi,Pi,ji,Ui,Wi,Hi,Gi,zi,Vi,$i,Yi,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn,on,an,hn,un,ln,fn,cn,vn,dn,pn,mn,yn,gn,wn,bn,Sn,kn,Cn,Mn,xn,An,En,Rn,In,Tn,On,_n,Dn,Nn={};function Ln(){return Ni||(Ni=1,Nn.isClean=Symbol("isClean"),Nn.my=Symbol("my")),Nn}function Fn(){if(Fi)return Li;Fi=1;var t=Oi(),e=_i(),r=Di(),i=Ln(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var 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(var e in void 0===t&&(t={}),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){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=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:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Li=a,a.default=a,Li}function Bn(){if(Pi)return Bi;Pi=1;var t=Fn();class e extends t{constructor(t){super(t),this.type="comment"}}return Bi=e,e.default=e,Bi}function Pn(){if(Ui)return ji;Ui=1;var t=Fn();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return ji=e,e.default=e,ji}function jn(){if(Hi)return Wi;Hi=1;var t,e,r,i,n=Bn(),s=Pn(),o=Fn(),a=Ln(),h=a.isClean,u=a.my;class l extends o{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(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"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,r){return t[e]===r||(t[e]=r,"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){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Wi=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Wi}function Un(){if(zi)return Gi;zi=1;var t=jn();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Gi=e,e.default=e,t.registerAtRule(e),Gi}function Wn(){if($i)return Vi;$i=1;var t,e,i=jn();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Vi=n,n.default=n,Vi}function Hn(){return qi?Yi:(qi=1,Yi={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Gn(){if(Ji)return Zi;Ji=1;var t=Ti.existsSync,e=Ti.readFileSync,r=Ti.dirname,i=Ti.isAbsolute,n=Ti.join,s=Ti.relative,o=Ti.sep,a=Ti.SourceMapConsumer,h=Ti.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}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){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"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 a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Zi=u,u.default=u,Zi}function zn(){if(Ki)return Xi;Ki=1;var t=Hn().nanoid,e=Ti.isAbsolute,i=Ti.resolve,n=Ti.SourceMapConsumer,s=Ti.SourceMapGenerator,o=Ti.fileURLToPath,a=Ti.pathToFileURL,h=Oi(),u=Gn(),l=Ti,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Xi=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Xi}function Vn(){if(tn)return Qi;tn=1;var t,e,r=jn();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Qi=i,i.default=i,r.registerRoot(i),Qi}function $n(){if(rn)return en;rn=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return en=t,t.default=t,en}function Yn(){if(sn)return nn;sn=1;var t=jn(),e=$n();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return nn=r,r.default=r,t.registerRule(r),nn}function qn(){if(un)return hn;un=1;var t=Ti.dirname,e=Ti.relative,r=Ti.resolve,i=Ti.sep,n=Ti.SourceMapConsumer,s=Ti.SourceMapGenerator,o=Ti.pathToFileURL,a=zn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return hn=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}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;var 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(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Zn(){if(fn)return ln;fn=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return ln=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Jn(){if(vn)return cn;vn=1;var t=Un(),e=Bn(),r=Pn(),i=Vn(),n=Yn(),s=Zn(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return cn=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.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){var e=new n;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){var 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){var 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){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[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,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var 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})}}}function Xn(){if(pn)return dn;pn=1;var t=jn(),e=zn(),r=Jn();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return dn=i,i.default=i,t.registerParse(i),dn}function Kn(){if(yn)return mn;yn=1;var t=jn(),e=Ln().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return mn=r,r.default=r,mn}function Qn(){if(wn)return gn;wn=1;var t=Kn();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return gn=e,e.default=e,gn}function ts(){if(Sn)return bn;Sn=1;var t={};return bn=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function es(){if(Cn)return kn;Cn=1;var t=jn(),i=Wn(),n=qn(),s=Xn(),o=Qn(),a=Vn(),h=Di(),u=Ln(),l=u.isClean,f=u.my,c=ts(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},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){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}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){var 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();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(var t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},kn=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),kn}function rs(){if(In)return Rn;In=1;var t=Un(),e=Bn(),n=jn(),s=Oi(),a=Pn(),h=Wn(),u=function(){if(an)return on;an=1;var t=Un(),e=Bn(),n=Pn(),s=zn(),a=Gn(),h=Vn(),u=Yn();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:s.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(s,a,l){var f,c=r({},s);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,o);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+s.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return on=c,c.default=c,on}(),l=zn(),f=es(),c=$n(),v=Fn(),d=Xn(),p=function(){if(En)return An;En=1;var t=Wn(),e=es(),r=function(){if(xn)return Mn;xn=1;var t=qn(),e=Xn(),r=Qn(),i=Di(),n=ts();class s{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;var t,r=e;try{t=r(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(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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[]}}return Mn=s,s.default=s,Mn}(),i=Vn();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return An=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),An}(),m=Qn(),y=Vn(),g=Yn(),w=Di(),b=Kn();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=s,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),Rn=S,S.default=S,Rn}!function(){if(Dn)return _n;Dn=1;var t=rs().Input,e=function(){if(On)return Tn;On=1;var t=Bn(),e=Jn(),r=Zn();return Tn=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(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){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();_n=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),rs();var is=(t=>(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))(is||{});function ns(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=us(r);e.push(n+": "+i+";")}}return e.join(" ")}var ss=/-([a-z])/g,os=/^--[a-zA-Z0-9-]+$/,as=t=>os.test(t)?t:t.replace(ss,((t,e)=>e?e.toUpperCase():"")),hs=/\B([A-Z])/g,us=t=>t.replace(hs,"-$1").toLowerCase();class ls{constructor(){oi(this,"parentElement",null),oi(this,"parentNode",null),oi(this,"ownerDocument"),oi(this,"firstChild",null),oi(this,"lastChild",null),oi(this,"previousSibling",null),oi(this,"nextSibling",null),oi(this,"ELEMENT_NODE",1),oi(this,"TEXT_NODE",3),oi(this,"nodeType"),oi(this,"nodeName"),oi(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof ls))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,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"}}class fs extends ls{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),oi(this,"nodeType",9),oi(this,"nodeName","#document"),oi(this,"compatMode","CSS1Compat"),oi(this,"RRNodeType",is.Document),oi(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===is.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===is.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===is.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===is.Element||e===is.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===is.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=bs(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===is.Element||r===is.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===is.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Ss(this,t,e);return i.parentElement=null,i}removeChild(t){return ks(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var 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){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new fs}createDocumentType(t,e,r){var i=new cs(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new vs(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ms(t);return e.ownerDocument=this,e}createComment(t){var e=new ys(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new gs(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class cs extends ls{constructor(t,e,r){super(),oi(this,"nodeType",10),oi(this,"RRNodeType",is.DocumentType),oi(this,"name"),oi(this,"publicId"),oi(this,"systemId"),oi(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class vs extends ls{constructor(t){super(),oi(this,"nodeType",1),oi(this,"RRNodeType",is.Element),oi(this,"tagName"),oi(this,"attributes",{}),oi(this,"shadowRoot",null),oi(this,"scrollLeft"),oi(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var 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 ws(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[as(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=as(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=ns(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=as(t),n=r[e]||"";return delete r[e],this.attributes.style=ns(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return bs(this,t)}insertBefore(t,e){return Ss(this,t,e)}removeChild(t){return ks(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class ds extends vs{constructor(){super(...arguments),oi(this,"currentTime"),oi(this,"volume"),oi(this,"paused"),oi(this,"muted"),oi(this,"playbackRate"),oi(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class ps extends vs{constructor(){super(...arguments),oi(this,"tagName","DIALOG"),oi(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")}}class ms extends ls{constructor(t){super(),oi(this,"nodeType",3),oi(this,"nodeName","#text"),oi(this,"RRNodeType",is.Text),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class ys extends ls{constructor(t){super(),oi(this,"nodeType",8),oi(this,"nodeName","#comment"),oi(this,"RRNodeType",is.Comment),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class gs extends ls{constructor(t){super(),oi(this,"nodeName","#cdata-section"),oi(this,"nodeType",4),oi(this,"RRNodeType",is.CDATA),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class ws{constructor(t,e){var r=this;if(oi(this,"onChange"),oi(this,"classes",[]),oi(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),oi(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function bs(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 Ss(t,e,r){if(!r)return bs(t,e);if(r.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===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function ks(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 Cs=(t=>(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))(Cs||{}),Ms={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},xs={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"},As=null;function Es(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!As&&(As=new WeakSet,setTimeout((()=>{As=null}),0)),!Ts(t,e)){var s=Is(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case is.Document:if(!Os(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==As||As.add(t))}break;case is.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;Es(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Rs(a.shadowRoot,h.shadowRoot,r,i)),function(t,e,r){var i=t.attributes,n=e.attributes,s=function(){var i=n[o],s=r.getMeta(e);if((null==s?void 0:s.isSVG)&&Ms[o])t.setAttributeNS(Ms[o],o,i);else if("CANVAS"===e.tagName&&"rr_dataURL"===o){var a=document.createElement("img");a.src=i,a.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(a,0,0,a.width,a.height)}}else{if("IFRAME"===e.tagName&&"srcdoc"===o)return 1;try{t.getAttribute(o)!==i&&t.setAttribute(o,i)}catch(t){console.warn(t)}}};for(var o in n)s();for(var a of Array.from(i)){var h=a.name;h in n||t.removeAttribute(h)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),Rs(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case is.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case is.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;if(null!==u.rr_dataURL){var l=document.createElement("img");l.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(l,0,0,l.width,l.height)},l.src=u.rr_dataURL}u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var f=s.sheet;f&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,f)));break;case"DIALOG":var c=s,v=o,d=c.open,p=c.matches("dialog:modal"),m=v.open,y=v.isModal,g=p!==y,w=d!==m;if((g||d&&w)&&c.close(),m&&(w||g))try{y?c.showModal():c.show()}catch(t){console.warn(t)}}break;case is.Text:case is.Comment:case is.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==As?void 0:As.has(t))&&(As.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function Rs(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Os(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Os(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Os(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Os(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Os(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Is(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Is(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)Es(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Is(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Ts(o,t))return o;switch(t.RRNodeType){case is.Document:o=new Document;break;case is.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case is.Element:var a=t.tagName.toLowerCase();a=xs[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Ms.svg,a):document.createElement(t.tagName);break;case is.Text:o=document.createTextNode(t.data);break;case is.Comment:o=document.createComment(t.data);break;case is.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==As||As.add(o)}catch(t){}return o}function Ts(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Os(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Ts(t,e)}class _s extends fs{constructor(t){super(),oi(this,"UNSERIALIZED_STARTING_ID",-2),oi(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),oi(this,"mirror",new zs),oi(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.u--}createDocument(t,e,r){return new _s}createDocumentType(t,e,r){var i=new Ds(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Ls(r);break;case"IFRAME":e=new js(r,this.mirror);break;case"CANVAS":e=new Bs(r);break;case"STYLE":e=new Ps(r);break;case"DIALOG":e=new Fs(r);break;default:e=new Ns(r)}return e.ownerDocument=this,e}createComment(t){var e=new Ws(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Hs(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Us(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}}var Ds=cs;class Ns extends vs{constructor(){super(...arguments),oi(this,"inputData",null),oi(this,"scrollData",null)}}class Ls extends ds{}class Fs extends ps{}class Bs extends Ns{constructor(){super(...arguments),oi(this,"rr_dataURL",null),oi(this,"canvasMutations",[])}getContext(){return null}}class Ps extends Ns{constructor(){super(...arguments),oi(this,"rules",[])}}class js extends Ns{constructor(t,e){super(t),oi(this,"contentDocument",new _s),this.contentDocument.mirror=e}}var Us=ms,Ws=ys,Hs=gs;function Gs(t,e,i,n){var s,o;switch(t.nodeType){case Cs.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case Cs.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case Cs.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case Cs.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case Cs.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case Cs.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case Cs.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var f=i.getMeta(t);return e instanceof _s&&(f||(f=Vs(s,e.unserializedId),i.add(t,f)),e.mirror.add(s,r({},f))),s}class zs{constructor(){oi(this,"idNodeMap",new Map),oi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var 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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Vs(t,e){switch(t.RRNodeType){case is.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case is.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case is.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case is.Text:case is.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case is.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function $s(t,e){return-1!==t.indexOf(e)}var Ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},qs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Zs={};function Js(t){if(Zs[t])return Zs[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Ys?Ys[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in qs?qs[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Zs[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?($s(h=navigator.userAgent,"AppleWebKit")&&!$s(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Zs[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Xs={};function Ks(t,e,r){var i,n=t+"."+String(r);if(Xs[n])return Xs[n].call(e);var s=Js(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Xs[n]=o,o.call(e)):e[r]}var Qs={};function to(t,e,r){var i=t+"."+String(r);if(Qs[i])return Qs[i].bind(e);var n=Js(t)[r];return"function"!=typeof n?e[r]:(Qs[i]=n,n.bind(e))}function eo(){return Js("MutationObserver").constructor}function ro(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}var io={childNodes:t=>Ks("Node",t,"childNodes"),parentNode:t=>Ks("Node",t,"parentNode"),parentElement:t=>Ks("Node",t,"parentElement"),textContent:t=>Ks("Node",t,"textContent"),contains:(t,e)=>to("Node",t,"contains")(e),getRootNode:t=>to("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Ks("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Ks("Element",t,"shadowRoot"):null,querySelector:(t,e)=>to("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>to("Element",t,"querySelectorAll")(e),mutationObserver:eo,patch:ro};function no(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>so(r,t,e,i)}function so(t,e,r,i){oo((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function oo(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var ao="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.",ho={map:{},getId(){return console.error(ao),-1},getNode(){return console.error(ao),null},removeNodeFromMap(){console.error(ao)},has(){return console.error(ao),!1},reset(){console.error(ao)}};function uo(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function lo(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout((()=>{try{r.set.call(this,t)}catch(t){}}),0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>lo(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ho=new Proxy(ho,{get(t,e,r){return"map"===e&&console.error(ao),Reflect.get(t,e,r)}}));var fo=Date.now;function co(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=io.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=io.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function vo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function po(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mo(t){return t?t.nodeType===t.ELEMENT_NODE?t:io.parentElement(t):null}function yo(t,e,r,i){if(!t)return!1;var n=mo(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Kt(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function go(t,e){return-1!==e.getId(t)}function wo(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Ht}function bo(t,e){if(ot(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=io.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||bo(i,e))}function So(t){return Boolean(t.changedTouches)}function ko(t){void 0===t&&(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 Co(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Mo(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Mo(t.children[r],e)}function xo(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Ao(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Eo(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Eo(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Ro(t){return!!t&&(t instanceof ls&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(io.shadowRoot(t)))}function Io(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Io(r.cssRules,e.slice(1)):null}function To(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Oo(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(fo=()=>(new Date).getTime());class _o{constructor(){u(this,"id",1),u(this,"styleIDMap",new WeakMap),u(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){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}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 Do(t){var e,r=null;return"getRootNode"in t&&(null==(e=io.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&io.host(io.getRootNode(t))&&(r=io.host(io.getRootNode(t))),r}function No(t){for(var e,r=t;e=Do(r);)r=e;return r}function Lo(t){var e=t.ownerDocument;if(!e)return!1;var r=No(t);return io.contains(e,r)}function Fo(t){var e=t.ownerDocument;return!!e&&(io.contains(e,t)||Lo(t))}var Bo=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:_o,get _mirror(){return ho},callSafely:oo,closestElementOfNode:mo,getBaseDimension:Eo,getNestedRule:Io,getPositionsAndIndex:To,getRootShadowHost:No,getShadowHost:Do,getWindowHeight:vo,getWindowScroll:co,getWindowWidth:po,hasShadowRoot:Ro,hookSetter:lo,inDom:Fo,isAncestorRemoved:bo,isBlocked:yo,isIgnored:wo,isSerialized:go,isSerializedIframe:xo,isSerializedStylesheet:Ao,iterateResolveTree:Mo,legacy_isTouchEvent:So,get nowTimestamp(){return fo},on:no,polyfill:ko,queueToResolveTrees:Co,removeEventListenerSafely:so,shadowHostInDom:Lo,throttle:uo,uniqueTextMutations:Oo},Symbol.toStringTag,{value:"Module"})),Po=(t=>(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))(Po||{}),jo="rrweb/fullscreen",Uo=(t=>(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))(Uo||{}),Wo=(t=>(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))(Wo||{}),Ho=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ho||{}),Go=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Go||{}),zo=(t=>(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))(zo||{}),Vo=(t=>(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))(Vo||{}),$o=(t=>(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))($o||{});function Yo(t){return"__ln"in t}class qo{constructor(){u(this,"length",0),u(this,"head",null),u(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Yo(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Yo(t.nextSibling)&&t.nextSibling.__ln.previous){var 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){var 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--)}}var Zo,Jo=(t,e)=>t+"@"+e;class Xo{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",new WeakMap),u(this,"generatedAttributes",new WeakMap),u(this,"removes",[]),u(this,"mapRemoves",[]),u(this,"movedMap",{}),u(this,"addedSet",new Set),u(this,"movedSet",new Set),u(this,"droppedSet",new Set),u(this,"removesSubTreeCache",new Set),u(this,"mutationCb"),u(this,"blockClass"),u(this,"blockSelector"),u(this,"maskTextClass"),u(this,"maskTextSelector"),u(this,"inlineStylesheet"),u(this,"maskInputOptions"),u(this,"maskTextFn"),u(this,"maskInputFn"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"keepIframeSrcFn"),u(this,"recordCanvas"),u(this,"canvasMaskingConfigured"),u(this,"inlineImages"),u(this,"slimDOMOptions"),u(this,"dataURLOptions"),u(this,"doc"),u(this,"mirror"),u(this,"iframeManager"),u(this,"stylesheetManager"),u(this,"shadowDomManager"),u(this,"canvasManager"),u(this,"processedNodeManager"),u(this,"unattachedDoc"),u(this,"canvasManagerReleased",!1),u(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),u(this,"emit",(()=>{if(!this.frozen&&!this.locked){var t,e,r=M(),i=I();try{this.processBufferedMutations()}finally{t=M()-r,e=i,_>0||O(t,null!=e?e:x)||t>W.slowestBatchMs&&(W.slowestBatchMs=t)}}})),u(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new qo,i=t=>{for(var e=t,r=Ht;r===Ht;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=io.parentNode(n);if(s&&Fo(n)&&"TEXTAREA"!==s.tagName){var o=ot(s)?this.mirror.getId(Do(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ue(n,{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=>{xo(t,this.mirror)&&this.iframeManager.addIframe(t),Ao(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Ro(n)&&this.shadowDomManager.addShadowRoot(io.shadowRoot(n),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)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Qo(this.removesSubTreeCache,s)&&!this.movedSet.has(io.parentNode(s))||n(s);for(var o of this.addedSet)ta(this.droppedSet,o)||Qo(this.removesSubTreeCache,o)?ta(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(io.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var f=r.tail;f;){var c=f;if(f=f.previous,c){var v=this.mirror.getId(io.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==v){h=c;break}var d=io.parentNode(c.value);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=io.host(d);if(-1!==this.mirror.getId(p)){h=c;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=io.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var e,r=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var s of Object.entries(r)){var o=s[0],a=s[1];"string"!=typeof a&&null!==a||(r[o]=Mt({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(e=this.generatedAttributes.get(t.node))?void 0:e.has(o)}))}return{id:this.mirror.getId(t.node),attributes:r}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(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={},this.mutationCb(m))})),u(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),u(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(io.childNodes(t),(t=>io.textContent(t)||"")).join("");e.attributes.value=St({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:At(t),value:r,maskInputFn:this.maskInputFn})})),u(this,"processMutation",(t=>{var e;if(!wo(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var r=io.textContent(t.target);yo(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue||this.texts.push({value:Qt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,mo(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":var i,n=t.target,s=t.attributeName,o=null!==(i=t.attributeNamespace)&&void 0!==i?i:null,a=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(n,s,o),h=o?n.getAttributeNS(o,s):t.target.getAttribute(s);if("value"===a){var u=n,l=At(u);h=St({element:u,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:l,value:h,maskInputFn:this.maskInputFn})}if(yo(t.target,this.blockClass,this.blockSelector,!1)||h===t.oldValue)return;var f=this.attributeMap.get(t.target),c="IFRAME"===n.tagName&&"src"===a;if(c&&!this.keepIframeSrcFn(h)&&n.contentDocument)return;if(f||(this.attributes.push(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,f)),"type"===a&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Xt(n.tagName,a)){var v=Jt(this.doc,kt(n.tagName),kt(a),h,n,this.dataURLOptions);if(c&&!this.keepIframeSrcFn(h)&&(a="rr_src"),f.attributes[a]=v,null==(e=this.generatedAttributes.get(t.target))||e.delete(a),"style"===a){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=n.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?f.styleDiff[m]=""===g?y:[y,g]:f._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(f.styleDiff[w]=!1)}else if("open"===a&&"DIALOG"===n.tagName){f.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(yo(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=>{var r=this.mirror.getId(e),i=ot(t.target)?this.mirror.getId(io.host(t.target)):this.mirror.getId(t.target);yo(t.target,this.blockClass,this.blockSelector,!1)||wo(e,this.mirror,this.slimDOMOptions)||!go(e,this.mirror)||(this.addedSet.has(e)?(Ko(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||bo(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Jo(r,i)]?Ko(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ot(t.target)||!at(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),io.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),u(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(wo(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[Jo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);yo(t,this.blockClass,this.blockSelector,!1)||(io.childNodes(t).forEach((t=>this.genAdds(t))),Ro(t)&&io.childNodes(io.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Ko(t,e){t.delete(e),io.childNodes(e).forEach((e=>Ko(t,e)))}function Qo(t,e,r){return 0!==t.size&&function(t,e,r){var i=io.parentNode(e);return!!i&&t.has(i)}(t,e)}function ta(t,e){return 0!==t.size&&ea(t,e)}function ea(t,e){var r=io.parentNode(e);return!!r&&(!!t.has(r)||ea(t,r))}var ra=function(t,e){return void 0===e&&(e="rrweb"),Zo?function(){try{return t(...arguments)}catch(t){if(Zo&&!0===Zo(t,e))return;throw t}}:t},ia=[];function na(t){try{if("composedPath"in t){var 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 sa(t,e){var r,i=new Xo;i.init(t);try{r=new(eo())(ra(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),ia.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function oa(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=na(t);if(o&&!yo(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=co(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[no("scroll",ra(uo(ra((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(no("scrollend",ra(h),r)),()=>u.forEach((t=>t()))}function aa(t,e){for(var r=ia.length-1;r>=0;r--){var i=ia[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),ia.splice(r,1))}}}var ha=["INPUT","TEXTAREA","SELECT"],ua=new WeakMap;function la(t){return function t(e,r){if(da("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||da("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||da("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||da("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function fa(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function ca(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:io.host(e));var a="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,h=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&h?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var t;return null==(t=h.get)?void 0:t.call(this)},set(t){var e,r;try{r=null==(e=h.set)?void 0:e.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),ra((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function va(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var o,a,h,u,l,f,c,v,d,p,m,y,g=[],w=ra((()=>{if(n){n.destroy(),n.reset();var e=ia.indexOf(n);-1!==e&&ia.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),g.forEach((t=>t()))}));try{if(t.recordDOM){var b=sa(t,t.doc);i=b.observer,n=b.buffer}for(var S of(g.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=uo(ra((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=ra(uo(ra((t=>{var e=na(t),r=So(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=fo()),h.push({x:i,y:o,id:n.getId(e),timeOffset:fo()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?Uo.Drag:t instanceof MouseEvent?Uo.MouseMove:Uo.TouchMove)})),o,{trailing:!1})),f=[no("mousemove",l,i),no("touchmove",l,i),no("drag",l,i)];return ra((()=>{f.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mouseInteractionCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Wo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=kt(t),h=(t=>i=>{var a=na(i);if(!yo(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Ho.Mouse;break;case"touch":h=Ho.Touch;break;case"pen":h=Ho.Pen}h===Ho.Touch&&(Wo[t]===Wo.MouseDown?u="TouchStart":Wo[t]===Wo.MouseUp&&(u="TouchEnd"))}else So(i)&&(h=Ho.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Ho.Touch||u.startsWith("Mouse")&&h===Ho.Mouse)&&(h=null)):Wo[t]===Wo.Click&&(h=l,l=null);var f=So(i)?i.changedTouches[0]:i;if(f){var c=n.getId(a),v=f.clientX,d=f.clientY;ra(e)(r({type:Wo[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Wo[t]){case Wo.MouseDown:case Wo.MouseUp:a=a.replace("mouse","pointer");break;case Wo.TouchStart:case Wo.TouchEnd:return}u.push(no(a,h,i))})),ra((()=>{u.forEach((t=>t()))}))}(t)),g.push(oa(t)),g.push((d=t.viewportResizeCb,p=s,m=-1,y=-1,no("resize",ra(uo(ra((()=>{var t=vo(),e=po();m===t&&y===e||(d({width:Number(e),height:Number(t)}),m=t,y=e)})),200)),p))),g.push(function(t){var e=t.inputCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=na(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=io.parentElement(e)),e&&c&&ha.indexOf(c)>=0&&!yo(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=At(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=St({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:r}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&i.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(t,i){var s=ua.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ua.set(t,i);var o=n.getId(t);ra(e)(r({},i,{id:o}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>no(t,ra(c),i))),p=i.defaultView;if(!p)return()=>{d.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((t=>lo(t[0],t[1],{set(){ra(c)({target:this,isTrusted:!1})}},!1,p)))),ra((()=>{d.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=ra((t=>uo(ra((s=>{var o=na(s);if(o&&!yo(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}})),s.media||500))),h=[no("play",a(zo.Play),o),no("pause",a(zo.Pause),o),no("seeked",a(zo.Seeked),o),no("volumechange",a(zo.VolumeChange),o),no("ratechange",a(zo.RateChange),o)];return ra((()=>{h.forEach((t=>t()))}))}(t)),t.recordDOM&&(g.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ra(((t,e,s)=>{var o=s[0],a=s[1];n.onCssomSheetMutation(e);var h=fa(e,i,n.styleMirror),u=h.id,l=h.styleId;return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:o,index:a}]}),t.apply(e,s)}),"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:ra(((t,e,s)=>{var o=s[0];n.onCssomSheetMutation(e);var a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,removes:[{index:o}]}),t.apply(e,s)}),"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ra(((t,e,s)=>{var o=s[0],a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,replace:o}),t.apply(e,s)}),"host")})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:ra(((t,e,s)=>{var o=s[0],a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,replaceSync:o}),t.apply(e,s)}),"host")}));var l={};pa("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(pa("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),pa("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),pa("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var f={};return Object.entries(l).forEach((t=>{var e=t[0],s=t[1];f[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(f[e].insertRule,{apply:ra(((t,e,s)=>{var o=s[0],a=s[1];n.onCssomSheetMutation(e.parentStyleSheet);var h=fa(e.parentStyleSheet,i,n.styleMirror),u=h.id,l=h.styleId;return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:o,index:[...la(e),a||0]}]}),t.apply(e,s)}),"host")}),s.prototype.deleteRule=new Proxy(f[e].deleteRule,{apply:ra(((t,e,s)=>{var o=s[0];n.onCssomSheetMutation(e.parentStyleSheet);var a=fa(e.parentStyleSheet,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,removes:[{index:[...la(e),o]}]}),t.apply(e,s)}),"host")})})),ra((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var e=t[0],r=t[1];r.prototype.insertRule=f[e].insertRule,r.prototype.deleteRule=f[e].deleteRule}))}))}(t,{win:s})),g.push(ca(t,t.doc)),g.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:ra(((t,e,o)=>{var h,u,l=o[0],f=o[1],c=o[2];if(n.has(l))return a.apply(e,[l,f,c]);s.onCssomSheetMutation(null==(h=e.parentRule)?void 0:h.parentStyleSheet);var v=fa(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror),d=v.id,p=v.styleId;return(d&&-1!==d||p&&-1!==p)&&r({id:d,styleId:p,set:{property:l,value:f,priority:c},index:la(e.parentRule)}),t.apply(e,o)}),"host")});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:ra(((t,e,o)=>{var a,u,l=o[0];if(n.has(l))return h.apply(e,[l]);s.onCssomSheetMutation(null==(a=e.parentRule)?void 0:a.parentStyleSheet);var f=fa(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror),c=f.id,v=f.styleId;return(c&&-1!==c||v&&-1!==v)&&r({id:c,styleId:v,remove:{property:l},index:la(e.parentRule)}),t.apply(e,o)}),"host")}),ra((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s})),t.collectFonts&&g.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=ro(r.fonts,"add",(function(t){return function(r){return setTimeout(ra((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),ra((()=>{n.forEach((t=>t()))}))}(t))),g.push((a=(o=t).doc,h=o.mirror,u=o.blockClass,l=o.blockSelector,f=o.selectionCb,c=!0,(v=ra((()=>{var t=a.getSelection();if(!(!t||c&&(null==t?void 0:t.isCollapsed))){c=t.isCollapsed||!1;for(var e=[],r=t.rangeCount||0,i=0;r>i;i++){var n=t.getRangeAt(i),s=n.startContainer,o=n.startOffset,v=n.endContainer,d=n.endOffset;yo(s,u,l,!0)||yo(v,u,l,!0)||e.push({start:h.getId(s),startOffset:o,end:h.getId(v),endOffset:d})}f({ranges:e})}})))(),no("selectionchange",v))),g.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?ro(r.customElements,"define",(function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}})):()=>{}}(t)),t.plugins))g.push(S.observer(S.callback,s,S.options))}catch(t){try{w()}catch(t){}throw t}return w}function da(t){return void 0!==window[t]}function pa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ma{constructor(t){u(this,"iframeIdToRemoteIdMap",new WeakMap),u(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class ya{constructor(t){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new ma(Gt)),u(this,"crossOriginIframeStyleMirror"),u(this,"crossOriginIframeRootIdMap",new WeakMap),u(this,"mirror"),u(this,"mutationCb"),u(this,"wrappedEmit"),u(this,"loadListener"),u(this,"pageHideListener"),u(this,"stylesheetManager"),u(this,"recordCrossOriginIframes"),u(this,"messageHandler"),u(this,"nestedIframeListeners",new Map),u(this,"attachedWindows",new WeakMap),u(this,"attachedDocuments",new WeakMap),u(this,"attachedIframes",new Map),u(this,"loadListenerDisposers",new WeakMap),u(this,"iframeElementsById",new Map),u(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ma(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){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>oo(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{so(t.win,"pagehide",t.handler)})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);oo((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}oo((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.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){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Po.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var 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:Po.IncrementalSnapshot,data:{source:Uo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Po.Meta:case Po.Load:case Po.DomContentLoaded:return!1;case Po.Plugin:return e;case Po.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Po.IncrementalSnapshot:switch(e.data.source){case Uo.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),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 Uo.Drag:case Uo.TouchMove:case Uo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Uo.ViewportResize:return!1;case Uo.MediaInteraction:case Uo.MouseInteraction:case Uo.Scroll:case Uo.CanvasMutation:case Uo.Input:return this.replaceIds(e.data,t,["id"]),e;case Uo.StyleSheetRule:case Uo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Uo.Font:return e;case Uo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Uo.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}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===$o.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(so(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(so(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach((t=>{oo((()=>this.mirror.removeNodeFromMap(t)))})),oo((()=>aa(r,s))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&so(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{so(e,"message",t)})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>t.add(e.element))),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}}class ga{constructor(t){u(this,"shadowDoms",new WeakSet),u(this,"mutationCb"),u(this,"scrollCb"),u(this,"bypassOptions"),u(this,"mirror"),u(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,n;if(at(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=io.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=sa(r({},this.bypassOptions,{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=o.observer,h=o.buffer;this.restoreHandlers.push({doc:s,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=ia.indexOf(h);-1!==t&&ia.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:oa(r({},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(io.host(t))),this.restoreHandlers.push({doc:s,handler:ca({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){var r=this;this.restoreHandlers.push({doc:e,handler:ro(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=io.shadowRoot(this);return s&&Fo(this)&&r.addShadowRoot(s,e),n}}))})}reset(){this.restoreHandlers.forEach((t=>{var e=t.handler;try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}}var wa="skip-frame";function ba(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ka="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ca=0;64>Ca;Ca++)ka[Sa.charCodeAt(Ca)]=Ca;var Ma=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=ka[t.charCodeAt(e)],i=ka[t.charCodeAt(e+1)],n=ka[t.charCodeAt(e+2)],s=ka[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},xa=new Map,Aa=(t,e,r)=>{if(t&&(Ia(t,e)||"object"==typeof t)){var i=function(t,e){var r=xa.get(t);return r||xa.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Ea(t,e,r,i){return t instanceof Array?t.map((t=>Ea(t,e,r,i))):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=Sa[r[e]>>2],n+=Sa[(3&r[e])<<4|r[e+1]>>4],n+=Sa[(15&r[e+1])<<2|r[e+2]>>6],n+=Sa[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[Ea(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Ea(t.data,e,r,i),t.width,t.height]}:Ia(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Aa(t,e,r)}:t}var Ra=(t,e,r,i)=>t.map((t=>Ea(t,e,r,i))),Ia=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Ta=["webgl","webgl2"];function Oa(t){return"nodeType"in t}function _a(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return ro(n.prototype,"configure",(function(n){return function(s){var o=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!o||Oa(o)&&yo(o,e,i,!0))return n.call(this,s);Oa(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=ro(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!yo(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Ta.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Da(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=ro(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Aa(f,s,this),"tagName"in this.canvas&&!yo(this.canvas,i,n,!0)){var c=Ra(u,s,this,o);r(this.canvas,{type:e,property:h,args:c})}return f}}));a.push(u)}catch(i){var l=lo(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Na,La,Fa,Ba='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Pa="undefined"!=typeof self&&self.Blob&&new Blob([Ba],{type:"text/javascript;charset=utf-8"});function ja(t){var e;try{if(!(e=Pa&&(self.URL||self.webkitURL).createObjectURL(Pa)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ba),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Ua{constructor(t){u(this,"pendingCanvasMutations",new Map),u(this,"rafStamps",{latestId:0,invokeId:null}),u(this,"mirror"),u(this,"mutationCb"),u(this,"resetObservers"),u(this,"frozen",!1),u(this,"locked",!1),u(this,"rafIdTimestamp",null),u(this,"rafIdFlush",null),u(this,"refCount",0),u(this,"torndown",!1),u(this,"resetFrameDedup",null),u(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)}));var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,l=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:l})}onFullSnapshot(){var t;null==(t=this.resetFrameDedup)||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}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=_a(r,i,n,!0),l=new Map;try{a=new ja}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:Go["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{yo(t,i,n,!0)||u.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&m(t.shadowRoot)}))}catch(t){}},m(r.document),u).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!l.get(i)&&0!==t.width&&0!==t.height){l.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void l.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return wa}if(void 0!==o){if(!Array.isArray(o)||!o.every(ba))return wa;var a=r/n,h=i/s;return o.filter((t=>t.width>0&&t.height>0)).map((t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}}))}}}(s.canvasMasking,t,c,v,u,f);if(d===wa)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:i,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=_a(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=ro(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return yo(this.canvas,r,i,!0)||setTimeout((()=>{var r=Ra(h,e,this,n);t(this.canvas,{type:Go["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=lo(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:Go["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Da(e.WebGLRenderingContext.prototype,Go.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Da(e.WebGL2RenderingContext.prototype,Go.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,a)));this.mutationCb({id:e,type:r[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class Wa{constructor(t){var e;u(this,"trackedLinkElements",new WeakSet),u(this,"pendingDeferredSheets",new Set),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"styleMirror",new _o),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;var r=null,i=null;try{(i=t.sheet)&&(r=gt(i))}catch(t){}if(!r||!i)return tt(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=M(),f=I(),c=!0;try{if(s)return a=!0,tt(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(tt(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(tt(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),O(h=M()-l,null!=(u=f)?u:x)||(H.totalMs+=h,h>H.slowestSliceMs&&(H.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null==(r=this.beginDeferredLinkInlining(t,e))||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:Mt({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=M();try{X((()=>{try{var e=t.rules||t.cssRules;e&&J(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:ct(e,t.href),index:r})))})}))}finally{K(M()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),ee.forEach((t=>t.abort())),ee.clear()}trackStylesheetInLinkElement(t){}}class Ha{constructor(){u(this,"nodeMap",new WeakMap),u(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).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(){}}var Ga=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var za=document.createElement("iframe");document.body.appendChild(za),Array.from=(null==(n=za.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(za)}}catch(t){console.debug("Unable to override Array.from",t)}var Va=bt(),$a=new Set([Uo.Mutation,Uo.MediaInteraction,Uo.StyleSheetRule,Uo.CanvasMutation,Uo.Font,Uo.Log,Uo.StyleDeclaration,Uo.AdoptedStyleSheet]);function Ya(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null==(t=e.cancelIdleCallback)?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function qa(t){var e;void 0===t&&(t={});var i=t,n=i.emit,s=i.checkoutEveryNms,o=i.checkoutEveryNth,a=i.blockClass,h=void 0===a?"rr-block":a,u=i.blockSelector,l=void 0===u?null:u,f=i.ignoreClass,c=void 0===f?"rr-ignore":f,v=i.ignoreSelector,d=void 0===v?null:v,p=i.maskTextClass,m=void 0===p?"rr-mask":p,y=i.maskTextSelector,g=void 0===y?null:y,w=i.inlineStylesheet,b=void 0===w||w,S=i.inlineStylesheetBudgetRules,k=i.maskAllInputs,C=i.maskInputOptions,M=i.slimDOMOptions,x=i.maskInputFn,A=i.maskTextFn,E=i.maskAllElementAttributes,I=void 0!==E&&E,T=i.maskAttributeFn,O=i.hooks,_=i.packFn,D=i.sampling,N=void 0===D?{}:D,L=i.dataURLOptions,F=void 0===L?{}:L,B=i.canvasResolutionScale,j=i.canvasMasking,U=i.mousemoveWait,W=i.recordDOM,H=void 0===W||W,G=i.recordCanvas,Y=void 0!==G&&G,q=i.recordCrossOriginIframes,Z=void 0!==q&&q,J=i.recordAfter,X=void 0===J?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":J,K=i.userTriggeredOnInput,Q=void 0!==K&&K,tt=i.collectFonts,rt=void 0!==tt&&tt,it=i.inlineImages,nt=void 0!==it&&it,st=i.plugins,ot=i.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=i.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=i.attributeFilter;Zo=i.errorHandler;var ft=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},F),ct=!Z||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!n)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==U&&void 0===N.mousemove&&(N.mousemove=U),Va.reset();var dt,pt=!0===k?{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!==C?C:{password:!0},mt=le(void 0!==M&&M);ko();var yt,gt,bt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return _&&!vt&&(t=_(t)),t};Na=(t,e)=>{var r,i=t;if(i.timestamp=fo(),!(null==(r=ia[0])?void 0:r.isFrozen())||i.type===Po.FullSnapshot||i.type===Po.IncrementalSnapshot&&$a.has(i.data.source)||ia.forEach((t=>t.unfreeze())),ct)null==n||n(kt(i),e);else if(vt){var a={type:"rrweb",event:kt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===Po.FullSnapshot)dt=i,bt=0;else if(i.type===Po.IncrementalSnapshot){if(i.data.source===Uo.Mutation&&i.data.isAttachIframe)return;bt++,(o&&bt>=o||s&&i.timestamp-dt.timestamp>s)&&La(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Va.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var r=t.id;if(!e||!e.has(r)){var n=Et.getIframeElementById(r);n&&i.has(n)?Et.forgetIframeId(r):(null==yt||yt(r),Et.removeIframeById(r))}})),null==gt||gt(),Et.cleanupDetachedIframes()}Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Mutation},t)})},Mt=t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Scroll},t)}),xt=t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.CanvasMutation},t)}),At=new Wa({mutationCb:Ct,adoptedStyleSheetCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new ya({mirror:Va,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:Z,wrappedEmit:Na});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Va,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new Ha,Tt=null==j?void 0:j.configured;Fa=new Ua({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Va,sampling:N.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:j});var Ot=new ga({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:N,slimDOMOptions:mt,iframeManager:Et,stylesheetManager:At,canvasManager:Fa,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Va});La=function(t){if(void 0===t&&(t=!1),H){z(S);try{Na({type:Po.Meta,data:{href:window.location.href,width:po(),height:vo()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),ia.forEach((t=>t.lock()));var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new wt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,_=r.iframeLoadTimeout,D=r.onIframeListenerRegistered,N=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,B=void 0===F?()=>!1:F,P=r.maxDepth,j=r.inlineStylesheetBudgetRules,U=!0===S?{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===S?{password:!0}:S,W=le(void 0!==E&&E);z(j);try{return ue(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:U,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:W,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:_,onIframeListenerRegistered:D,onStylesheetLoad:N,stylesheetLoadTimeout:L,keepIframeSrcFn:B,newlyAddedElement:!1,maxDepth:P})}finally{V()}}(document,{mirror:Va,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:mt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){xo(t,Va)&&Et.addIframe(t),Ao(t,Va)&&At.trackLinkElement(t),Ro(t)&&Ot.addShadowRoot(io.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=P,P=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Na({type:Po.FullSnapshot,data:{node:i,initialOffset:co(window)}},t),ia.forEach((t=>t.unlock())),Fa.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&oo((()=>{o=e.beginDeferredLinkInlining(r,Va.getId(r))}))},u=()=>{if(o){var t=o,e=!0;oo((()=>{e=t.advance(200)})),e&&(o=null)}},l=t=>{if(n=null,!i){var e=0;do{try{o||h(),u()}catch(t){null==o||o.discard(),o=null,et(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Ya(l):r())}};return n=Ya(l),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);et(c),null==o||o.discard(),o=null}r()}}}}(r,At,(()=>{e===n&&(e=void 0)}));e=n}Z&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Va.getId(document))}finally{V()}var s}};try{var _t=[];for(var Dt of(_t.push(no("pagehide",(()=>{try{null==e||e.flush()}catch(t){}e=void 0}),window)),["visibilitychange","freeze","resume"]))_t.push(no(Dt,R,document));yt=t=>{var e=St.get(t);e&&(e.forEach((t=>{oo(t);var e=_t.indexOf(t);-1!==e&&_t.splice(e,1)})),St.delete(t))},gt=()=>{for(var t of St){var e=t[0],r=Va.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==yt||yt(e)}catch(t){null==yt||yt(e)}else null==yt||yt(e)}};var Nt=t=>{var e;return ra(va)({mutationCb:Ct,mousemoveCb:(t,e)=>Na({type:Po.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.ViewportResize},t)}),inputCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Input},t)}),mediaInteractionCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.MediaInteraction},t)}),styleSheetRuleCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.StyleSheetRule},t)}),styleDeclarationCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Font},t)}),selectionCb(t){Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Selection},t)})},customElementCb(t){Na({type:Po.IncrementalSnapshot,data:r({source:Uo.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:N,recordDOM:H,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:Q,collectFonts:rt,doc:t,maskInputFn:x,maskTextFn:A,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:mt,dataURLOptions:ft,mirror:Va,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:Fa,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==(e=null==st?void 0:st.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Na({type:Po.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},O)};Et.addLoadListener((t=>{try{var e=Va.getId(t),r=Nt(t.contentDocument);if("function"==typeof r&&(_t.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),Et.addPageHideListener((t=>{var e=Va.getId(t);null==yt||yt(e),aa(t)}));var Lt=-1,Ft=t=>Na({type:Po.Custom,data:{tag:jo,payload:t}}),Bt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Va.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Pt=()=>{La();var t=Nt(document);"function"==typeof t&&_t.push(t),_t.push(no("fullscreenchange",Bt)),_t.push(no("webkitfullscreenchange",Bt)),_t.push(no("mozfullscreenchange",Bt)),_t.push(no("MSFullscreenChange",Bt)),Ga=!0};return["interactive","complete"].includes(document.readyState)?Pt():(_t.push(no("DOMContentLoaded",(()=>{Na({type:Po.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&Pt()}))),_t.push(no("load",(()=>{Na({type:Po.Load,data:{}}),"load"===X&&Pt()}),window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,_t.forEach((t=>oo(t))),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Va.reset(),Ga=!1,Zo=void 0}}catch(t){console.warn(t)}}function Za(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}qa.addCustomEvent=(t,e)=>{if(!Ga)throw new Error("please add custom event after start recording");Na({type:Po.Custom,data:{tag:t,payload:e}})},qa.freezePage=()=>{ia.forEach((t=>t.freeze()))},qa.takeFullSnapshot=t=>{if(!Ga)throw new Error("please take full snapshot after start recording");La(t)},qa.mirror=Va;var Ja,Xa,Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"}));function Qa(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(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):s.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]&&(u(arguments[0])?s.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])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.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)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.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!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(d.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(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 l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function f(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function c(t){var e=l(t,"Y")&&f(t,"Y"),r=l(t,"X")&&f(t,"X");return e||r}function v(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(v.bind(t,e))}function d(r,i,n){var a,u,l,f,c=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,f=h),v({scrollable:a,method:f,startTime:c,startX:u,startY:l,x:i,y:n})}}class th{constructor(t,e){void 0===t&&(t=[]),u(this,"timeOffset",0),u(this,"speed"),u(this,"actions"),u(this,"raf",null),u(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,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(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}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){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function eh(t,e){if(t.type===Po.IncrementalSnapshot&&t.data.source===Uo.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function rh(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}(Xa=Ja||(Ja={}))[Xa.NotStarted=0]="NotStarted",Xa[Xa.Running=1]="Running",Xa[Xa.Stopped=2]="Stopped";var ih={type:"xstate.init"};function nh(t){return void 0===t?[]:[].concat(t)}function sh(t){return{type:"xstate.assign",assignment:t}}function oh(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 ah(t){return function(e){return t===e}}function hh(t){return"string"==typeof t?{type:t}:t}function uh(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ah(t)}}function lh(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function fh(t,e){void 0===e&&(e={});var r=rh(lh(nh(t.states[t.initial].entry).map((function(t){return oh(t,e.actions)})),t.context,ih),2),i={config:t,ie:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:ah(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=hh(r),l=t.states[a];if(l.on){var f=nh(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return uh(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=rh(lh([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return oh(t,i.ie.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:ah(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return uh(a,h)}};return i}var ch=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function vh(t){var e=t.initialState,r=Ja.NotStarted,i=new Set,n={l:t,send(n){r===Ja.Running&&(e=t.transition(e,n),ch(e,hh(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:ah(s.value)}}return r=Ja.Running,ch(e,ih),n},stop:()=>(r=Ja.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function dh(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Po.Meta&&e>=i.timestamp)return t.slice(r)}return t}var ph=new Map;function mh(t,e){var r=ph.get(t);return r||ph.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function yh(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield yh(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var s=e.index;return mh(r,e.rr_type)[s]}if("args"in e){var o=e.args;return new(0,window[e.rr_type])(...yield Promise.all(o.map(yh(t,r,i))))}if("base64"in e)return Ma(e.base64);if("src"in e){var a=t.get(e.src);if(a)return a;var h=new Image;return h.src=e.src,t.set(e.src,h),h}if("data"in e&&"Blob"===e.rr_type){var u=yield Promise.all(e.data.map(yh(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(yh(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var gh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function wh(t){return bh.apply(this,arguments)}function bh(){return(bh=e((function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===Go.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(yh(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(gh.includes(r)){var i=mh(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function Sh(){return Sh=e((function*(t){var r=t.event,i=t.mutations,n=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(yh(n,o)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach(((t,e)=>{var a=i[e];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(n.get(r),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}}))}else s(i[0],new Error("Canvas context is null"))})),Sh.apply(this,arguments)}function kh(t){return Ch.apply(this,arguments)}function Ch(){return Ch=e((function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Go.WebGL,Go.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield wh({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return Sh.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),Ch.apply(this,arguments)}var Mh=["AUDIO","VIDEO"];class xh{constructor(t){u(this,"mediaMap",new Map),u(this,"warn"),u(this,"service"),u(this,"speedService"),u(this,"emitter"),u(this,"getCurrentTime"),u(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(Vo.Start,this.start.bind(this)),this.emitter.on(Vo.SkipStart,this.start.bind(this)),this.emitter.on(Vo.Pause,this.pause.bind(this)),this.emitter.on(Vo.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var 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(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===zo.Play||l!==zo.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;Mh.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Mh.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Ah(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ls)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var Eh=Za||Ka,Rh="[replayer]",Ih={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Th(t){return t.type==Po.IncrementalSnapshot&&(t.data.source==Uo.TouchMove||t.data.source==Uo.MouseInteraction&&t.data.type==Wo.TouchStart)}class Oh{constructor(t,e){var i=this;if(u(this,"wrapper"),u(this,"iframe"),u(this,"service"),u(this,"speedService"),u(this,"config"),u(this,"usingVirtualDom",!1),u(this,"virtualDom",new _s),u(this,"mouse"),u(this,"mouseTail",null),u(this,"tailPositions",[]),u(this,"emitter",Eh()),u(this,"nextUserInteractionEvent"),u(this,"legacy_missingNodeRetryMap",{}),u(this,"cache",ei()),u(this,"imageMap",new Map),u(this,"canvasEventMap",new Map),u(this,"mirror",bt()),u(this,"styleMirror",new _o),u(this,"pendingAdoptedStyleSheets",new Map),u(this,"adoptedStyleSheetTokens",new Map),u(this,"mediaManager"),u(this,"firstFullSnapshot",null),u(this,"newDocumentQueue",[]),u(this,"mousePos",null),u(this,"touchActive",null),u(this,"lastMouseDownEvent",null),u(this,"lastHoveredRootNode"),u(this,"lastSelectionData",null),u(this,"lastScrollMap",new Map),u(this,"constructedStyleMutations",[]),u(this,"adoptedStyleSheets",[]),u(this,"emitterHandlers",[]),u(this,"serviceSubscription"),u(this,"speedServiceSubscription"),u(this,"timeouts",new Set),u(this,"applyGeneration",0),u(this,"seekRebuildInFlight",!1),u(this,"styleSheetLoadListeners",new Map),u(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),u(this,"shouldCastInSyncMode",(t=>{switch(t.type){case Po.DomContentLoaded:case Po.Load:return!1;case Po.Custom:return t.data.tag===jo;default:return!0}})),u(this,"applyEvents",((t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s((()=>l(!1))))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Vo.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})})),u(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case Po.DomContentLoaded:case Po.Load:break;case Po.Custom:n=()=>{e||i.emitter.emit(Vo.CustomEvent,t),t.data.tag===jo&&i.applyFullscreen(t.data.payload)};break;case Po.Meta:n=()=>i.emitter.emit(Vo.Resize,{width:t.data.width,height:t.data.height});break;case Po.FullSnapshot:n=()=>{var n;if(i.clearFullscreen(),i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.pendingAdoptedStyleSheets.clear(),i.adoptedStyleSheetTokens.clear(),i.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case Po.IncrementalSnapshot:n=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(Vo.SkipStart,n)}}}}return()=>{for(var r of(n&&n(),i.config.plugins||[]))r.handler&&r.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=i.applyGeneration,a=()=>{o===i.applyGeneration&&(i.seekRebuildInFlight?i.addTimeout(a,50):i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(Vo.Finish)))},h=50;t.type===Po.IncrementalSnapshot&&t.data.source===Uo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(Vo.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={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:Ih,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Vo.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Vo.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{kh({event:t,mutation:e,target:r,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===Uo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Uo.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Es(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(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Is(r.node,this.mirror,this.virtualDom.mirror);Es(i,r.node,t,this.virtualDom.mirror),r.node=i}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:Uo.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){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}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(Vo.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,l,f,c=new th([],{speed:this.config.speed});this.service=(o={events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,l=a.applyEvents,f=a.emitter,vh(fh({id:"player",context:o,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:sh({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:sh(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,r=t.timer,i=t.events,n=t.baselineTime,s=t.lastPlayedEvent;for(var o of(r.clear(),r.timeOffset=0,i))eh(o,n);var a=dh(i,n),u=a.some((t=>t.type===Po.FullSnapshot&&t.timestamp===n)),c=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===Po.IncrementalSnapshot&&s.data.source===Uo.MouseMove&&(c=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(c||0)>n&&f.emit(Vo.PlayBack);var v=new Array;for(var d of a)(!c||c>=n||d.timestamp>c&&d!==s)&&(n>d.timestamp||u&&d.timestamp===n&&(d.type===Po.Meta||d.type===Po.FullSnapshot))&&v.push(d);l(v,(()=>{var e=function(){if(n>i.timestamp||u&&i.timestamp===n&&(i.type===Po.Meta||i.type===Po.FullSnapshot))return 0;if(c&&n>c&&i===s)return 0;var t=h(i,!1);r.addAction({doAction(){t()},delay:i.delay})};for(var i of dh(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:sh((t=>r({},t,{lastPlayedEvent:null}))),startLive:sh({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:sh(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;eh(o,i);var a=s.length-1;if(s[a]&&s[a].timestamp>o.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);s[f].timestamp>o.timestamp?a=f-1:l=f+1}-1===u&&(u=l),s.splice(u,0,o)}else s.push(o);if(i>o.timestamp)e.payload.applyPastEventSynchronously&&h(o,!0)();else if(n.isActive()){var c=h(o,!1);n.addAction({doAction(){c()},delay:o.delay})}}return r({},t,{events:s})}))}}))),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(Vo.StateChange,{player:t})})),this.speedService=function(t){return vh(fh({id:"speed",context:t,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:sh({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:c}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(Vo.StateChange,{speed:t})})),this.mediaManager=new xh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var v=this.service.state.context.events.find((t=>t.type===Po.Meta)),d=this.service.state.context.events.find((t=>t.type===Po.FullSnapshot));if(v){var p=v.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(Vo.Resize,{width:m,height:y})}),0)}d&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=d,this.rebuildFullSnapshot(d),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},d.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(Th)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}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){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}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(){var 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(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(Vo.Start)}pause(t){var e,r;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==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(Vo.Pause)}resume(t){void 0===t&&(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(Vo.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{this.emitter.off(t.event,t.handler)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||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.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Vo.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Vo.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){var e=this.config.unpackFn?this.config.unpackFn(t):t;Th(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=ei()}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");var 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&&(Qa(this.iframe.contentWindow,this.iframe.contentDocument),ko(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null==(t=this.iframe.contentDocument)||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){var r=this;if(void 0===e&&(e=!1),!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={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,u=void 0===h?new wt:h,l=ni(t,{doc:r,mirror:u,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(u,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===c.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,u)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach((t=>Ah(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Vo.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { 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);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Vs(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:Uo.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===$o.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};ni(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var h of n)a();s.forEach((t=>Ah(t)))}collectIframeAndAttachDocument(t,e){if(xo(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Vo.Start,s),this.emitter.on(Vo.Pause,s);var o=()=>{this.emitter.off(Vo.Start,s),this.emitter.off(Vo.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Vo.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Vo.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Po.IncrementalSnapshot&&r.data.source===Uo.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(yh(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(yh(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,s=t.data;switch(s.source){case Uo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case Uo.Drag:case Uo.TouchMove:case Uo.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case Uo.MouseInteraction:if(-1===s.id)break;var a=new Event(kt(Wo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(Vo.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case Wo.Blur:"blur"in h&&h.blur();break;case Wo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Wo.Click:case Wo.TouchStart:case Wo.TouchEnd:case Wo.MouseDown:case Wo.MouseUp:e?(s.type===Wo.TouchStart?this.touchActive=!0:s.type===Wo.TouchEnd&&(this.touchActive=!1),s.type===Wo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Wo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Wo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Wo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Wo.TouchStart?this.mouse.classList.add("touch-active"):s.type===Wo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Wo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case Uo.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case Uo.ViewportResize:this.emitter.emit(Vo.Resize,{width:s.width,height:s.height});break;case Uo.Input:if(-1===s.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);f.inputData=s;break}this.applyInput(s);break;case Uo.MediaInteraction:var c=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);this.mediaManager.mediaMutation({target:c,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:s});break;case Uo.StyleSheetRule:case Uo.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case Uo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);v.canvasMutations.push({event:t,mutation:s})}else{var d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);kh({event:t,mutation:s,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Uo.Font:try{var p=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(p)}catch(t){this.warn(t)}break;case Uo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case Uo.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new wi),void 0===s&&(s=new _s),function t(e,r){var i=Gs(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==Cs.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==Cs.DOCUMENT_NODE&&e.nodeType!==Cs.ELEMENT_NODE&&e.nodeType!==Cs.DOCUMENT_FRAGMENT_NODE||(e.nodeType===Cs.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Gs(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Ro(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var f=r({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===$o.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?c.push(e):void 0;if(e.node.isShadow){Ro(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot;var s=this.pendingAdoptedStyleSheets.get(e.parentId);s&&!this.usingVirtualDom&&this.applyAdoptedStyleSheet({source:Uo.AdoptedStyleSheet,id:e.parentId,styleIds:s})}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(xo(n,l))this.attachDocumentToIframe(e,n);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Ah(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=ni(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===$o.Element&&e.node.type===$o.Text){var p=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===n.TEXT_NODE&&n.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==n.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,n.removeChild(y))}else if((null==d?void 0:d.type)===$o.Document){var g=n;e.node.type===$o.DocumentType&&(null==(r=g.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),"HTML"===v.nodeName&&g.documentElement&&g.removeChild(g.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?n.insertBefore(v,o.nextSibling):a&&a.parentNode?n.contains(a)?n.insertBefore(v,a):n.insertBefore(v,null):n.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),xo(v,this.mirror)){var w=this.mirror.getId(v),b=this.newDocumentQueue.find((t=>t.parentId===w));b&&(this.attachDocumentToIframe(b,v),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==b)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,n,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach((t=>{v(t)}));for(var d=performance.now();c.length;){var p=Co(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Mo(m,(t=>{v(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Oo(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n,s=l.getNode(e.id);if(!s){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var a=function(){if("string"==typeof h){var t=e.attributes[h];if(null===t)s.removeAttribute(h),"open"===h&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ls)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(s,e);else if("string"==typeof t)try{if("_cssText"===h&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{var a=l.getMeta(s),u=ni(r({},a,{attributes:r({},a.attributes,e.attributes)}),{doc:s.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});Object.assign(a.attributes,e.attributes);var f=s.nextSibling,c=s.parentNode;if(u&&c)return c.removeChild(s),c.insertBefore(u,f),l.replace(e.id,u),1}catch(t){}if("value"===h&&"TEXTAREA"===s.nodeName){var v=s;v.childNodes.forEach((t=>v.removeChild(t)));var d=null==(i=s.ownerDocument)?void 0:i.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===h&&(null==(n=l.getMeta(s))?void 0:n.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",h,t):s.setAttribute(h,t);"rr_open_mode"===h&&"DIALOG"===s.nodeName&&Ah(s,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===h){var p=t,m=s;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var h in e.attributes)if(a())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==s?void 0:s.type)===$o.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var 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{var e=new Set,r=t.ranges.map((t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===Uo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===Uo.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=To(i),s=n.index,o=Io(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var r=t.index;try{if(Array.isArray(r)){var i=To(r),n=i.index,s=Io(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Io(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Io(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null==(e=r.ownerDocument)?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:Uo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t)),a=!1;try{Ro(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout((()=>s(e,r)),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Eo(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Ih:Object.assign({},Ih,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var 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=r,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),o(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),o()}),s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")}));var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===Po.IncrementalSnapshot&&t.data.source>Uo.Mutation&&Uo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Vo.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(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Rh,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Rh,...e)}}}var _h=qa.addCustomEvent,Dh=qa.freezePage,Nh=qa.takeFullSnapshot;export{Po as EventType,Uo as IncrementalSource,Wo as MouseInteractions,Oh as Replayer,Vo as ReplayerEvents,_h as addCustomEvent,kh as canvasMutation,Dh as freezePage,rt as getDeferredStylesheetStats,T as getDiscardedDurationSamples,Y as getLastSnapshotCost,it as getMutationCost,ho as mirror,qa as record,he as resetMaxDepthState,nt as resetSnapshotCostState,Nh as takeFullSnapshot,Bo as utils,ae as wasMaxDepthReached};
1
+ function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputId"],o=["inputId"],a=["type"],h=Object.defineProperty,u=(t,e,r)=>((t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),l=Object.defineProperty,f=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),c=(t=>(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))(c||{});function v(t,e){return-1!==t.indexOf(e)}var d={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(t){if(m[t])return m[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in d?d[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in p?p[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return m[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(v(h=navigator.userAgent,"AppleWebKit")&&!v(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),m[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var g={};function w(t,e,r){var i,n=t+"."+String(r);if(g[n])return g[n].call(e);var s=y(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(g[n]=o,o.call(e)):e[r]}var b={};function S(t,e,r){var i=t+"."+String(r);if(b[i])return b[i].bind(e);var n=y(t)[r];return"function"!=typeof n?e[r]:(b[i]=n,n.bind(e))}var k={childNodes:t=>w("Node",t,"childNodes"),parentNode:t=>w("Node",t,"parentNode"),parentElement:t=>w("Node",t,"parentElement"),textContent:t=>w("Node",t,"textContent"),contains:(t,e)=>S("Node",t,"contains")(e),getRootNode:t=>S("Node",t,"getRootNode")(),host:t=>t&&"host"in t?w("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null,querySelector:(t,e)=>S("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>S("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}},C=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,A=0,E=6e4;function R(){x+=1}function I(){return x}function T(){return A}function O(t,e){return(e!==x||t>E)&&(A+=1,!0)}var _=0,D=0,N=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},G=t=>t&&t>0?t:null;function z(t){(_+=1)>1||(L=C(),P=[],j=0,B=G(t),D=M(),N=x)}function V(){return 0===_?F||C():(_-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=j,H.deferredCount+=j,B=null,O(L.durationMs,N)?L:F=L)}function Y(){return F}var q=32;function Z(t,e,r){var i=t.length;if(r>=q)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=Z(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=Z(h,e,r+1))}}}catch(t){}}return i}function J(t){if(0!==_){var e=Z(t,null,0);L.cssRuleCount+=e,U>0&&(L.nonDeferrableCssRuleCount+=e)}}function X(t){U+=1;try{return t()}finally{U-=1}}function K(t){_>0&&(L.stylesheetMs+=t)}function Q(t){if(0===_||null===B)return!1;var e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=B||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),Z(e,r,0)}catch(t){return 0}}(t)>B}function tt(){H.failedCount+=1}function et(t){t>0&&(H.abandonedCount+=t)}function rt(){return r({},H)}function it(){return r({},W)}function nt(){_=0,D=0,N=0,x=0,A=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function st(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}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){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var lt=0;function ft(t){var e=0===lt,r=e?M():0;lt+=1;try{var i=t.rules||t.cssRules;if(!i)return null;J(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),ht(Array.from(i,(t=>ct(t,n))).join(""))}catch(t){return null}finally{lt-=1,e&&K(M()-r)}}function ct(t,e){var r;if(dt(t)){var i;try{i=ft(t.styleSheet)||ut(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return _t(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return pt(t)&&t.selectorText.includes(":")&&(n=vt(n)),e?_t(n,e):n}function vt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function dt(t){return"styleSheet"in t}function pt(t){return"selectorText"in t}var mt=/^-?[A-Za-z_][\w-]*$/,yt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function gt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){var i;try{var n;try{n=r||ut(e)}catch(t){n=e.cssText}try{n&&(null==(i=e.styleSheet)?void 0:i.href)&&(n=_t(n,e.styleSheet.href))}catch(t){}n&&t.parts.push(n),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&dt(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e,r=t;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(pt(t)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return t.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!mt.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(e=t.constructor)?void 0:e.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?mt.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":yt.test(r.name)?"@layer "+r.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?_t(i,n):i,fixColons:"sheet"===r.kind&&pt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&pt(r)&&r.selectorText.includes(":")&&(s=vt(s)),t.parts.push(t.sheetHref?_t(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;J(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!dt(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some((t=>t.sheet===i)))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;J(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=M(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?vt(l):l}else u=ht(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{K(M()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}class wt{constructor(){f(this,"idNodeMap",new Map),f(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),st(t)){var r=k.shadowRoot(t);r&&this.removeNodeFromMap(r),"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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bt(){return new wt}function St(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&kt(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function kt(t){return t.toLowerCase()}var Ct=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 Mt(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&Ct.has(kt(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var xt="__rrweb_original__";function At(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?kt(e):null}catch(t){return null}}function Et(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var Rt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,It=/^(?:[a-z+]+:)?\/\//i,Tt=/^www\..*/i,Ot=/^(data:)([^,]*),(.*)/i;function _t(t,e){return(t||"").replace(Rt,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(It.test(h)||Tt.test(h))return"url("+u+h+u+")";if(Ot.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"}))}var Dt,Nt,Lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Ft=4096,Bt=1e5,Pt=10,jt=new Map,Ut=1,Wt=new RegExp("[^a-z0-9-_:]"),Ht=-2;function Gt(){return Ut++}var zt=/^[^ \t\n\r\u000c]+/,Vt=/^[, \t\n\r\u000c]+/,$t=new WeakMap;function Yt(t,e){return e&&""!==e.trim()?qt(t,e):e}function qt(t,e){var r=$t.get(t);if(r||(r=t.createElement("a"),$t.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Zt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?Lt:t}(t,e.maxBase64ImageLength):t}function Jt(t,e,r,i,n,s){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var a=null==(o=n.sheet)?void 0:o.href;if(a)return a}var h=Yt(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(Bt>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>Ft||t.naturalHeight>Ft)return e;var n=jt.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(jt.size>=Pt){var u=jt.keys().next().value;void 0!==u&&jt.delete(u)}return jt.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Zt(u,s)}if("image"===e)return Zt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=Yt(t,i);return"image"===e&&l.startsWith("data:")?Zt(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(Vt),e.length>r;){var s=i(zt);if(","===s.slice(-1))s=Yt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=Yt(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?_t(i,qt(t)):"object"===e&&"data"===r?Yt(t,i):i:Yt(t,i)}function Xt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Kt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Kt(k.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Kt(k.parentNode(t),e,r)}function Qt(t,e,r,i){var n;if(st(t)){if(!k.childNodes(n=t).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Kt(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function te(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var ee=new Map;function re(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function ie(t){return null==t?"":t.toLowerCase()}var ne=50,se=!1,oe=!1;function ae(){return oe}function he(){oe=!1,se=!1}function ue(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,u=void 0!==h&&h,l=e.inlineStylesheet,f=void 0===l||l,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,b=e.slimDOMOptions,S=e.dataURLOptions,C=void 0===S?{}:S,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,R=e.canvasMaskingConfigured,I=e.onSerialize,T=e.onIframeLoad,O=e.iframeLoadTimeout,D=void 0===O?5e3:O,N=e.onIframeListenerRegistered,F=e.onStylesheetLoad,B=e.stylesheetLoadTimeout,U=void 0===B?5e3:B,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,z=void 0!==G&&G,V=e.depth,Y=void 0===V?0:V,q=e.maxDepth,Z=void 0===q?ne:q,J=e.needsMask,K=e.preserveWhiteSpace,tt=void 0===K||K;if(Y>=Z)return oe=!0,se||(se=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+Z+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;J||(J=Qt(t,o,a,void 0===J)),_>0&&(L.nodeCount+=1);var et,rt=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskTextFn,l=e.maskInputFn,f=e.maskAllElementAttributes,v=void 0!==f&&f,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,b=e.keepIframeSrcFn,S=e.newlyAddedElement,C=void 0!==S&&S,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:c.Document,childNodes:[],compatMode:t.compatMode}:{type:c.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:c.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s=e.doc,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskInputFn,l=e.maskAllElementAttributes,f=void 0!==l&&l,v=e.maskAttributeFn,d=e.dataURLOptions,p=void 0===d?{}:d,m=e.inlineImages,y=e.recordCanvas,g=e.canvasMaskingConfigured,w=e.keepIframeSrcFn,b=e.newlyAddedElement,S=void 0!==b&&b,C=e.rootId,M=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),x=function(t){if(t instanceof HTMLFormElement)return"form";var e=kt(t.tagName);return Wt.test(e)?"div":e}(t),A=new Set,E={},R=t.attributes.length,I=0;R>I;I++){var T=t.attributes[I];Xt(x,T.name)||(E[T.name]=Jt(s,x,kt(T.name),T.value,t,p))}if("link"===x&&o&&!M){var O=t.sheet;if(!O){var D=function(t){return t.href}(t);D&&!(O=re(s,D))&&D.includes(".css")&&(O=re(s,window.location.origin+"/"+D.replace(window.location.href,"")))}var N=null;O&&(Q(O)?_>0&&(P.push(t),j+=1):N=ft(O)),N&&(delete E.rel,delete E.href,E._cssText=N)}if("style"===x&&t.sheet&&!(t.innerText||k.textContent(t)||"").trim().length){var L=X((()=>ft(t.sheet)));L&&(E._cssText=L)}if("input"===x||"textarea"===x||"select"===x){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=St({element:t,type:At(t),tagName:x,value:F,maskInputOptions:h,maskInputFn:u}):B&&(E.checked=B)}if("option"===x&&(t.selected&&!h.select?E.selected=!0:delete E.selected),"dialog"===x&&t.open){try{E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){E.rr_open_mode="modal",E.ph_rr_could_not_detect_modal=!0}A.add("rr_open_mode")}if("canvas"===x&&y&&!(null==g?void 0:g()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((xt in n?n[xt]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(p.type,p.quality));else if(!("__context"in t)){var U=t.toDataURL(p.type,p.quality),W=s.createElement("canvas");W.width=t.width,W.height=t.height,U!==W.toDataURL(p.type,p.quality)&&(E.rr_dataURL=U)}var H,G,z=!1;if("img"===x&&m){Dt||(Dt=s.createElement("canvas"),Nt=Dt.getContext("2d"));var V=t,Y=V.currentSrc||V.getAttribute("src")||"<unknown-src>",q=V.crossOrigin,Z=(e,r)=>z?Mt({element:t,name:e,value:r,maskAllElementAttributes:f,maskAttributeFn:v}):r,J=()=>{te(V,"load",J);try{Dt.width=V.naturalWidth,Dt.height=V.naturalHeight,Nt.drawImage(V,0,0);var t=Dt.toDataURL(p.type,p.quality);E.rr_dataURL=Z("rr_dataURL",t)}catch(t){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J));console.warn("Cannot inline img src="+Y+"! Error: "+t)}"anonymous"===V.crossOrigin&&(q?E.crossOrigin=Z("crossOrigin",q):V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J)}if("audio"===x||"video"===x){var K=E;K.rr_mediaState=t.paused?"paused":"played",A.add("rr_mediaState"),K.rr_mediaCurrentTime=t.currentTime,K.rr_mediaPlaybackRate=t.playbackRate,K.rr_mediaMuted=t.muted,K.rr_mediaLoop=t.loop,K.rr_mediaVolume=t.volume}if(S||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),M){var tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null==(r=s.defaultView)?void 0:r.getComputedStyle(t);E={class:E.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null==(i=s.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(nt+((null==(n=s.defaultView)?void 0:n.scrollY)||0))+"px"},A.add("rr_width"),A.add("rr_height"),A.add("rr_left"),A.add("rr_top"),st&&(E.rr_position=st.position||"static",A.add("rr_position"),st.transform&&"none"!==st.transform&&(E.rr_transform=st.transform,A.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(E.rr_display=st.display,A.add("rr_display")))}if("iframe"!==x||w(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src),f||v)for(var ot of Object.entries(E)){var at=ot[0],ht=ot[1];"string"!=typeof ht&&null!==ht||(E[at]=Mt({element:t,name:at,value:ht,maskAllElementAttributes:f,maskAttributeFn:v,isGenerated:A.has(at)}))}z=!0;try{customElements.get(x)&&(H=!0)}catch(t){}return{type:c.Element,tagName:x,attributes:E,childNodes:[],isSVG:(G=t,Boolean("svg"===G.tagName||G.ownerSVGElement)||void 0),needBlock:M,rootId:C,isCustom:H}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:b,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r,i=e.needsMask,n=e.maskTextFn,s=e.rootId,o=k.parentNode(t),a=o&&o.tagName,h=k.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(Q(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var f=ft(o.sheet);f&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(f)&&(h=f)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=_t(h,qt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,k.parentElement(t)):h.replace(/[\S]/g,"*")),{type:c.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:s,maskTextFn:u,rootId:M});case t.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:c.Comment,textContent:k.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,keepIframeSrcFn:H,newlyAddedElement:z});if(!rt)return console.warn(t,"not serialized"),null;et=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===c.Comment)return!0;if(t.type===c.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"===Et(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ie(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ie(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ie(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ie(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ie(t.attributes.property).match(/^(og|twitter|fb):/)||ie(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ie(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(ie(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(ie(t.attributes.name))||ie(t.attributes.property).match(/^article:/)||ie(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(ie(t.attributes.name)))return!0}}return!1}(rt,b)&&(tt||rt.type!==c.Text||rt.isStyle||rt.textContent.replace(/^\s+|\s+$/gm,"").length)?Gt():Ht;var it=Object.assign(rt,{id:et});if(i.add(t,it),et===Ht)return null;I&&I(t);var nt=!u;if(it.type===c.Element){nt=nt&&!it.needBlock,delete it.needBlock;var ht=k.shadowRoot(t);ht&&at(ht)&&(it.isShadowHost=!0)}if((it.type===c.Document||it.type===c.Element)&&nt){b.headWhitespace&&it.type===c.Element&&"head"===it.tagName&&(tt=!1);var ut={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z};if(it.type===c.Element&&"textarea"===it.tagName&&void 0!==it.attributes.value);else for(var lt of Array.from(k.childNodes(t))){var ct=ue(lt,ut);ct&&it.childNodes.push(ct)}var vt=null;if(st(t)&&(vt=k.shadowRoot(t)))for(var dt of Array.from(k.childNodes(vt))){var pt=ue(dt,ut);pt&&(at(vt)&&(pt.isShadow=!0),it.childNodes.push(pt))}}var mt=k.parentNode(t);if(mt&&ot(mt)&&at(mt)&&(it.isShadow=!0),it.type===c.Element&&"iframe"===it.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),te(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?te(t,"load",o):(a=!0,te(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),te(t,"load",o)}}return t.addEventListener("load",o),()=>{te(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&T){var r=ue(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z});r&&T(t,r)}}),D);null==N||N(t,yt)}return it.type===c.Element&&"link"===it.tagName&&"stylesheet"===it.attributes.rel&&function(e,h,u){if(!ee.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var c=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(F){var e=ue(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y,maxDepth:Z});e&&F(t,e)}})()}finally{ee.delete(e),c.abort()}}},S=setTimeout(y,u);c.signal.addEventListener("abort",(()=>clearTimeout(S)),{once:!0}),e.addEventListener("load",y,{signal:c.signal,once:!0}),ee.set(e,c)}}}(t,0,U),it}function le(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}var fe=new RegExp(/(max|min)-device-(width|height)/.source,"g"),ce={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(fe)&&(t.params=t.params.replace(fe,"$1-$2"))}}}},ve={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function de(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function pe(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var me,ye={exports:{}};function ge(){if(me)return ye.exports;me=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ye.exports=e(),ye.exports.createColors=e,ye.exports}var we,be,Se,ke,Ce,Me,xe=pe(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ae(){if(be)return we;be=1;var t=ge(),e=xe;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return we=r,r.default=r,we}function Ee(){if(ke)return Se;ke=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(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)}}return Se=h,h.default=h,Se}function Re(){if(Me)return Ce;Me=1;var t=Ee();function e(e,r){new t(r).stringify(e)}return Ce=e,e.default=e,Ce}var Ie,Te,Oe,_e,De,Ne,Le,Fe,Be,Pe,je,Ue,We,He,Ge,ze,Ve,$e,Ye,qe,Ze,Je,Xe,Ke,Qe,tr,er,rr,ir,nr,sr,or,ar,hr,ur,lr,fr,cr,vr,dr,pr,mr,yr,gr,wr,br,Sr,kr,Cr,Mr,xr,Ar,Er,Rr={};function Ir(){return Ie||(Ie=1,Rr.isClean=Symbol("isClean"),Rr.my=Symbol("my")),Rr}function Tr(){if(Oe)return Te;Oe=1;var t=Ae(),e=Ee(),r=Re(),i=Ir(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var 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(var e in void 0===t&&(t={}),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){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=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:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Te=a,a.default=a,Te}function Or(){if(De)return _e;De=1;var t=Tr();class e extends t{constructor(t){super(t),this.type="comment"}}return _e=e,e.default=e,_e}function _r(){if(Le)return Ne;Le=1;var t=Tr();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Ne=e,e.default=e,Ne}function Dr(){if(Be)return Fe;Be=1;var t,e,r,i,n=Or(),s=_r(),o=Tr(),a=Ir(),h=a.isClean,u=a.my;class l extends o{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(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"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,r){return t[e]===r||(t[e]=r,"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){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Fe=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Fe}function Nr(){if(je)return Pe;je=1;var t=Dr();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Pe=e,e.default=e,t.registerAtRule(e),Pe}function Lr(){if(We)return Ue;We=1;var t,e,i=Dr();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Ue=n,n.default=n,Ue}function Fr(){return Ge?He:(Ge=1,He={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Br(){if(Ve)return ze;Ve=1;var t=xe.existsSync,e=xe.readFileSync,r=xe.dirname,i=xe.isAbsolute,n=xe.join,s=xe.relative,o=xe.sep,a=xe.SourceMapConsumer,h=xe.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}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){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"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 a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return ze=u,u.default=u,ze}function Pr(){if(Ye)return $e;Ye=1;var t=Fr().nanoid,e=xe.isAbsolute,i=xe.resolve,n=xe.SourceMapConsumer,s=xe.SourceMapGenerator,o=xe.fileURLToPath,a=xe.pathToFileURL,h=Ae(),u=Br(),l=xe,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return $e=p,p.default=p,l&&l.registerInput&&l.registerInput(p),$e}function jr(){if(Ze)return qe;Ze=1;var t,e,r=Dr();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},qe=i,i.default=i,r.registerRoot(i),qe}function Ur(){if(Xe)return Je;Xe=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Je=t,t.default=t,Je}function Wr(){if(Qe)return Ke;Qe=1;var t=Dr(),e=Ur();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Ke=r,r.default=r,t.registerRule(r),Ke}function Hr(){if(ir)return rr;ir=1;var t=xe.dirname,e=xe.relative,r=xe.resolve,i=xe.sep,n=xe.SourceMapConsumer,s=xe.SourceMapGenerator,o=xe.pathToFileURL,a=Pr(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return rr=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}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;var 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(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Gr(){if(sr)return nr;sr=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return nr=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function zr(){if(ar)return or;ar=1;var t=Nr(),e=Or(),r=_r(),i=jr(),n=Wr(),s=Gr(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return or=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.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){var e=new n;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){var 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){var 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){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[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,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var 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})}}}function Vr(){if(ur)return hr;ur=1;var t=Dr(),e=Pr(),r=zr();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return hr=i,i.default=i,t.registerParse(i),hr}function $r(){if(fr)return lr;fr=1;var t=Dr(),e=Ir().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return lr=r,r.default=r,lr}function Yr(){if(vr)return cr;vr=1;var t=$r();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return cr=e,e.default=e,cr}function qr(){if(pr)return dr;pr=1;var t={};return dr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Zr(){if(yr)return mr;yr=1;var t=Dr(),i=Lr(),n=Hr(),s=Vr(),o=Yr(),a=jr(),h=Re(),u=Ir(),l=u.isClean,f=u.my,c=qr(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},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){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}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){var 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();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(var t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},mr=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),mr}function Jr(){if(Cr)return kr;Cr=1;var t=Nr(),e=Or(),n=Dr(),o=Ae(),a=_r(),h=Lr(),u=function(){if(er)return tr;er=1;var t=Nr(),e=Or(),n=_r(),o=Pr(),a=Br(),h=jr(),u=Wr();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:o.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(o,a,l){var f,c=r({},o);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,s);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+o.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return tr=c,c.default=c,tr}(),l=Pr(),f=Zr(),c=Ur(),v=Tr(),d=Vr(),p=function(){if(Sr)return br;Sr=1;var t=Lr(),e=Zr(),r=function(){if(wr)return gr;wr=1;var t=Hr(),e=Vr(),r=Yr(),i=Re(),n=qr();class s{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;var t,r=e;try{t=r(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(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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[]}}return gr=s,s.default=s,gr}(),i=jr();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return br=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),br}(),m=Yr(),y=jr(),g=Wr(),w=Re(),b=$r();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=o,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),kr=S,S.default=S,kr}var Xr=de(function(){if(Er)return Ar;Er=1;var t=Jr().Input,e=function(){if(xr)return Mr;xr=1;var t=Or(),e=zr(),r=Gr();return Mr=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(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){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Ar=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),Kr=de(Jr()),Qr={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 ti(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=Kr([ce,ve]).process(t,{parser:Xr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function ei(){return{stylesWithHoverClass:new Map}}var ri=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ii=new Set;function ni(t,e){var r,i,n,s=e.doc,o=e.mirror,a=e.skipChild,h=void 0!==a&&a,u=e.hackCss,l=void 0===u||u,f=e.afterAppend,v=e.cache,d=null;if(o.has(t.id)){var p=o.getNode(t.id),m=o.getMeta(p);if(n=t,(i=m)&&n&&i.type===n.type&&(i.type===c.Document?i.compatMode===n.compatMode:i.type===c.DocumentType?i.name===n.name&&i.publicId===n.publicId&&i.systemId===n.systemId:i.type===c.Comment||i.type===c.Text||i.type===c.CDATA?i.textContent===n.textContent:i.type===c.Element&&i.tagName===n.tagName&&JSON.stringify(i.attributes)===JSON.stringify(n.attributes)&&i.isSVG===n.isSVG&&i.needBlock===n.needBlock))return o.getNode(t.id);d=p}var y=function(t,e){var r,i=e.doc,n=e.hackCss,s=e.cache;switch(t.type){case c.Document:return i.implementation.createDocument(null,"",null);case c.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case c.Element:var o,a=function(t){var e=Qr[t.tagName]?Qr[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(ri.has(t))return!1;if(!t.includes("-"))return!1;var 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){ii.has(t.tagName)||(ii.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var f="textarea"===a&&"value"===u,v="style"===a&&"_cssText"===u;if(v&&n&&"string"==typeof l&&(l=ti(l,s)),!f&&!v||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Et(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case c.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ti(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case c.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case c.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:s,hackCss:l,cache:v});if(!y)return null;if(null==(r=null==d?void 0:d.parentNode)||r.removeChild(d),t.rootId&&o.getNode(t.rootId)!==s&&o.replace(t.rootId,s),t.type===c.Document&&(s.close(),s.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==c.DocumentType&&s.write(t.childNodes[0].type===c.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" "">'),y=s),o.add(y,t),(t.type===c.Document||t.type===c.Element)&&!h){var g=function(){var e=ni(w,{doc:s,mirror:o,skipChild:!1,hackCss:l,afterAppend:f,cache:v});if(!e)return console.warn("Failed to rebuild",w),1;if(w.isShadow&&st(y)&&y.shadowRoot)y.shadowRoot.appendChild(e);else if(t.type===c.Document&&w.type==c.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),y.appendChild(e),r.appendChild(i)):y.appendChild(e)}else if(t.type===c.Document&&w.type===c.DocumentType){var n=y.doctype;n&&y.removeChild(n),y.firstChild&&1===y.firstChild.nodeType?y.insertBefore(e,y.firstChild):y.appendChild(e)}else y.appendChild(e);f&&f(e,w.id)};for(var w of t.childNodes)g()}return y}var si=Object.defineProperty,oi=(t,e,r)=>((t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),ai=Object.defineProperty,hi=(t,e,r)=>((t,e,r)=>e in t?ai(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function ui(t,e){return-1!==t.indexOf(e)}var li={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},ci={};function vi(t){if(ci[t])return ci[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in li?li[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in fi?fi[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return ci[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(ui(h=navigator.userAgent,"AppleWebKit")&&!ui(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),ci[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var di={};function pi(t,e,r){var i,n=t+"."+String(r);if(di[n])return di[n].call(e);var s=vi(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(di[n]=o,o.call(e)):e[r]}var mi={};function yi(t,e,r){var i=t+"."+String(r);if(mi[i])return mi[i].bind(e);var n=vi(t)[r];return"function"!=typeof n?e[r]:(mi[i]=n,n.bind(e))}var gi={childNodes:t=>pi("Node",t,"childNodes"),parentNode:t=>pi("Node",t,"parentNode"),parentElement:t=>pi("Node",t,"parentElement"),textContent:t=>pi("Node",t,"textContent"),contains:(t,e)=>yi("Node",t,"contains")(e),getRootNode:t=>yi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?pi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?pi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>yi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>yi("Element",t,"querySelectorAll")(e),mutationObserver:()=>vi("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}},wi=class{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var 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)){var r=gi.shadowRoot(t);r&&this.removeNodeFromMap(r),"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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function bi(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Si,ki={exports:{}};function Ci(){if(Si)return ki.exports;Si=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ki.exports=e(),ki.exports.createColors=e,ki.exports}var Mi,xi,Ai,Ei,Ri,Ii,Ti=bi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Oi(){if(xi)return Mi;xi=1;var t=Ci(),e=Ti;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Mi=r,r.default=r,Mi}function _i(){if(Ei)return Ai;Ei=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(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)}}return Ai=h,h.default=h,Ai}function Di(){if(Ii)return Ri;Ii=1;var t=_i();function e(e,r){new t(r).stringify(e)}return Ri=e,e.default=e,Ri}var Ni,Li,Fi,Bi,Pi,ji,Ui,Wi,Hi,Gi,zi,Vi,$i,Yi,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn,on,an,hn,un,ln,fn,cn,vn,dn,pn,mn,yn,gn,wn,bn,Sn,kn,Cn,Mn,xn,An,En,Rn,In,Tn,On,_n,Dn,Nn={};function Ln(){return Ni||(Ni=1,Nn.isClean=Symbol("isClean"),Nn.my=Symbol("my")),Nn}function Fn(){if(Fi)return Li;Fi=1;var t=Oi(),e=_i(),r=Di(),i=Ln(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var 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(var e in void 0===t&&(t={}),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){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=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:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Li=a,a.default=a,Li}function Bn(){if(Pi)return Bi;Pi=1;var t=Fn();class e extends t{constructor(t){super(t),this.type="comment"}}return Bi=e,e.default=e,Bi}function Pn(){if(Ui)return ji;Ui=1;var t=Fn();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return ji=e,e.default=e,ji}function jn(){if(Hi)return Wi;Hi=1;var t,e,r,i,n=Bn(),s=Pn(),o=Fn(),a=Ln(),h=a.isClean,u=a.my;class l extends o{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(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"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,r){return t[e]===r||(t[e]=r,"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){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Wi=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Wi}function Un(){if(zi)return Gi;zi=1;var t=jn();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Gi=e,e.default=e,t.registerAtRule(e),Gi}function Wn(){if($i)return Vi;$i=1;var t,e,i=jn();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Vi=n,n.default=n,Vi}function Hn(){return qi?Yi:(qi=1,Yi={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Gn(){if(Ji)return Zi;Ji=1;var t=Ti.existsSync,e=Ti.readFileSync,r=Ti.dirname,i=Ti.isAbsolute,n=Ti.join,s=Ti.relative,o=Ti.sep,a=Ti.SourceMapConsumer,h=Ti.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}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){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"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 a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Zi=u,u.default=u,Zi}function zn(){if(Ki)return Xi;Ki=1;var t=Hn().nanoid,e=Ti.isAbsolute,i=Ti.resolve,n=Ti.SourceMapConsumer,s=Ti.SourceMapGenerator,o=Ti.fileURLToPath,a=Ti.pathToFileURL,h=Oi(),u=Gn(),l=Ti,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Xi=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Xi}function Vn(){if(tn)return Qi;tn=1;var t,e,r=jn();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Qi=i,i.default=i,r.registerRoot(i),Qi}function $n(){if(rn)return en;rn=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return en=t,t.default=t,en}function Yn(){if(sn)return nn;sn=1;var t=jn(),e=$n();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return nn=r,r.default=r,t.registerRule(r),nn}function qn(){if(un)return hn;un=1;var t=Ti.dirname,e=Ti.relative,r=Ti.resolve,i=Ti.sep,n=Ti.SourceMapConsumer,s=Ti.SourceMapGenerator,o=Ti.pathToFileURL,a=zn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return hn=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}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;var 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(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Zn(){if(fn)return ln;fn=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return ln=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Jn(){if(vn)return cn;vn=1;var t=Un(),e=Bn(),r=Pn(),i=Vn(),n=Yn(),s=Zn(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return cn=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.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){var e=new n;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){var 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){var 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){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[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,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var 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})}}}function Xn(){if(pn)return dn;pn=1;var t=jn(),e=zn(),r=Jn();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return dn=i,i.default=i,t.registerParse(i),dn}function Kn(){if(yn)return mn;yn=1;var t=jn(),e=Ln().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return mn=r,r.default=r,mn}function Qn(){if(wn)return gn;wn=1;var t=Kn();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return gn=e,e.default=e,gn}function ts(){if(Sn)return bn;Sn=1;var t={};return bn=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function es(){if(Cn)return kn;Cn=1;var t=jn(),i=Wn(),n=qn(),s=Xn(),o=Qn(),a=Vn(),h=Di(),u=Ln(),l=u.isClean,f=u.my,c=ts(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},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){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}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){var 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();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(var t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},kn=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),kn}function rs(){if(In)return Rn;In=1;var t=Un(),e=Bn(),n=jn(),s=Oi(),a=Pn(),h=Wn(),u=function(){if(an)return on;an=1;var t=Un(),e=Bn(),n=Pn(),s=zn(),a=Gn(),h=Vn(),u=Yn();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:s.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(s,a,l){var f,c=r({},s);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,o);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+s.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return on=c,c.default=c,on}(),l=zn(),f=es(),c=$n(),v=Fn(),d=Xn(),p=function(){if(En)return An;En=1;var t=Wn(),e=es(),r=function(){if(xn)return Mn;xn=1;var t=qn(),e=Xn(),r=Qn(),i=Di(),n=ts();class s{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;var t,r=e;try{t=r(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(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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[]}}return Mn=s,s.default=s,Mn}(),i=Vn();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return An=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),An}(),m=Qn(),y=Vn(),g=Yn(),w=Di(),b=Kn();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=s,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),Rn=S,S.default=S,Rn}!function(){if(Dn)return _n;Dn=1;var t=rs().Input,e=function(){if(On)return Tn;On=1;var t=Bn(),e=Jn(),r=Zn();return Tn=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(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){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();_n=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),rs();var is=(t=>(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))(is||{});function ns(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=us(r);e.push(n+": "+i+";")}}return e.join(" ")}var ss=/-([a-z])/g,os=/^--[a-zA-Z0-9-]+$/,as=t=>os.test(t)?t:t.replace(ss,((t,e)=>e?e.toUpperCase():"")),hs=/\B([A-Z])/g,us=t=>t.replace(hs,"-$1").toLowerCase();class ls{constructor(){oi(this,"parentElement",null),oi(this,"parentNode",null),oi(this,"ownerDocument"),oi(this,"firstChild",null),oi(this,"lastChild",null),oi(this,"previousSibling",null),oi(this,"nextSibling",null),oi(this,"ELEMENT_NODE",1),oi(this,"TEXT_NODE",3),oi(this,"nodeType"),oi(this,"nodeName"),oi(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof ls))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,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"}}class fs extends ls{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),oi(this,"nodeType",9),oi(this,"nodeName","#document"),oi(this,"compatMode","CSS1Compat"),oi(this,"RRNodeType",is.Document),oi(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===is.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===is.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===is.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===is.Element||e===is.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===is.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=bs(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===is.Element||r===is.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===is.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Ss(this,t,e);return i.parentElement=null,i}removeChild(t){return ks(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var 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){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new fs}createDocumentType(t,e,r){var i=new cs(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new vs(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ms(t);return e.ownerDocument=this,e}createComment(t){var e=new ys(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new gs(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class cs extends ls{constructor(t,e,r){super(),oi(this,"nodeType",10),oi(this,"RRNodeType",is.DocumentType),oi(this,"name"),oi(this,"publicId"),oi(this,"systemId"),oi(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class vs extends ls{constructor(t){super(),oi(this,"nodeType",1),oi(this,"RRNodeType",is.Element),oi(this,"tagName"),oi(this,"attributes",{}),oi(this,"shadowRoot",null),oi(this,"scrollLeft"),oi(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var 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 ws(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[as(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=as(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=ns(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=as(t),n=r[e]||"";return delete r[e],this.attributes.style=ns(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return bs(this,t)}insertBefore(t,e){return Ss(this,t,e)}removeChild(t){return ks(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class ds extends vs{constructor(){super(...arguments),oi(this,"currentTime"),oi(this,"volume"),oi(this,"paused"),oi(this,"muted"),oi(this,"playbackRate"),oi(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class ps extends vs{constructor(){super(...arguments),oi(this,"tagName","DIALOG"),oi(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")}}class ms extends ls{constructor(t){super(),oi(this,"nodeType",3),oi(this,"nodeName","#text"),oi(this,"RRNodeType",is.Text),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class ys extends ls{constructor(t){super(),oi(this,"nodeType",8),oi(this,"nodeName","#comment"),oi(this,"RRNodeType",is.Comment),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class gs extends ls{constructor(t){super(),oi(this,"nodeName","#cdata-section"),oi(this,"nodeType",4),oi(this,"RRNodeType",is.CDATA),oi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class ws{constructor(t,e){var r=this;if(oi(this,"onChange"),oi(this,"classes",[]),oi(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),oi(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function bs(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 Ss(t,e,r){if(!r)return bs(t,e);if(r.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===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function ks(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 Cs=(t=>(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))(Cs||{}),Ms={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},xs={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"},As=null;function Es(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!As&&(As=new WeakSet,setTimeout((()=>{As=null}),0)),!Ts(t,e)){var s=Is(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case is.Document:if(!Os(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==As||As.add(t))}break;case is.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;Es(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Rs(a.shadowRoot,h.shadowRoot,r,i)),function(t,e,r){var i=t.attributes,n=e.attributes,s=function(){var i=n[o],s=r.getMeta(e);if((null==s?void 0:s.isSVG)&&Ms[o])t.setAttributeNS(Ms[o],o,i);else if("CANVAS"===e.tagName&&"rr_dataURL"===o){var a=document.createElement("img");a.src=i,a.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(a,0,0,a.width,a.height)}}else{if("IFRAME"===e.tagName&&"srcdoc"===o)return 1;try{t.getAttribute(o)!==i&&t.setAttribute(o,i)}catch(t){console.warn(t)}}};for(var o in n)s();for(var a of Array.from(i)){var h=a.name;h in n||t.removeAttribute(h)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),Rs(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case is.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case is.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;if(null!==u.rr_dataURL){var l=document.createElement("img");l.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(l,0,0,l.width,l.height)},l.src=u.rr_dataURL}u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var f=s.sheet;f&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,f)));break;case"DIALOG":var c=s,v=o,d=c.open,p=c.matches("dialog:modal"),m=v.open,y=v.isModal,g=p!==y,w=d!==m;if((g||d&&w)&&c.close(),m&&(w||g))try{y?c.showModal():c.show()}catch(t){console.warn(t)}}break;case is.Text:case is.Comment:case is.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==As?void 0:As.has(t))&&(As.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function Rs(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Os(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Os(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Os(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Os(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Os(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Is(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Is(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)Es(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Is(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Ts(o,t))return o;switch(t.RRNodeType){case is.Document:o=new Document;break;case is.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case is.Element:var a=t.tagName.toLowerCase();a=xs[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Ms.svg,a):document.createElement(t.tagName);break;case is.Text:o=document.createTextNode(t.data);break;case is.Comment:o=document.createComment(t.data);break;case is.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==As||As.add(o)}catch(t){}return o}function Ts(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Os(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Ts(t,e)}class _s extends fs{constructor(t){super(),oi(this,"UNSERIALIZED_STARTING_ID",-2),oi(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),oi(this,"mirror",new zs),oi(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.u--}createDocument(t,e,r){return new _s}createDocumentType(t,e,r){var i=new Ds(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Ls(r);break;case"IFRAME":e=new js(r,this.mirror);break;case"CANVAS":e=new Bs(r);break;case"STYLE":e=new Ps(r);break;case"DIALOG":e=new Fs(r);break;default:e=new Ns(r)}return e.ownerDocument=this,e}createComment(t){var e=new Ws(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Hs(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Us(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}}var Ds=cs;class Ns extends vs{constructor(){super(...arguments),oi(this,"inputData",null),oi(this,"scrollData",null)}}class Ls extends ds{}class Fs extends ps{}class Bs extends Ns{constructor(){super(...arguments),oi(this,"rr_dataURL",null),oi(this,"canvasMutations",[])}getContext(){return null}}class Ps extends Ns{constructor(){super(...arguments),oi(this,"rules",[])}}class js extends Ns{constructor(t,e){super(t),oi(this,"contentDocument",new _s),this.contentDocument.mirror=e}}var Us=ms,Ws=ys,Hs=gs;function Gs(t,e,i,n){var s,o;switch(t.nodeType){case Cs.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case Cs.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case Cs.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case Cs.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case Cs.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case Cs.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case Cs.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var f=i.getMeta(t);return e instanceof _s&&(f||(f=Vs(s,e.unserializedId),i.add(t,f)),e.mirror.add(s,r({},f))),s}class zs{constructor(){oi(this,"idNodeMap",new Map),oi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var 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){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Vs(t,e){switch(t.RRNodeType){case is.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case is.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case is.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case is.Text:case is.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case is.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function $s(t,e){return-1!==t.indexOf(e)}var Ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},qs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Zs={};function Js(t){if(Zs[t])return Zs[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Ys?Ys[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in qs?qs[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Zs[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?($s(h=navigator.userAgent,"AppleWebKit")&&!$s(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Zs[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Xs={};function Ks(t,e,r){var i,n=t+"."+String(r);if(Xs[n])return Xs[n].call(e);var s=Js(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Xs[n]=o,o.call(e)):e[r]}var Qs={};function to(t,e,r){var i=t+"."+String(r);if(Qs[i])return Qs[i].bind(e);var n=Js(t)[r];return"function"!=typeof n?e[r]:(Qs[i]=n,n.bind(e))}function eo(){return Js("MutationObserver").constructor}function ro(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t[e];"function"==typeof r&&r.__rrweb_layer__;){var i=r.__rrweb_layer__;if(i.next===s)return void(i.next=n.next);r=i.next}else t[e]=n.next}}catch(t){return()=>{}}}var io={childNodes:t=>Ks("Node",t,"childNodes"),parentNode:t=>Ks("Node",t,"parentNode"),parentElement:t=>Ks("Node",t,"parentElement"),textContent:t=>Ks("Node",t,"textContent"),contains:(t,e)=>to("Node",t,"contains")(e),getRootNode:t=>to("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Ks("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Ks("Element",t,"shadowRoot"):null,querySelector:(t,e)=>to("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>to("Element",t,"querySelectorAll")(e),mutationObserver:eo,patch:ro};function no(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>so(r,t,e,i)}function so(t,e,r,i){oo((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function oo(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var ao="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.",ho={map:{},getId(){return console.error(ao),-1},getNode(){return console.error(ao),null},removeNodeFromMap(){console.error(ao)},has(){return console.error(ao),!1},reset(){console.error(ao)}};function uo(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function lo(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout((()=>{try{r.set.call(this,t)}catch(t){}}),0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>lo(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ho=new Proxy(ho,{get(t,e,r){return"map"===e&&console.error(ao),Reflect.get(t,e,r)}}));var fo=Date.now;function co(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=io.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=io.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function vo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function po(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mo(t){return t?t.nodeType===t.ELEMENT_NODE?t:io.parentElement(t):null}function yo(t,e,r,i){if(!t)return!1;var n=mo(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Kt(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function go(t,e){return-1!==e.getId(t)}function wo(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Ht}function bo(t,e){if(ot(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=io.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||bo(i,e))}function So(t){return Boolean(t.changedTouches)}function ko(t){void 0===t&&(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 Co(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Mo(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Mo(t.children[r],e)}function xo(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Ao(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Eo(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Eo(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Ro(t){return!!t&&(t instanceof ls&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(io.shadowRoot(t)))}function Io(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Io(r.cssRules,e.slice(1)):null}function To(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Oo(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(fo=()=>(new Date).getTime());class _o{constructor(){u(this,"id",1),u(this,"styleIDMap",new WeakMap),u(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){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}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 Do(t){var e,r=null;return"getRootNode"in t&&(null==(e=io.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&io.host(io.getRootNode(t))&&(r=io.host(io.getRootNode(t))),r}function No(t){for(var e,r=t;e=Do(r);)r=e;return r}function Lo(t){var e=t.ownerDocument;if(!e)return!1;var r=No(t);return io.contains(e,r)}function Fo(t){var e=t.ownerDocument;return!!e&&(io.contains(e,t)||Lo(t))}var Bo=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:_o,get _mirror(){return ho},callSafely:oo,closestElementOfNode:mo,getBaseDimension:Eo,getNestedRule:Io,getPositionsAndIndex:To,getRootShadowHost:No,getShadowHost:Do,getWindowHeight:vo,getWindowScroll:co,getWindowWidth:po,hasShadowRoot:Ro,hookSetter:lo,inDom:Fo,isAncestorRemoved:bo,isBlocked:yo,isIgnored:wo,isSerialized:go,isSerializedIframe:xo,isSerializedStylesheet:Ao,iterateResolveTree:Mo,legacy_isTouchEvent:So,get nowTimestamp(){return fo},on:no,polyfill:ko,queueToResolveTrees:Co,removeEventListenerSafely:so,shadowHostInDom:Lo,throttle:uo,uniqueTextMutations:Oo},Symbol.toStringTag,{value:"Module"})),Po=(t=>(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))(Po||{}),jo="rrweb/fullscreen",Uo=(t=>(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))(Uo||{}),Wo=(t=>(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))(Wo||{}),Ho=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ho||{}),Go=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Go||{}),zo=(t=>(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))(zo||{}),Vo=(t=>(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))(Vo||{}),$o=(t=>(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))($o||{});function Yo(t){return"__ln"in t}class qo{constructor(){u(this,"length",0),u(this,"head",null),u(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Yo(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Yo(t.nextSibling)&&t.nextSibling.__ln.previous){var 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){var 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--)}}var Zo,Jo=(t,e)=>t+"@"+e;class Xo{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",new WeakMap),u(this,"generatedAttributes",new WeakMap),u(this,"removes",[]),u(this,"mapRemoves",[]),u(this,"movedMap",{}),u(this,"addedSet",new Set),u(this,"movedSet",new Set),u(this,"droppedSet",new Set),u(this,"removesSubTreeCache",new Set),u(this,"mutationCb"),u(this,"blockClass"),u(this,"blockSelector"),u(this,"maskTextClass"),u(this,"maskTextSelector"),u(this,"inlineStylesheet"),u(this,"maskInputOptions"),u(this,"maskTextFn"),u(this,"maskInputFn"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"keepIframeSrcFn"),u(this,"recordCanvas"),u(this,"canvasMaskingConfigured"),u(this,"inlineImages"),u(this,"slimDOMOptions"),u(this,"dataURLOptions"),u(this,"doc"),u(this,"mirror"),u(this,"iframeManager"),u(this,"stylesheetManager"),u(this,"shadowDomManager"),u(this,"canvasManager"),u(this,"processedNodeManager"),u(this,"unattachedDoc"),u(this,"canvasManagerReleased",!1),u(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),u(this,"emit",(()=>{if(!this.frozen&&!this.locked){var t,e,r=M(),i=I();try{this.processBufferedMutations()}finally{t=M()-r,e=i,_>0||O(t,null!=e?e:x)||t>W.slowestBatchMs&&(W.slowestBatchMs=t)}}})),u(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new qo,i=t=>{for(var e=t,r=Ht;r===Ht;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=io.parentNode(n);if(s&&Fo(n)&&"TEXTAREA"!==s.tagName){var o=ot(s)?this.mirror.getId(Do(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ue(n,{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=>{xo(t,this.mirror)&&this.iframeManager.addIframe(t),Ao(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Ro(n)&&this.shadowDomManager.addShadowRoot(io.shadowRoot(n),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)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Qo(this.removesSubTreeCache,s)&&!this.movedSet.has(io.parentNode(s))||n(s);for(var o of this.addedSet)ta(this.droppedSet,o)||Qo(this.removesSubTreeCache,o)?ta(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(io.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var f=r.tail;f;){var c=f;if(f=f.previous,c){var v=this.mirror.getId(io.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==v){h=c;break}var d=io.parentNode(c.value);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=io.host(d);if(-1!==this.mirror.getId(p)){h=c;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=io.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var e,r=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var s of Object.entries(r)){var o=s[0],a=s[1];"string"!=typeof a&&null!==a||(r[o]=Mt({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(e=this.generatedAttributes.get(t.node))?void 0:e.has(o)}))}return{id:this.mirror.getId(t.node),attributes:r}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(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={},this.mutationCb(m))})),u(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),u(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(io.childNodes(t),(t=>io.textContent(t)||"")).join("");e.attributes.value=St({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:At(t),value:r,maskInputFn:this.maskInputFn})})),u(this,"processMutation",(t=>{var e;if(!wo(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var r=io.textContent(t.target);yo(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue||this.texts.push({value:Qt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,mo(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":var i,n=t.target,s=t.attributeName,o=null!==(i=t.attributeNamespace)&&void 0!==i?i:null,a=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(n,s,o),h=o?n.getAttributeNS(o,s):t.target.getAttribute(s);if("value"===a){var u=n,l=At(u);h=St({element:u,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:l,value:h,maskInputFn:this.maskInputFn})}if(yo(t.target,this.blockClass,this.blockSelector,!1)||h===t.oldValue)return;var f=this.attributeMap.get(t.target),c="IFRAME"===n.tagName&&"src"===a;if(c&&!this.keepIframeSrcFn(h)&&n.contentDocument)return;if(f||(this.attributes.push(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,f)),"type"===a&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Xt(n.tagName,a)){var v=Jt(this.doc,kt(n.tagName),kt(a),h,n,this.dataURLOptions);if(c&&!this.keepIframeSrcFn(h)&&(a="rr_src"),f.attributes[a]=v,null==(e=this.generatedAttributes.get(t.target))||e.delete(a),"style"===a){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=n.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?f.styleDiff[m]=""===g?y:[y,g]:f._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(f.styleDiff[w]=!1)}else if("open"===a&&"DIALOG"===n.tagName){f.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(yo(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=>{var r=this.mirror.getId(e),i=ot(t.target)?this.mirror.getId(io.host(t.target)):this.mirror.getId(t.target);yo(t.target,this.blockClass,this.blockSelector,!1)||wo(e,this.mirror,this.slimDOMOptions)||!go(e,this.mirror)||(this.addedSet.has(e)?(Ko(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||bo(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Jo(r,i)]?Ko(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ot(t.target)||!at(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),io.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),u(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(wo(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[Jo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);yo(t,this.blockClass,this.blockSelector,!1)||(io.childNodes(t).forEach((t=>this.genAdds(t))),Ro(t)&&io.childNodes(io.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Ko(t,e){t.delete(e),io.childNodes(e).forEach((e=>Ko(t,e)))}function Qo(t,e,r){return 0!==t.size&&function(t,e,r){var i=io.parentNode(e);return!!i&&t.has(i)}(t,e)}function ta(t,e){return 0!==t.size&&ea(t,e)}function ea(t,e){var r=io.parentNode(e);return!!r&&(!!t.has(r)||ea(t,r))}var ra=function(t,e){return void 0===e&&(e="rrweb"),Zo?function(){try{return t(...arguments)}catch(t){if(Zo&&!0===Zo(t,e))return;throw t}}:t},ia=[];function na(t){try{if("composedPath"in t){var 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 sa(t,e){var r,i=new Xo;i.init(t);try{r=new(eo())(ra(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),ia.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function oa(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=na(t);if(o&&!yo(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=co(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[no("scroll",ra(uo(ra((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(no("scrollend",ra(h),r)),()=>u.forEach((t=>t()))}function aa(t,e){for(var r=ia.length-1;r>=0;r--){var i=ia[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),ia.splice(r,1))}}}var ha=["INPUT","TEXTAREA","SELECT"],ua=new WeakMap;function la(t){return function t(e,r){if(da("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||da("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||da("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||da("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function fa(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function ca(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:io.host(e));var a="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,h=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&h?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var t;return null==(t=h.get)?void 0:t.call(this)},set(t){var e,r;try{r=null==(e=h.set)?void 0:e.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),ra((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function va(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var o,a,h,u,l,f,c,v,d,p,m,y,g=[],w=ra((()=>{if(n){n.destroy(),n.reset();var e=ia.indexOf(n);-1!==e&&ia.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),g.forEach((t=>t()))}));try{if(t.recordDOM){var b=sa(t,t.doc);i=b.observer,n=b.buffer}for(var S of(g.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=uo(ra((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=ra(uo(ra((t=>{var e=na(t),r=So(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=fo()),h.push({x:i,y:o,id:n.getId(e),timeOffset:fo()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?Uo.Drag:t instanceof MouseEvent?Uo.MouseMove:Uo.TouchMove)})),o,{trailing:!1})),f=[no("mousemove",l,i),no("touchmove",l,i),no("drag",l,i)];return ra((()=>{f.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mouseInteractionCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Wo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=kt(t),h=(t=>i=>{var a=na(i);if(!yo(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Ho.Mouse;break;case"touch":h=Ho.Touch;break;case"pen":h=Ho.Pen}h===Ho.Touch&&(Wo[t]===Wo.MouseDown?u="TouchStart":Wo[t]===Wo.MouseUp&&(u="TouchEnd"))}else So(i)&&(h=Ho.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Ho.Touch||u.startsWith("Mouse")&&h===Ho.Mouse)&&(h=null)):Wo[t]===Wo.Click&&(h=l,l=null);var f=So(i)?i.changedTouches[0]:i;if(f){var c=n.getId(a),v=f.clientX,d=f.clientY;ra(e)(r({type:Wo[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Wo[t]){case Wo.MouseDown:case Wo.MouseUp:a=a.replace("mouse","pointer");break;case Wo.TouchStart:case Wo.TouchEnd:return}u.push(no(a,h,i))})),ra((()=>{u.forEach((t=>t()))}))}(t)),g.push(oa(t)),g.push((d=t.viewportResizeCb,p=s,m=-1,y=-1,no("resize",ra(uo(ra((()=>{var t=vo(),e=po();m===t&&y===e||(d({width:Number(e),height:Number(t)}),m=t,y=e)})),200)),p))),g.push(function(t){var e=t.inputCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=na(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=io.parentElement(e)),e&&c&&ha.indexOf(c)>=0&&!yo(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=At(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=St({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:r}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&i.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(t,i){var s=ua.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ua.set(t,i);var o=n.getId(t);ra(e)(r({},i,{id:o}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>no(t,ra(c),i))),p=i.defaultView;if(!p)return()=>{d.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((t=>lo(t[0],t[1],{set(){ra(c)({target:this,isTrusted:!1})}},!1,p)))),ra((()=>{d.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=ra((t=>uo(ra((s=>{var o=na(s);if(o&&!yo(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}})),s.media||500))),h=[no("play",a(zo.Play),o),no("pause",a(zo.Pause),o),no("seeked",a(zo.Seeked),o),no("volumechange",a(zo.VolumeChange),o),no("ratechange",a(zo.RateChange),o)];return ra((()=>{h.forEach((t=>t()))}))}(t)),t.recordDOM&&(g.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ra(((t,e,s)=>{var o=s[0],a=s[1];n.onCssomSheetMutation(e);var h=fa(e,i,n.styleMirror),u=h.id,l=h.styleId;return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:o,index:a}]}),t.apply(e,s)}),"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:ra(((t,e,s)=>{var o=s[0];n.onCssomSheetMutation(e);var a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,removes:[{index:o}]}),t.apply(e,s)}),"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ra(((t,e,s)=>{var o=s[0],a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,replace:o}),t.apply(e,s)}),"host")})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:ra(((t,e,s)=>{var o=s[0],a=fa(e,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,replaceSync:o}),t.apply(e,s)}),"host")}));var l={};pa("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(pa("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),pa("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),pa("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var f={};return Object.entries(l).forEach((t=>{var e=t[0],s=t[1];f[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(f[e].insertRule,{apply:ra(((t,e,s)=>{var o=s[0],a=s[1];n.onCssomSheetMutation(e.parentStyleSheet);var h=fa(e.parentStyleSheet,i,n.styleMirror),u=h.id,l=h.styleId;return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:o,index:[...la(e),a||0]}]}),t.apply(e,s)}),"host")}),s.prototype.deleteRule=new Proxy(f[e].deleteRule,{apply:ra(((t,e,s)=>{var o=s[0];n.onCssomSheetMutation(e.parentStyleSheet);var a=fa(e.parentStyleSheet,i,n.styleMirror),h=a.id,u=a.styleId;return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,removes:[{index:[...la(e),o]}]}),t.apply(e,s)}),"host")})})),ra((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var e=t[0],r=t[1];r.prototype.insertRule=f[e].insertRule,r.prototype.deleteRule=f[e].deleteRule}))}))}(t,{win:s})),g.push(ca(t,t.doc)),g.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:ra(((t,e,o)=>{var h,u,l=o[0],f=o[1],c=o[2];if(n.has(l))return a.apply(e,[l,f,c]);s.onCssomSheetMutation(null==(h=e.parentRule)?void 0:h.parentStyleSheet);var v=fa(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror),d=v.id,p=v.styleId;return(d&&-1!==d||p&&-1!==p)&&r({id:d,styleId:p,set:{property:l,value:f,priority:c},index:la(e.parentRule)}),t.apply(e,o)}),"host")});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:ra(((t,e,o)=>{var a,u,l=o[0];if(n.has(l))return h.apply(e,[l]);s.onCssomSheetMutation(null==(a=e.parentRule)?void 0:a.parentStyleSheet);var f=fa(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror),c=f.id,v=f.styleId;return(c&&-1!==c||v&&-1!==v)&&r({id:c,styleId:v,remove:{property:l},index:la(e.parentRule)}),t.apply(e,o)}),"host")}),ra((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s})),t.collectFonts&&g.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=ro(r.fonts,"add",(function(t){return function(r){return setTimeout(ra((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),ra((()=>{n.forEach((t=>t()))}))}(t))),g.push((a=(o=t).doc,h=o.mirror,u=o.blockClass,l=o.blockSelector,f=o.selectionCb,c=!0,(v=ra((()=>{var t=a.getSelection();if(!(!t||c&&(null==t?void 0:t.isCollapsed))){c=t.isCollapsed||!1;for(var e=[],r=t.rangeCount||0,i=0;r>i;i++){var n=t.getRangeAt(i),s=n.startContainer,o=n.startOffset,v=n.endContainer,d=n.endOffset;yo(s,u,l,!0)||yo(v,u,l,!0)||e.push({start:h.getId(s),startOffset:o,end:h.getId(v),endOffset:d})}f({ranges:e})}})))(),no("selectionchange",v))),g.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?ro(r.customElements,"define",(function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}})):()=>{}}(t)),t.plugins))g.push(S.observer(S.callback,s,S.options))}catch(t){try{w()}catch(t){}throw t}return w}function da(t){return void 0!==window[t]}function pa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ma{constructor(t){u(this,"iframeIdToRemoteIdMap",new WeakMap),u(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class ya{constructor(t){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new ma(Gt)),u(this,"crossOriginIframeStyleMirror"),u(this,"crossOriginIframeRootIdMap",new WeakMap),u(this,"mirror"),u(this,"mutationCb"),u(this,"wrappedEmit"),u(this,"loadListener"),u(this,"pageHideListener"),u(this,"stylesheetManager"),u(this,"recordCrossOriginIframes"),u(this,"messageHandler"),u(this,"nestedIframeListeners",new Map),u(this,"attachedWindows",new WeakMap),u(this,"attachedDocuments",new WeakMap),u(this,"attachedIframes",new Map),u(this,"loadListenerDisposers",new WeakMap),u(this,"iframeElementsById",new Map),u(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ma(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){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>oo(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{so(t.win,"pagehide",t.handler)})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);oo((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}oo((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.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){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Po.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var 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:Po.IncrementalSnapshot,data:{source:Uo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Po.Meta:case Po.Load:case Po.DomContentLoaded:return!1;case Po.Plugin:return e;case Po.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Po.IncrementalSnapshot:switch(e.data.source){case Uo.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),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 Uo.Drag:case Uo.TouchMove:case Uo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Uo.ViewportResize:return!1;case Uo.MediaInteraction:case Uo.MouseInteraction:case Uo.Scroll:case Uo.CanvasMutation:case Uo.Input:return this.replaceIds(e.data,t,["id"]),e;case Uo.StyleSheetRule:case Uo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Uo.Font:return e;case Uo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Uo.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}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===$o.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(so(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(so(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach((t=>{oo((()=>this.mirror.removeNodeFromMap(t)))})),oo((()=>aa(r,s))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&so(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{so(e,"message",t)})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>t.add(e.element))),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}}class ga{constructor(t){u(this,"shadowDoms",new WeakSet),u(this,"mutationCb"),u(this,"scrollCb"),u(this,"bypassOptions"),u(this,"mirror"),u(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,n;if(at(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=io.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=sa(r({},this.bypassOptions,{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=o.observer,h=o.buffer;this.restoreHandlers.push({doc:s,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=ia.indexOf(h);-1!==t&&ia.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:oa(r({},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(io.host(t))),this.restoreHandlers.push({doc:s,handler:ca({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){var r=this;this.restoreHandlers.push({doc:e,handler:ro(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=io.shadowRoot(this);return s&&Fo(this)&&r.addShadowRoot(s,e),n}}))})}reset(){this.restoreHandlers.forEach((t=>{var e=t.handler;try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}}var wa="skip-frame";function ba(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ka="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ca=0;64>Ca;Ca++)ka[Sa.charCodeAt(Ca)]=Ca;var Ma=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=ka[t.charCodeAt(e)],i=ka[t.charCodeAt(e+1)],n=ka[t.charCodeAt(e+2)],s=ka[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},xa=new Map,Aa=(t,e,r)=>{if(t&&(Ia(t,e)||"object"==typeof t)){var i=function(t,e){var r=xa.get(t);return r||xa.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Ea(t,e,r,i){return t instanceof Array?t.map((t=>Ea(t,e,r,i))):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=Sa[r[e]>>2],n+=Sa[(3&r[e])<<4|r[e+1]>>4],n+=Sa[(15&r[e+1])<<2|r[e+2]>>6],n+=Sa[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[Ea(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Ea(t.data,e,r,i),t.width,t.height]}:Ia(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Aa(t,e,r)}:t}var Ra=(t,e,r,i)=>t.map((t=>Ea(t,e,r,i))),Ia=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Ta=["webgl","webgl2"];function Oa(t){return"nodeType"in t}function _a(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return ro(n.prototype,"configure",(function(n){return function(s){var o=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!o||Oa(o)&&yo(o,e,i,!0))return n.call(this,s);Oa(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=ro(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!yo(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Ta.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Da(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=ro(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Aa(f,s,this),"tagName"in this.canvas&&!yo(this.canvas,i,n,!0)){var c=Ra(u,s,this,o);r(this.canvas,{type:e,property:h,args:c})}return f}}));a.push(u)}catch(i){var l=lo(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Na,La,Fa,Ba='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Pa="undefined"!=typeof self&&self.Blob&&new Blob([Ba],{type:"text/javascript;charset=utf-8"});function ja(t){var e;try{if(!(e=Pa&&(self.URL||self.webkitURL).createObjectURL(Pa)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ba),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Ua{constructor(t){u(this,"pendingCanvasMutations",new Map),u(this,"rafStamps",{latestId:0,invokeId:null}),u(this,"mirror"),u(this,"mutationCb"),u(this,"resetObservers"),u(this,"frozen",!1),u(this,"locked",!1),u(this,"rafIdTimestamp",null),u(this,"rafIdFlush",null),u(this,"refCount",0),u(this,"torndown",!1),u(this,"resetFrameDedup",null),u(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)}));var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,l=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:l})}onFullSnapshot(){var t;null==(t=this.resetFrameDedup)||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}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=_a(r,i,n,!0),l=new Map;try{a=new ja}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:Go["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{yo(t,i,n,!0)||u.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&m(t.shadowRoot)}))}catch(t){}},m(r.document),u).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!l.get(i)&&0!==t.width&&0!==t.height){l.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void l.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return wa}if(void 0!==o){if(!Array.isArray(o)||!o.every(ba))return wa;var a=r/n,h=i/s;return o.filter((t=>t.width>0&&t.height>0)).map((t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}}))}}}(s.canvasMasking,t,c,v,u,f);if(d===wa)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:i,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=_a(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=ro(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return yo(this.canvas,r,i,!0)||setTimeout((()=>{var r=Ra(h,e,this,n);t(this.canvas,{type:Go["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=lo(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:Go["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Da(e.WebGLRenderingContext.prototype,Go.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Da(e.WebGL2RenderingContext.prototype,Go.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,a)));this.mutationCb({id:e,type:r[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class Wa{constructor(t){var e;u(this,"trackedLinkElements",new WeakSet),u(this,"pendingDeferredSheets",new Set),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"styleMirror",new _o),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;var r=null,i=null;try{(i=t.sheet)&&(r=gt(i))}catch(t){}if(!r||!i)return tt(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=M(),f=I(),c=!0;try{if(s)return a=!0,tt(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(tt(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(tt(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),O(h=M()-l,null!=(u=f)?u:x)||(H.totalMs+=h,h>H.slowestSliceMs&&(H.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null==(r=this.beginDeferredLinkInlining(t,e))||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:Mt({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=M();try{X((()=>{try{var e=t.rules||t.cssRules;e&&J(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:ct(e,t.href),index:r})))})}))}finally{K(M()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),ee.forEach((t=>t.abort())),ee.clear()}trackStylesheetInLinkElement(t){}}class Ha{constructor(){u(this,"nodeMap",new WeakMap),u(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).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(){}}var Ga=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var za=document.createElement("iframe");document.body.appendChild(za),Array.from=(null==(n=za.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(za)}}catch(t){console.debug("Unable to override Array.from",t)}var Va=bt(),$a=new Set([Uo.Mutation,Uo.MediaInteraction,Uo.StyleSheetRule,Uo.CanvasMutation,Uo.Font,Uo.Log,Uo.StyleDeclaration,Uo.AdoptedStyleSheet]);function Ya(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null==(t=e.cancelIdleCallback)?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function qa(t){var e;void 0===t&&(t={});var i=t,n=i.emit,s=i.checkoutEveryNms,o=i.checkoutEveryNth,a=i.blockClass,h=void 0===a?"rr-block":a,u=i.blockSelector,l=void 0===u?null:u,f=i.ignoreClass,c=void 0===f?"rr-ignore":f,v=i.ignoreSelector,d=void 0===v?null:v,p=i.maskTextClass,m=void 0===p?"rr-mask":p,y=i.maskTextSelector,g=void 0===y?null:y,w=i.inlineStylesheet,b=void 0===w||w,S=i.inlineStylesheetBudgetRules,k=i.maskAllInputs,C=i.maskInputOptions,M=i.slimDOMOptions,x=i.maskInputFn,A=i.maskTextFn,E=i.maskAllElementAttributes,I=void 0!==E&&E,T=i.maskAttributeFn,O=i.hooks,_=i.packFn,D=i.sampling,N=void 0===D?{}:D,L=i.dataURLOptions,F=void 0===L?{}:L,B=i.canvasResolutionScale,j=i.canvasMasking,U=i.mousemoveWait,W=i.recordDOM,H=void 0===W||W,G=i.recordCanvas,Y=void 0!==G&&G,q=i.recordCrossOriginIframes,Z=void 0!==q&&q,J=i.recordAfter,X=void 0===J?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":J,K=i.userTriggeredOnInput,Q=void 0!==K&&K,tt=i.collectFonts,rt=void 0!==tt&&tt,it=i.inlineImages,nt=void 0!==it&&it,st=i.plugins,ot=i.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=i.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=i.attributeFilter;Zo=i.errorHandler;var ft=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},F),ct=!Z||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!n)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==U&&void 0===N.mousemove&&(N.mousemove=U),Va.reset();var dt,pt=!0===k?{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!==C?C:{password:!0},mt=le(void 0!==M&&M);ko();var yt,gt,bt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return _&&!vt&&(t=_(t)),t};Na=(t,e)=>{var r,i=t;if(i.timestamp=fo(),!(null==(r=ia[0])?void 0:r.isFrozen())||i.type===Po.FullSnapshot||i.type===Po.IncrementalSnapshot&&$a.has(i.data.source)||ia.forEach((t=>t.unfreeze())),ct)null==n||n(kt(i),e);else if(vt){var a={type:"rrweb",event:kt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===Po.FullSnapshot)dt=i,bt=0;else if(i.type===Po.IncrementalSnapshot){if(i.data.source===Uo.Mutation&&i.data.isAttachIframe)return;bt++,(o&&bt>=o||s&&i.timestamp-dt.timestamp>s)&&La(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Va.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var r=t.id;if(!e||!e.has(r)){var n=Et.getIframeElementById(r);n&&i.has(n)?Et.forgetIframeId(r):(null==yt||yt(r),Et.removeIframeById(r))}})),null==gt||gt(),Et.cleanupDetachedIframes()}Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Mutation},t)})},Mt=t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Scroll},t)}),xt=t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.CanvasMutation},t)}),At=new Wa({mutationCb:Ct,adoptedStyleSheetCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new ya({mirror:Va,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:Z,wrappedEmit:Na});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Va,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new Ha,Tt=null==j?void 0:j.configured;Fa=new Ua({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Va,sampling:N.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:j});var Ot=new ga({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:N,slimDOMOptions:mt,iframeManager:Et,stylesheetManager:At,canvasManager:Fa,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Va});La=function(t){if(void 0===t&&(t=!1),H){z(S);try{Na({type:Po.Meta,data:{href:window.location.href,width:po(),height:vo()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),ia.forEach((t=>t.lock()));var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new wt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,_=r.iframeLoadTimeout,D=r.onIframeListenerRegistered,N=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,B=void 0===F?()=>!1:F,P=r.maxDepth,j=r.inlineStylesheetBudgetRules,U=!0===S?{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===S?{password:!0}:S,W=le(void 0!==E&&E);z(j);try{return ue(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:U,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:W,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:_,onIframeListenerRegistered:D,onStylesheetLoad:N,stylesheetLoadTimeout:L,keepIframeSrcFn:B,newlyAddedElement:!1,maxDepth:P})}finally{V()}}(document,{mirror:Va,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:mt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){xo(t,Va)&&Et.addIframe(t),Ao(t,Va)&&At.trackLinkElement(t),Ro(t)&&Ot.addShadowRoot(io.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=P,P=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Na({type:Po.FullSnapshot,data:{node:i,initialOffset:co(window)}},t),ia.forEach((t=>t.unlock())),Fa.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&oo((()=>{o=e.beginDeferredLinkInlining(r,Va.getId(r))}))},u=()=>{if(o){var t=o,e=!0;oo((()=>{e=t.advance(200)})),e&&(o=null)}},l=t=>{if(n=null,!i){var e=0;do{try{o||h(),u()}catch(t){null==o||o.discard(),o=null,et(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Ya(l):r())}};return n=Ya(l),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);et(c),null==o||o.discard(),o=null}r()}}}}(r,At,(()=>{e===n&&(e=void 0)}));e=n}Z&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Va.getId(document))}finally{V()}var s}};try{var _t=[];for(var Dt of(_t.push(no("pagehide",(()=>{try{null==e||e.flush()}catch(t){}e=void 0}),window)),["visibilitychange","freeze","resume"]))_t.push(no(Dt,R,document));yt=t=>{var e=St.get(t);e&&(e.forEach((t=>{oo(t);var e=_t.indexOf(t);-1!==e&&_t.splice(e,1)})),St.delete(t))},gt=()=>{for(var t of St){var e=t[0],r=Va.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==yt||yt(e)}catch(t){null==yt||yt(e)}else null==yt||yt(e)}};var Nt=t=>{var e;return ra(va)({mutationCb:Ct,mousemoveCb:(t,e)=>Na({type:Po.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.ViewportResize},t)}),inputCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Input},t)}),mediaInteractionCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.MediaInteraction},t)}),styleSheetRuleCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.StyleSheetRule},t)}),styleDeclarationCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Font},t)}),selectionCb(t){Na({type:Po.IncrementalSnapshot,data:r({source:Uo.Selection},t)})},customElementCb(t){Na({type:Po.IncrementalSnapshot,data:r({source:Uo.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:N,recordDOM:H,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:Q,collectFonts:rt,doc:t,maskInputFn:x,maskTextFn:A,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:mt,dataURLOptions:ft,mirror:Va,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:Fa,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==(e=null==st?void 0:st.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Na({type:Po.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},O)};Et.addLoadListener((t=>{try{var e=Va.getId(t),r=Nt(t.contentDocument);if("function"==typeof r&&(_t.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),Et.addPageHideListener((t=>{var e=Va.getId(t);null==yt||yt(e),aa(t)}));var Lt=-1,Ft=t=>Na({type:Po.Custom,data:{tag:jo,payload:t}}),Bt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Va.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Pt=()=>{La();var t=Nt(document);"function"==typeof t&&_t.push(t),_t.push(no("fullscreenchange",Bt)),_t.push(no("webkitfullscreenchange",Bt)),_t.push(no("mozfullscreenchange",Bt)),_t.push(no("MSFullscreenChange",Bt)),Ga=!0};return["interactive","complete"].includes(document.readyState)?Pt():(_t.push(no("DOMContentLoaded",(()=>{Na({type:Po.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&Pt()}))),_t.push(no("load",(()=>{Na({type:Po.Load,data:{}}),"load"===X&&Pt()}),window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,_t.forEach((t=>oo(t))),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Va.reset(),Ga=!1,Zo=void 0}}catch(t){console.warn(t)}}function Za(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}qa.addCustomEvent=(t,e)=>{if(!Ga)throw new Error("please add custom event after start recording");Na({type:Po.Custom,data:{tag:t,payload:e}})},qa.freezePage=()=>{ia.forEach((t=>t.freeze()))},qa.takeFullSnapshot=t=>{if(!Ga)throw new Error("please take full snapshot after start recording");La(t)},qa.mirror=Va;var Ja,Xa,Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"}));function Qa(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(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):s.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]&&(u(arguments[0])?s.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])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.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)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.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!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(d.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(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 l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function f(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function c(t){var e=l(t,"Y")&&f(t,"Y"),r=l(t,"X")&&f(t,"X");return e||r}function v(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(v.bind(t,e))}function d(r,i,n){var a,u,l,f,c=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,f=h),v({scrollable:a,method:f,startTime:c,startX:u,startY:l,x:i,y:n})}}class th{constructor(t,e){void 0===t&&(t=[]),u(this,"timeOffset",0),u(this,"speed"),u(this,"actions"),u(this,"raf",null),u(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,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(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}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){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function eh(t,e){if(t.type===Po.IncrementalSnapshot&&t.data.source===Uo.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function rh(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}(Xa=Ja||(Ja={}))[Xa.NotStarted=0]="NotStarted",Xa[Xa.Running=1]="Running",Xa[Xa.Stopped=2]="Stopped";var ih={type:"xstate.init"};function nh(t){return void 0===t?[]:[].concat(t)}function sh(t){return{type:"xstate.assign",assignment:t}}function oh(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 ah(t){return function(e){return t===e}}function hh(t){return"string"==typeof t?{type:t}:t}function uh(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ah(t)}}function lh(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function fh(t,e){void 0===e&&(e={});var r=rh(lh(nh(t.states[t.initial].entry).map((function(t){return oh(t,e.actions)})),t.context,ih),2),i={config:t,ie:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:ah(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=hh(r),l=t.states[a];if(l.on){var f=nh(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return uh(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=rh(lh([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return oh(t,i.ie.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:ah(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return uh(a,h)}};return i}var ch=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function vh(t){var e=t.initialState,r=Ja.NotStarted,i=new Set,n={l:t,send(n){r===Ja.Running&&(e=t.transition(e,n),ch(e,hh(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:ah(s.value)}}return r=Ja.Running,ch(e,ih),n},stop:()=>(r=Ja.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function dh(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Po.Meta&&e>=i.timestamp)return t.slice(r)}return t}var ph=new Map;function mh(t,e){var r=ph.get(t);return r||ph.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function yh(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield yh(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var s=e.index;return mh(r,e.rr_type)[s]}if("args"in e){var o=e.args;return new(0,window[e.rr_type])(...yield Promise.all(o.map(yh(t,r,i))))}if("base64"in e)return Ma(e.base64);if("src"in e){var a=t.get(e.src);if(a)return a;var h=new Image;return h.src=e.src,t.set(e.src,h),h}if("data"in e&&"Blob"===e.rr_type){var u=yield Promise.all(e.data.map(yh(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(yh(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var gh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function wh(t){return bh.apply(this,arguments)}function bh(){return(bh=e((function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===Go.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(yh(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(gh.includes(r)){var i=mh(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function Sh(){return Sh=e((function*(t){var r=t.event,i=t.mutations,n=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(yh(n,o)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach(((t,e)=>{var a=i[e];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(n.get(r),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}}))}else s(i[0],new Error("Canvas context is null"))})),Sh.apply(this,arguments)}function kh(t){return Ch.apply(this,arguments)}function Ch(){return Ch=e((function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Go.WebGL,Go.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield wh({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return Sh.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),Ch.apply(this,arguments)}var Mh=["AUDIO","VIDEO"];class xh{constructor(t){u(this,"mediaMap",new Map),u(this,"warn"),u(this,"service"),u(this,"speedService"),u(this,"emitter"),u(this,"getCurrentTime"),u(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(Vo.Start,this.start.bind(this)),this.emitter.on(Vo.SkipStart,this.start.bind(this)),this.emitter.on(Vo.Pause,this.pause.bind(this)),this.emitter.on(Vo.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var 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(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===zo.Play||l!==zo.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;Mh.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Mh.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Ah(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ls)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var Eh=Za||Ka,Rh="[replayer]",Ih={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Th(t){return t.type==Po.IncrementalSnapshot&&(t.data.source==Uo.TouchMove||t.data.source==Uo.MouseInteraction&&t.data.type==Wo.TouchStart)}class Oh{constructor(t,e){var i=this;if(u(this,"wrapper"),u(this,"iframe"),u(this,"service"),u(this,"speedService"),u(this,"config"),u(this,"usingVirtualDom",!1),u(this,"virtualDom",new _s),u(this,"mouse"),u(this,"mouseTail",null),u(this,"tailPositions",[]),u(this,"emitter",Eh()),u(this,"nextUserInteractionEvent"),u(this,"legacy_missingNodeRetryMap",{}),u(this,"cache",ei()),u(this,"imageMap",new Map),u(this,"canvasEventMap",new Map),u(this,"mirror",bt()),u(this,"styleMirror",new _o),u(this,"pendingAdoptedStyleSheets",new Map),u(this,"adoptedStyleSheetTokens",new Map),u(this,"mediaManager"),u(this,"firstFullSnapshot",null),u(this,"newDocumentQueue",[]),u(this,"mousePos",null),u(this,"touchActive",null),u(this,"lastMouseDownEvent",null),u(this,"lastHoveredRootNode"),u(this,"lastSelectionData",null),u(this,"lastScrollMap",new Map),u(this,"constructedStyleMutations",[]),u(this,"adoptedStyleSheets",[]),u(this,"emitterHandlers",[]),u(this,"serviceSubscription"),u(this,"speedServiceSubscription"),u(this,"timeouts",new Set),u(this,"applyGeneration",0),u(this,"seekRebuildInFlight",!1),u(this,"styleSheetLoadListeners",new Map),u(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),u(this,"shouldCastInSyncMode",(t=>{switch(t.type){case Po.DomContentLoaded:case Po.Load:return!1;case Po.Custom:return t.data.tag===jo;default:return!0}})),u(this,"applyEvents",((t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s((()=>l(!1))))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Vo.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})})),u(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case Po.DomContentLoaded:case Po.Load:break;case Po.Custom:n=()=>{e||i.emitter.emit(Vo.CustomEvent,t),t.data.tag===jo&&i.applyFullscreen(t.data.payload)};break;case Po.Meta:n=()=>i.emitter.emit(Vo.Resize,{width:t.data.width,height:t.data.height});break;case Po.FullSnapshot:n=()=>{var n;if(i.clearFullscreen(),i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.pendingAdoptedStyleSheets.clear(),i.adoptedStyleSheetTokens.clear(),i.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case Po.IncrementalSnapshot:n=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(Vo.SkipStart,n)}}}}return()=>{for(var r of(n&&n(),i.config.plugins||[]))r.handler&&r.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=i.applyGeneration,a=()=>{o===i.applyGeneration&&(i.seekRebuildInFlight?i.addTimeout(a,50):i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(Vo.Finish)))},h=50;t.type===Po.IncrementalSnapshot&&t.data.source===Uo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(Vo.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={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:Ih,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Vo.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Vo.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{kh({event:t,mutation:e,target:r,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===Uo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Uo.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Es(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(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Is(r.node,this.mirror,this.virtualDom.mirror);Es(i,r.node,t,this.virtualDom.mirror),r.node=i}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:Uo.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){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}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(Vo.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,l,f,c=new th([],{speed:this.config.speed});this.service=(o={events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,l=a.applyEvents,f=a.emitter,vh(fh({id:"player",context:o,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:sh({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:sh(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,r=t.timer,i=t.events,n=t.baselineTime,s=t.lastPlayedEvent;for(var o of(r.clear(),r.timeOffset=0,i))eh(o,n);var a=dh(i,n),u=a.some((t=>t.type===Po.FullSnapshot&&t.timestamp===n)),c=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===Po.IncrementalSnapshot&&s.data.source===Uo.MouseMove&&(c=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(c||0)>n&&f.emit(Vo.PlayBack);var v=new Array;for(var d of a)(!c||c>=n||d.timestamp>c&&d!==s)&&(n>d.timestamp||u&&d.timestamp===n&&(d.type===Po.Meta||d.type===Po.FullSnapshot))&&v.push(d);l(v,(()=>{var e=function(){if(n>i.timestamp||u&&i.timestamp===n&&(i.type===Po.Meta||i.type===Po.FullSnapshot))return 0;if(c&&n>c&&i===s)return 0;var t=h(i,!1);r.addAction({doAction(){t()},delay:i.delay})};for(var i of dh(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:sh((t=>r({},t,{lastPlayedEvent:null}))),startLive:sh({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:sh(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;eh(o,i);var a=s.length-1;if(s[a]&&s[a].timestamp>o.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);s[f].timestamp>o.timestamp?a=f-1:l=f+1}-1===u&&(u=l),s.splice(u,0,o)}else s.push(o);if(i>o.timestamp)e.payload.applyPastEventSynchronously&&h(o,!0)();else if(n.isActive()){var c=h(o,!1);n.addAction({doAction(){c()},delay:o.delay})}}return r({},t,{events:s})}))}}))),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(Vo.StateChange,{player:t})})),this.speedService=function(t){return vh(fh({id:"speed",context:t,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:sh({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:c}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(Vo.StateChange,{speed:t})})),this.mediaManager=new xh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var v=this.service.state.context.events.find((t=>t.type===Po.Meta)),d=this.service.state.context.events.find((t=>t.type===Po.FullSnapshot));if(v){var p=v.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(Vo.Resize,{width:m,height:y})}),0)}d&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=d,this.rebuildFullSnapshot(d),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},d.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(Th)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}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){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}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(){var 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(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(Vo.Start)}pause(t){var e,r;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==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(Vo.Pause)}resume(t){void 0===t&&(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(Vo.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{this.emitter.off(t.event,t.handler)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||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.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Vo.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Vo.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){var e=this.config.unpackFn?this.config.unpackFn(t):t;Th(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=ei()}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");var 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&&(Qa(this.iframe.contentWindow,this.iframe.contentDocument),ko(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null==(t=this.iframe.contentDocument)||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){var r=this;if(void 0===e&&(e=!1),!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={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,u=void 0===h?new wt:h,l=ni(t,{doc:r,mirror:u,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(u,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===c.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,u)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach((t=>Ah(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Vo.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { 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);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Vs(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:Uo.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===$o.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};ni(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var h of n)a();s.forEach((t=>Ah(t)))}collectIframeAndAttachDocument(t,e){if(xo(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Vo.Start,s),this.emitter.on(Vo.Pause,s);var o=()=>{this.emitter.off(Vo.Start,s),this.emitter.off(Vo.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Vo.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Vo.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Po.IncrementalSnapshot&&r.data.source===Uo.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(yh(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(yh(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,s=t.data;switch(s.source){case Uo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case Uo.Drag:case Uo.TouchMove:case Uo.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case Uo.MouseInteraction:if(-1===s.id)break;var a=new Event(kt(Wo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(Vo.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case Wo.Blur:"blur"in h&&h.blur();break;case Wo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Wo.Click:case Wo.TouchStart:case Wo.TouchEnd:case Wo.MouseDown:case Wo.MouseUp:e?(s.type===Wo.TouchStart?this.touchActive=!0:s.type===Wo.TouchEnd&&(this.touchActive=!1),s.type===Wo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Wo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Wo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Wo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Wo.TouchStart?this.mouse.classList.add("touch-active"):s.type===Wo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Wo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case Uo.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case Uo.ViewportResize:this.emitter.emit(Vo.Resize,{width:s.width,height:s.height});break;case Uo.Input:if(-1===s.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);f.inputData=s;break}this.applyInput(s);break;case Uo.MediaInteraction:var c=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);this.mediaManager.mediaMutation({target:c,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:s});break;case Uo.StyleSheetRule:case Uo.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case Uo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);v.canvasMutations.push({event:t,mutation:s})}else{var d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);kh({event:t,mutation:s,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Uo.Font:try{var p=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(p)}catch(t){this.warn(t)}break;case Uo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case Uo.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new wi),void 0===s&&(s=new _s),function t(e,r){var i=Gs(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==Cs.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==Cs.DOCUMENT_NODE&&e.nodeType!==Cs.ELEMENT_NODE&&e.nodeType!==Cs.DOCUMENT_FRAGMENT_NODE||(e.nodeType===Cs.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Gs(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Ro(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var f=r({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===$o.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?c.push(e):void 0;if(e.node.isShadow){Ro(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot;var s=this.pendingAdoptedStyleSheets.get(e.parentId);s&&!this.usingVirtualDom&&this.applyAdoptedStyleSheet({source:Uo.AdoptedStyleSheet,id:e.parentId,styleIds:s})}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(xo(n,l))this.attachDocumentToIframe(e,n);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Ah(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=ni(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===$o.Element&&e.node.type===$o.Text){var p=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===n.TEXT_NODE&&n.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==n.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,n.removeChild(y))}else if((null==d?void 0:d.type)===$o.Document){var g=n;e.node.type===$o.DocumentType&&(null==(r=g.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),"HTML"===v.nodeName&&g.documentElement&&g.removeChild(g.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?n.insertBefore(v,o.nextSibling):a&&a.parentNode?n.contains(a)?n.insertBefore(v,a):n.insertBefore(v,null):n.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),xo(v,this.mirror)){var w=this.mirror.getId(v),b=this.newDocumentQueue.find((t=>t.parentId===w));b&&(this.attachDocumentToIframe(b,v),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==b)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,n,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach((t=>{v(t)}));for(var d=performance.now();c.length;){var p=Co(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Mo(m,(t=>{v(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Oo(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n,s=l.getNode(e.id);if(!s){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var a=function(){if("string"==typeof h){var t=e.attributes[h];if(null===t)s.removeAttribute(h),"open"===h&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ls)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(s,e);else if("string"==typeof t)try{if("_cssText"===h&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{var a=l.getMeta(s),u=s.nextSibling,f=s.parentNode,c=ni(r({},a,{attributes:r({},a.attributes,e.attributes)}),{doc:s.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});if(Object.assign(a.attributes,e.attributes),c&&f)return s.parentNode===f&&f.removeChild(s),f.insertBefore(c,u),l.replace(e.id,c),1}catch(t){}if("value"===h&&"TEXTAREA"===s.nodeName){var v=s;v.childNodes.forEach((t=>v.removeChild(t)));var d=null==(i=s.ownerDocument)?void 0:i.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===h&&(null==(n=l.getMeta(s))?void 0:n.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",h,t):s.setAttribute(h,t);"rr_open_mode"===h&&"DIALOG"===s.nodeName&&Ah(s,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===h){var p=t,m=s;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var h in e.attributes)if(a())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==s?void 0:s.type)===$o.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var 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{var e=new Set,r=t.ranges.map((t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===Uo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===Uo.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=To(i),s=n.index,o=Io(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var r=t.index;try{if(Array.isArray(r)){var i=To(r),n=i.index,s=Io(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Io(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Io(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null==(e=r.ownerDocument)?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:Uo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t)),a=!1;try{Ro(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout((()=>s(e,r)),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Eo(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Ih:Object.assign({},Ih,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var 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=r,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),o(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),o()}),s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")}));var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===Po.IncrementalSnapshot&&t.data.source>Uo.Mutation&&Uo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Vo.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(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Rh,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Rh,...e)}}}var _h=qa.addCustomEvent,Dh=qa.freezePage,Nh=qa.takeFullSnapshot;export{Po as EventType,Uo as IncrementalSource,Wo as MouseInteractions,Oh as Replayer,Vo as ReplayerEvents,_h as addCustomEvent,kh as canvasMutation,Dh as freezePage,rt as getDeferredStylesheetStats,T as getDiscardedDurationSamples,Y as getLastSnapshotCost,it as getMutationCost,ho as mirror,qa as record,he as resetMaxDepthState,nt as resetSnapshotCostState,Nh as takeFullSnapshot,Bo as utils,ae as wasMaxDepthReached};
2
2
  //# sourceMappingURL=rrweb.js.map