posthog-js 1.412.0 → 1.412.1

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=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(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),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(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))(v||{});function p(t,e){return-1!==t.indexOf(e)}var m={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},y={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},g={};function w(t){if(g[t])return g[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 m?m[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 y?y[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 g[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 c=l[t].prototype;return c?(p(h=navigator.userAgent,"AppleWebKit")&&!p(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),g[t]=c):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var b={};function S(t,e,r){var i,n=t+"."+String(r);if(b[n])return b[n].call(e);var s=w(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(b[n]=o,o.call(e)):e[r]}var k={};function C(t,e,r){var i=t+"."+String(r);if(k[i])return k[i].bind(e);var n=w(t)[r];return"function"!=typeof n?e[r]:(k[i]=n,n.bind(e))}var M={childNodes:t=>S("Node",t,"childNodes"),parentNode:t=>S("Node",t,"parentNode"),parentElement:t=>S("Node",t,"parentElement"),textContent:t=>S("Node",t,"textContent"),contains:(t,e)=>C("Node",t,"contains")(e),getRootNode:t=>C("Node",t,"getRootNode")(),host:t=>t&&"host"in t?S("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?S("Element",t,"shadowRoot"):null,querySelector:(t,e)=>C("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>C("Element",t,"querySelectorAll")(e),mutationObserver:()=>w("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()=>{}}}},x=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,deferredStylesheetCount:0});function E(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var R=0,I=0,A=x(),T=null,O=null,D=[],N={slowestBatchMs:0},_=t=>t&&t>0?t:null;function L(){return T}var B=32;function P(t,e,r){var i=t.length;if(r>=B)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=P(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+=P(h,e,r+1))}}}catch(t){}}return i}function F(t){return 0!==R&&null!==O&&(A.cssRuleCount>=O||A.cssRuleCount+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),P(e,r,0)}catch(t){return 0}}(t)>O)}function j(){return r({},N)}function U(){R=0,I=0,A=x(),T=null,O=null,D=[],N={slowestBatchMs:0}}function W(t){return t.nodeType===t.ELEMENT_NODE}function H(t){var e=t&&"host"in t&&"mode"in t&&M.host(t)||null;return Boolean(e&&"shadowRoot"in e&&M.shadowRoot(e)===t)}function G(t){return"[object ShadowRoot]"==={}.toString.call(t)}var z=0;function V(t){var e,r,i=0===z,n=i?E():0;z+=1;try{var s=t.rules||t.cssRules;if(!s)return null;!function(t){0!==R&&(A.cssRuleCount+=P(t,null,0))}(s);var o=t.href;return!o&&t.ownerNode&&(o=t.ownerNode.baseURI),(r=Array.from(s,(t=>Y(t,o))).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(t){return null}finally{z-=1,i&&(e=E()-n,R>0&&(A.stylesheetMs+=e))}}function Y(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=V(t.styleSheet)||function(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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return st(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?st(n,e):n}class q{constructor(){d(this,"idNodeMap",new Map),d(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))),W(t)){var r=M.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 Z(){return new q}function J(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&X(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function X(t){return t.toLowerCase()}var K="__rrweb_original__";function Q(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?X(e):null}catch(t){return null}}function tt(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 et=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rt=/^(?:[a-z+]+:)?\/\//i,it=/^www\..*/i,nt=/^(data:)([^,]*),(.*)/i;function st(t,e){return(t||"").replace(et,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(rt.test(h)||it.test(h))return"url("+u+h+u+")";if(nt.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("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var ot,at,ht="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ut=4096,lt=1e5,ct=10,ft=new Map,dt=1,vt=new RegExp("[^a-z0-9-_:]"),pt=-2;function mt(){return dt++}var yt=/^[^ \t\n\r\u000c]+/,gt=/^[, \t\n\r\u000c]+/,wt=new WeakMap;function bt(t,e){return e&&""!==e.trim()?St(t,e):e}function St(t,e){var r=wt.get(t);if(r||(r=t.createElement("a"),wt.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function kt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?ht:t}(t,e.maxBase64ImageLength):t}function Ct(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=bt(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(lt>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>ut||t.naturalHeight>ut)return e;var n=ft.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(ft.size>=ct){var u=ft.keys().next().value;void 0!==u&&ft.delete(u)}return ft.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),kt(u,s)}if("image"===e)return kt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=bt(t,i);return"image"===e&&l.startsWith("data:")?kt(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(gt),e.length>r;){var s=i(yt);if(","===s.slice(-1))s=bt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=bt(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?st(i,St(t)):"object"===e&&"data"===r?bt(t,i):i:bt(t,i)}function Mt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function xt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&xt(M.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&xt(M.parentNode(t),e,r)}function Et(t,e,r,i){var n;if(W(t)){if(!M.childNodes(n=t).length)return!1}else{if(null===M.parentElement(t))return!1;n=M.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(xt(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 Rt(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var It=new Map;function At(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function Tt(t){return null==t?"":t.toLowerCase()}var Ot=50,Dt=!1,Nt=!1;function _t(){return Nt}function Lt(){Nt=!1,Dt=!1}function Bt(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,c=void 0===l||l,f=e.maskInputOptions,d=void 0===f?{}:f,p=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,g=e.dataURLOptions,w=void 0===g?{}:g,b=e.inlineImages,S=void 0!==b&&b,k=e.recordCanvas,C=void 0!==k&&k,x=e.canvasMaskingConfigured,E=e.onSerialize,I=e.onIframeLoad,T=e.iframeLoadTimeout,O=void 0===T?5e3:T,N=e.onIframeListenerRegistered,_=e.onStylesheetLoad,L=e.stylesheetLoadTimeout,B=void 0===L?5e3:L,P=e.keepIframeSrcFn,j=void 0===P?()=>!1:P,U=e.newlyAddedElement,z=void 0!==U&&U,Y=e.depth,q=void 0===Y?0:Y,Z=e.maxDepth,et=void 0===Z?Ot:Z,rt=e.needsMask,it=e.preserveWhiteSpace,nt=void 0===it||it;if(q>=et)return Nt=!0,Dt||(Dt=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+et+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;rt||(rt=Et(t,o,a,void 0===rt)),R>0&&(A.nodeCount+=1);var ht,ut=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,c=e.dataURLOptions,f=void 0===c?{}:c,d=e.inlineImages,p=e.recordCanvas,m=e.canvasMaskingConfigured,y=e.keepIframeSrcFn,g=e.newlyAddedElement,w=void 0!==g&&g,b=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:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s,o=e.doc,a=e.inlineStylesheet,h=e.maskInputOptions,u=void 0===h?{}:h,l=e.maskInputFn,c=e.dataURLOptions,f=void 0===c?{}:c,d=e.inlineImages,p=e.recordCanvas,m=e.canvasMaskingConfigured,y=e.keepIframeSrcFn,g=e.newlyAddedElement,w=void 0!==g&&g,b=e.rootId,S=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),k=function(t){if(t instanceof HTMLFormElement)return"form";var e=X(t.tagName);return vt.test(e)?"div":e}(t),C={},x=t.attributes.length,E=0;x>E;E++){var I=t.attributes[E];Mt(k,I.name)||(C[I.name]=Ct(o,k,X(I.name),I.value,t,f))}if("link"===k&&a&&!S){var A=t.sheet;if(!A){var T=function(t){return t.href}(t);T&&!(A=At(o,T))&&T.includes(".css")&&(A=At(o,window.location.origin+"/"+T.replace(window.location.href,"")))}var O=null;A&&(F(A)?R>0&&D.push(t):O=V(A)),O&&(delete C.rel,delete C.href,C._cssText=O)}var N;if("style"===k&&t.sheet&&!(t.innerText||M.textContent(t)||"").trim().length){var _=V(t.sheet);_&&(C._cssText=_)}if("input"===k||"textarea"===k||"select"===k){var L=t.value,B=t.checked;"radio"!==C.type&&"checkbox"!==C.type&&"submit"!==C.type&&"button"!==C.type&&L?C.value=J({element:t,type:Q(t),tagName:k,value:L,maskInputOptions:u,maskInputFn:l}):B&&(C.checked=B)}if("option"===k&&(t.selected&&!u.select?C.selected=!0:delete C.selected),"dialog"===k&&t.open)try{C.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){C.rr_open_mode="modal",C.ph_rr_could_not_detect_modal=!0}if("canvas"===k&&p&&!(null==m?void 0:m()))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((K in n?n[K]: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)||(C.rr_dataURL=t.toDataURL(f.type,f.quality));else if(!("__context"in t)){var P=t.toDataURL(f.type,f.quality),j=o.createElement("canvas");j.width=t.width,j.height=t.height,P!==j.toDataURL(f.type,f.quality)&&(C.rr_dataURL=P)}if("img"===k&&d){ot||(ot=o.createElement("canvas"),at=ot.getContext("2d"));var U=t,W=U.currentSrc||U.getAttribute("src")||"<unknown-src>",H=U.crossOrigin,G=()=>{Rt(U,"load",G);try{ot.width=U.naturalWidth,ot.height=U.naturalHeight,at.drawImage(U,0,0),C.rr_dataURL=ot.toDataURL(f.type,f.quality)}catch(t){if("anonymous"!==U.crossOrigin)return U.crossOrigin="anonymous",void(U.complete&&0!==U.naturalWidth?G():U.addEventListener("load",G));console.warn("Cannot inline img src="+W+"! Error: "+t)}"anonymous"===U.crossOrigin&&(H?C.crossOrigin=H:U.removeAttribute("crossorigin"))};U.complete&&0!==U.naturalWidth?G():U.addEventListener("load",G)}if("audio"===k||"video"===k){var z=C;z.rr_mediaState=t.paused?"paused":"played",z.rr_mediaCurrentTime=t.currentTime,z.rr_mediaPlaybackRate=t.playbackRate,z.rr_mediaMuted=t.muted,z.rr_mediaLoop=t.loop,z.rr_mediaVolume=t.volume}if(w||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){var Y=t.getBoundingClientRect(),q=Y.width,Z=Y.height,tt=Y.left,et=Y.top,rt=null==(r=o.defaultView)?void 0:r.getComputedStyle(t);C={class:C.class,rr_width:q+"px",rr_height:Z+"px",rr_left:Math.floor(tt+((null==(i=o.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(et+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"},rt&&(C.rr_position=rt.position||"static",rt.transform&&"none"!==rt.transform&&(C.rr_transform=rt.transform),rt.display&&rt.display.startsWith("inline")&&(C.rr_display=rt.display))}"iframe"!==k||y(C.src)||(t.contentDocument||(C.rr_src=C.src),delete C.src);try{customElements.get(k)&&(s=!0)}catch(t){}return{type:v.Element,tagName:k,attributes:C,childNodes:[],isSVG:(N=t,Boolean("svg"===N.tagName||N.ownerSVGElement)||void 0),needBlock:S,rootId:b,isCustom:s}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,dataURLOptions:f,inlineImages:d,recordCanvas:p,canvasMaskingConfigured:m,keepIframeSrcFn:y,newlyAddedElement:w,rootId:b});case t.TEXT_NODE:return function(t,e){var r,i=e.needsMask,n=e.maskTextFn,s=e.rootId,o=M.parentNode(t),a=o&&o.tagName,h=M.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(F(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var c=V(o.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(h=c)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=st(h,St(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,M.parentElement(t)):h.replace(/[\S]/g,"*")),{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:s,maskTextFn:u,rootId:b});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:v.Comment,textContent:M.textContent(t)||"",rootId:b};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,dataURLOptions:w,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:x,keepIframeSrcFn:j,newlyAddedElement:z});if(!ut)return console.warn(t,"not serialized"),null;ht=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.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"===tt(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Tt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Tt(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(Tt(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Tt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Tt(t.attributes.property).match(/^(og|twitter|fb):/)||Tt(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Tt(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(Tt(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(Tt(t.attributes.name))||Tt(t.attributes.property).match(/^article:/)||Tt(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(Tt(t.attributes.name)))return!0}}return!1}(ut,y)&&(nt||ut.type!==v.Text||ut.isStyle||ut.textContent.replace(/^\s+|\s+$/gm,"").length)?mt():pt;var lt=Object.assign(ut,{id:ht});if(i.add(t,lt),ht===pt)return null;E&&E(t);var ct=!u;if(lt.type===v.Element){ct=ct&&!lt.needBlock,delete lt.needBlock;var ft=M.shadowRoot(t);ft&&G(ft)&&(lt.isShadowHost=!0)}if((lt.type===v.Document||lt.type===v.Element)&&ct){y.headWhitespace&&lt.type===v.Element&&"head"===lt.tagName&&(nt=!1);var dt={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:x,preserveWhiteSpace:nt,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:O,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:j,depth:q+1,maxDepth:et};if(lt.type===v.Element&&"textarea"===lt.tagName&&void 0!==lt.attributes.value);else for(var yt of Array.from(M.childNodes(t))){var gt=Bt(yt,dt);gt&&lt.childNodes.push(gt)}var wt=null;if(W(t)&&(wt=M.shadowRoot(t)))for(var bt of Array.from(M.childNodes(wt))){var kt=Bt(bt,dt);kt&&(G(wt)&&(kt.isShadow=!0),lt.childNodes.push(kt))}}var xt=M.parentNode(t);if(xt&&H(xt)&&G(xt)&&(lt.isShadow=!0),lt.type===v.Element&&"iframe"===lt.tagName){var _t=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),Rt(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?Rt(t,"load",o):(a=!0,Rt(t,"load",l))}}var c,f="about:blank";try{c=s.location.href}catch(t){return n}if(c!==f||t.src===f||""===t.src){var d=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(d),Rt(t,"load",o)}}return t.addEventListener("load",o),()=>{Rt(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&I){var r=Bt(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:x,preserveWhiteSpace:nt,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:O,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:j,depth:q+1,maxDepth:et});r&&I(t,r)}}),O);null==N||N(t,_t)}return lt.type===v.Element&&"link"===lt.tagName&&"stylesheet"===lt.attributes.rel&&function(e,h,u){if(!It.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var f=new AbortController,v=!1,g=()=>{if(!v){v=!0;try{(()=>{if(_){var e=Bt(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:x,preserveWhiteSpace:nt,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:O,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:j,depth:q,maxDepth:et});e&&_(t,e)}})()}finally{It.delete(e),f.abort()}}},b=setTimeout(g,u);f.signal.addEventListener("abort",(()=>clearTimeout(b)),{once:!0}),e.addEventListener("load",g,{signal:f.signal,once:!0}),It.set(e,f)}}}(t,0,B),lt}function Pt(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 Ft=new RegExp(/(max|min)-device-(width|height)/.source,"g"),jt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(Ft)&&(t.params=t.params.replace(Ft,"$1-$2"))}}}},Ut={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 Wt(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function Ht(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 Gt,zt={exports:{}};function Vt(){if(Gt)return zt.exports;Gt=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 zt.exports=e(),zt.exports.createColors=e,zt.exports}var Yt,$t,qt,Zt,Jt,Xt,Kt=Ht(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Qt(){if($t)return Yt;$t=1;var t=Vt(),e=Kt;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 c=i.split(/\r?\n/),f=Math.max(this.line-3,0),d=Math.min(this.line+2,c.length),v=String(d).length;return c.slice(f,d).map(((t,e)=>{var r=f+1+e,i=" "+(" "+r).slice(-v)+" | ";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 c=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+c+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 Yt=r,r.default=r,Yt}function te(){if(Zt)return qt;Zt=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g;function r(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var i={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(t){this.builder=t}atrule(t,e){var i=t.raws,n="@"+t.name,s=t.params?this.rawValue(t,"params"):"";void 0!==i.afterName?n+=i.afterName:s&&(n+=" "),t.nodes?this.block(t,n+s):this.builder(r(n+s+((i.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 i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(t){for(var e=t.nodes,i=e.length-1;i>0&&"comment"===e[i].type;)i-=1;for(var n=this.raw(t,"semicolon"),s="document"===t.type,o=0;e.length>o;o++){var a=e[o],h=this.raw(a,"before");h&&this.builder(s?h:r(h)),this.stringify(a,i!==o||n)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){var i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,r){var n;if(r||(r=e),e&&void 0!==(n=t.raws[e]))return n;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 i[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]?n=this[u](o,t):o.walk((t=>{if(void 0!==(n=t.raws[e]))return!1})),void 0===n&&(n=i[r]),a[r]=n,n}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(this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return qt=n,n.default=n,qt}function ee(){if(Xt)return Jt;Xt=1;var t=te();function e(e,r){new t(r).stringify(e)}return Jt=e,e.default=e,Jt}var re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ye,ge,we,be,Se,ke,Ce,Me,xe,Ee,Re,Ie,Ae,Te,Oe,De,Ne,_e,Le,Be,Pe,Fe,je,Ue,We,He,Ge,ze,Ve,Ye,$e,qe,Ze,Je,Xe,Ke,Qe,tr,er={};function rr(){return re||(re=1,er.isClean=Symbol("isClean"),er.my=Symbol("my")),er}function ir(){if(ne)return ie;ne=1;var t=Qt(),e=te(),r=ee(),i=rr(),n=i.isClean,s=i.my;function o(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],s=typeof n;"parent"===i&&"object"===s?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>o(t,r))):("object"===s&&null!==n&&(n=o(n)),r[i]=n)}return r}function a(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 h{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,t)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=o(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:a(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(a(e,this.source.start),a(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=a(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(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:a(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:a(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(a(e,this.source.start),a(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:a(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:a(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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 ie=h,h.default=h,ie}function nr(){if(oe)return se;oe=1;var t=ir();class e extends t{constructor(t){super(t),this.type="comment"}}return se=e,e.default=e,se}function sr(){if(he)return ae;he=1;var t=ir();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 ae=e,e.default=e,ae}function or(){if(le)return ue;le=1;var t,e,r,i,n=nr(),s=sr(),o=ir(),a=rr(),h=a.isClean,u=a.my;function l(t){return t.map((t=>(t.nodes&&(t.nodes=l(t.nodes)),delete t.source,t)))}function c(t){if(t[h]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)c(e)}class f 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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.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=l(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 d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[u]||f.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&c(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 v}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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 f.registerParse=t=>{e=t},f.registerRule=t=>{i=t},f.registerAtRule=e=>{t=e},f.registerRoot=t=>{r=t},ue=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[u]=!0,e.nodes&&e.nodes.forEach((t=>{f.rebuild(t)}))},ue}function ar(){if(fe)return ce;fe=1;var t=or();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 ce=e,e.default=e,t.registerAtRule(e),ce}function hr(){if(ve)return de;ve=1;var t,e,i=or();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},de=n,n.default=n,de}function ur(){return me?pe:(me=1,pe={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)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--;)i+=t[Math.random()*t.length|0];return i})})}function lr(){if(ge)return ye;ge=1;var t=Kt.existsSync,e=Kt.readFileSync,r=Kt.dirname,i=Kt.join,n=Kt.SourceMapConsumer,s=Kt.SourceMapGenerator;class o{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 n(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(i,n,s){if(s||this.unsafeMap||/\.map$/i.test(i))return this.root=r(i),t(i)?(this.mapFile=i,e(i,"utf-8").toString().trim()):void 0}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o,t,!0);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;t&&(h=i(r(t),h));var u=this.loadFile(h,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 ye=o,o.default=o,ye}function cr(){if(be)return we;be=1;var t=ur().nanoid,e=Kt.isAbsolute,i=Kt.resolve,n=Kt.SourceMapConsumer,s=Kt.SourceMapGenerator,o=Kt.fileURLToPath,a=Kt.pathToFileURL,h=Qt(),u=lr(),l=Kt,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];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[c]=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=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.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 v(this)[t-1]+e-1}fromOffset(t){var e=v(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;"number"==typeof i&&(s=u.originalPositionFor({column:n-1,line:i})),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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 we=p,p.default=p,l&&l.registerInput&&l.registerInput(p),we}function fr(){if(ke)return Se;ke=1;var t,e,r=or();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Se=i,i.default=i,r.registerRoot(i),Se}function dr(){if(Me)return Ce;Me=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 Ce=t,t.default=t,Ce}function vr(){if(Ee)return xe;Ee=1;var t=or(),e=dr();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 xe=r,r.default=r,t.registerRule(r),xe}function pr(){if(Te)return Ae;Te=1;var t=Kt.dirname,e=Kt.relative,r=Kt.resolve,i=Kt.sep,n=Kt.SourceMapConsumer,s=Kt.SourceMapGenerator,o=Kt.pathToFileURL,a=cr(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Ae=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 mr(){if(De)return Oe;De=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".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 Oe=function(C,M){void 0===M&&(M={});var x,E,R,I,A,T,O,D,N,_,L=C.css.valueOf(),B=M.ignoreErrors,P=L.length,F=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,F)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&F>=P,nextToken(C){if(U.length)return U.pop();if(P>F){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(F)){case n:case s:case a:case h:case o:I=F;do{x=L.charCodeAt(I+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(F,I)],F=I-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(x);T=[G,G,F];break;case c:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(F+1),"url"===_&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){I=F;do{if(O=!1,-1===(I=L.indexOf(")",I+1))){if(B||M){I=F;break}H("bracket")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["brackets",L.slice(F,I+1),F,I],F=I}else F>W?(I=L.indexOf(")",F+1),E=L.slice(F,I+1),-1===I||S.test(E)?(W=-1===I?P:I,T=["(","(",F]):(T=["brackets",E,F,I],F=I)):T=["(","(",F];break;case t:case e:A=x===t?"'":'"',I=F;do{if(O=!1,-1===(I=L.indexOf(A,I+1))){if(B||M){I=F+1;break}H("string")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["string",L.slice(F,I+1),F,I],F=I;break;case g:w.lastIndex=F+1,w.test(L),T=["at-word",L.slice(F,1+(I=0===w.lastIndex?L.length-1:w.lastIndex-2)),F,I],F=I;break;case r:for(I=F,R=!0;L.charCodeAt(I+1)===r;)I+=1,R=!R;if(x=L.charCodeAt(I+1),R&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(I+=1))){for(;k.test(L.charAt(I+1));)I+=1;L.charCodeAt(I+1)===s&&(I+=1)}T=["word",L.slice(F,I+1),F,I],F=I;break;default:x===i&&L.charCodeAt(F+1)===m?(0===(I=L.indexOf("*/",F+2)+1)&&(B||M?I=L.length:H("comment")),T=["comment",L.slice(F,I+1),F,I],F=I):(b.lastIndex=F+1,b.test(L),T=["word",L.slice(F,1+(I=0===b.lastIndex?L.length-1:b.lastIndex-2)),F,I],j.push(T),F=I)}return F++,T}},position:()=>F}}}function yr(){if(_e)return Ne;_e=1;var t=ar(),e=nr(),r=sr(),i=fr(),n=vr(),s=mr(),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 Ne=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 c=s;t.length>s;){var f=t[s][0];if("space"!==f&&"comment"!==f)break;s++}var d=t.slice(c,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var v=t.length-1;v>=0;v--){if("!important"===(u=t[v])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,v);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=v;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+=d.map((t=>t[1])).join(""),d=[]),this.raw(i,"value",d.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 c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,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 gr(){if(Be)return Le;Be=1;var t=or(),e=cr(),r=yr();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 Le=i,i.default=i,t.registerParse(i),Le}function wr(){if(Fe)return Pe;Fe=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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 Pe=t,t.default=t,Pe}function br(){if(Ue)return je;Ue=1;var t=wr();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 je=e,e.default=e,je}function Sr(){if(He)return We;He=1;var t={};return We=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function kr(){if(ze)return Ge;ze=1;var t=or(),i=hr(),n=pr(),s=gr(),o=br(),a=fr(),h=ee(),u=rr(),l=u.isClean,c=u.my,f=Sr(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v={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=d[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){return t[l]=!1,t.nodes&&t.nodes.forEach((t=>b(t))),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[c]&&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(!v[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||f("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 c=u[e.eventIndex];if(e.eventIndex+=1,c===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[c])return void(e.visitors=this.listeners[c])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;var e=g(t);for(var r of e)if(r===m)t.nodes&&t.each((t=>{t[l]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},Ge=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),Ge}function Cr(){if(Je)return Ze;Je=1;var t=ar(),e=nr(),n=or(),a=Qt(),h=sr(),u=hr(),l=function(){if(Ie)return Re;Ie=1;var t=ar(),e=nr(),n=sr(),a=cr(),h=lr(),u=fr(),l=vr();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var v,p,m=f.inputs,y=i(f,s);if(m)for(var g of(d=[],m)){var w=r({},g,{__proto__:a.prototype});w.map&&(w.map=r({},w.map,{__proto__:h.prototype})),d.push(w)}if(y.nodes&&(v=f.nodes.map((t=>c(t,d))),delete y.nodes),y.source){var b=y.source,S=b.inputId,k=i(b,o);y.source=k,null!=S&&(y.source.input=d[S])}if("root"===y.type)p=new u(y);else if("decl"===y.type)p=new n(y);else if("rule"===y.type)p=new l(y);else if("comment"===y.type)p=new e(y);else{if("atrule"!==y.type)throw new Error("Unknown node type: "+f.type);p=new t(y)}if(v)for(var C of(p.nodes=v,v))C.parent=p;return p}return Re=c,c.default=c,Re}(),c=cr(),f=kr(),d=dr(),v=ir(),p=gr(),m=function(){if(qe)return $e;qe=1;var t=hr(),e=kr(),r=function(){if(Ye)return Ve;Ye=1;var t=pr(),e=gr(),r=br(),i=ee(),n=Sr();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],c=u[1];l&&(this.result.css=l),c&&(this.result.map=c)}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 Ve=s,s.default=s,Ve}(),i=fr();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.16",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 $e=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),$e}(),y=br(),g=fr(),w=vr(),b=ee(),S=wr();function k(){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 m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),Ze=k,k.default=k,Ze}var Mr=Wt(function(){if(tr)return Qe;tr=1;var t=Cr().Input,e=function(){if(Ke)return Xe;Ke=1;var t=nr(),e=yr(),r=mr();return Xe=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 Qe=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),xr=Wt(Cr()),Er={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 Rr(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=xr([jt,Ut]).process(t,{parser:Mr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function Ir(){return{stylesWithHoverClass:new Map}}var Ar=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),Tr=new Set;function Or(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,c=e.cache;if(s.has(t.id)){var f=s.getNode(t.id),d=s.getMeta(f);if(i=t,(r=d)&&i&&r.type===i.type&&(r.type===v.Document?r.compatMode===i.compatMode:r.type===v.DocumentType?r.name===i.name&&r.publicId===i.publicId&&r.systemId===i.systemId:r.type===v.Comment||r.type===v.Text||r.type===v.CDATA?r.textContent===i.textContent:r.type===v.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 v.Document:return i.implementation.createDocument(null,"",null);case v.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case v.Element:var o,a=function(t){var e=Er[t.tagName]?Er[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(Ar.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){Tr.has(t.tagName)||(Tr.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 c="textarea"===a&&"value"===u,f="style"===a&&"_cssText"===u;if(f&&n&&"string"==typeof l&&(l=Rr(l,s)),!c&&!f||"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"===tt(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 v.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=Rr(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case v.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case v.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:u,cache:c});if(!p)return null;if(t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===v.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==v.DocumentType&&n.write(t.childNodes[0].type===v.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===v.Document||t.type===v.Element)&&!a){var m=function(){var e=Or(y,{doc:n,mirror:s,skipChild:!1,hackCss:u,afterAppend:l,cache:c});if(!e)return console.warn("Failed to rebuild",y),1;if(y.isShadow&&W(p)&&p.shadowRoot)p.shadowRoot.appendChild(e);else if(t.type===v.Document&&y.type==v.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===v.Document&&y.type===v.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 Dr=Object.defineProperty,Nr=(t,e,r)=>((t,e,r)=>e in t?Dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),_r=Object.defineProperty,Lr=(t,e,r)=>((t,e,r)=>e in t?_r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function Br(t,e){return-1!==t.indexOf(e)}var Pr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Fr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},jr={};function Ur(t){if(jr[t])return jr[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 Pr?Pr[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 Fr?Fr[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 jr[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 c=l[t].prototype;return c?(Br(h=navigator.userAgent,"AppleWebKit")&&!Br(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),jr[t]=c):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Wr={};function Hr(t,e,r){var i,n=t+"."+String(r);if(Wr[n])return Wr[n].call(e);var s=Ur(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Wr[n]=o,o.call(e)):e[r]}var Gr={};function zr(t,e,r){var i=t+"."+String(r);if(Gr[i])return Gr[i].bind(e);var n=Ur(t)[r];return"function"!=typeof n?e[r]:(Gr[i]=n,n.bind(e))}var Vr={childNodes:t=>Hr("Node",t,"childNodes"),parentNode:t=>Hr("Node",t,"parentNode"),parentElement:t=>Hr("Node",t,"parentElement"),textContent:t=>Hr("Node",t,"textContent"),contains:(t,e)=>zr("Node",t,"contains")(e),getRootNode:t=>zr("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Hr("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Hr("Element",t,"shadowRoot"):null,querySelector:(t,e)=>zr("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>zr("Element",t,"querySelectorAll")(e),mutationObserver:()=>Ur("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()=>{}}}},Yr=class{constructor(){Lr(this,"idNodeMap",new Map),Lr(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=Vr.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 $r(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 qr,Zr={exports:{}};function Jr(){if(qr)return Zr.exports;qr=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 Zr.exports=e(),Zr.exports.createColors=e,Zr.exports}var Xr,Kr,Qr,ti,ei,ri,ii=$r(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function ni(){if(Kr)return Xr;Kr=1;var t=Jr(),e=ii;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 c=i.split(/\r?\n/),f=Math.max(this.line-3,0),d=Math.min(this.line+2,c.length),v=String(d).length;return c.slice(f,d).map(((t,e)=>{var r=f+1+e,i=" "+(" "+r).slice(-v)+" | ";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 c=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+c+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 Xr=r,r.default=r,Xr}function si(){if(ti)return Qr;ti=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g;function r(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var i={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(t){this.builder=t}atrule(t,e){var i=t.raws,n="@"+t.name,s=t.params?this.rawValue(t,"params"):"";void 0!==i.afterName?n+=i.afterName:s&&(n+=" "),t.nodes?this.block(t,n+s):this.builder(r(n+s+((i.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 i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(t){for(var e=t.nodes,i=e.length-1;i>0&&"comment"===e[i].type;)i-=1;for(var n=this.raw(t,"semicolon"),s="document"===t.type,o=0;e.length>o;o++){var a=e[o],h=this.raw(a,"before");h&&this.builder(s?h:r(h)),this.stringify(a,i!==o||n)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){var i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,r){var n;if(r||(r=e),e&&void 0!==(n=t.raws[e]))return n;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 i[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]?n=this[u](o,t):o.walk((t=>{if(void 0!==(n=t.raws[e]))return!1})),void 0===n&&(n=i[r]),a[r]=n,n}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(this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return Qr=n,n.default=n,Qr}function oi(){if(ri)return ei;ri=1;var t=si();function e(e,r){new t(r).stringify(e)}return ei=e,e.default=e,ei}var ai,hi,ui,li,ci,fi,di,vi,pi,mi,yi,gi,wi,bi,Si,ki,Ci,Mi,xi,Ei,Ri,Ii,Ai,Ti,Oi,Di,Ni,_i,Li,Bi,Pi,Fi,ji,Ui,Wi,Hi,Gi,zi,Vi,Yi,$i,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn,on,an={};function hn(){return ai||(ai=1,an.isClean=Symbol("isClean"),an.my=Symbol("my")),an}function un(){if(ui)return hi;ui=1;var t=ni(),e=si(),r=oi(),i=hn(),n=i.isClean,s=i.my;function o(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],s=typeof n;"parent"===i&&"object"===s?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>o(t,r))):("object"===s&&null!==n&&(n=o(n)),r[i]=n)}return r}function a(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 h{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,t)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=o(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:a(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(a(e,this.source.start),a(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=a(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(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:a(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:a(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(a(e,this.source.start),a(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:a(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:a(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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 hi=h,h.default=h,hi}function ln(){if(ci)return li;ci=1;var t=un();class e extends t{constructor(t){super(t),this.type="comment"}}return li=e,e.default=e,li}function cn(){if(di)return fi;di=1;var t=un();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 fi=e,e.default=e,fi}function fn(){if(pi)return vi;pi=1;var t,e,r,i,n=ln(),s=cn(),o=un(),a=hn(),h=a.isClean,u=a.my;function l(t){return t.map((t=>(t.nodes&&(t.nodes=l(t.nodes)),delete t.source,t)))}function c(t){if(t[h]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)c(e)}class f 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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.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=l(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 d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[u]||f.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&c(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 v}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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 f.registerParse=t=>{e=t},f.registerRule=t=>{i=t},f.registerAtRule=e=>{t=e},f.registerRoot=t=>{r=t},vi=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[u]=!0,e.nodes&&e.nodes.forEach((t=>{f.rebuild(t)}))},vi}function dn(){if(yi)return mi;yi=1;var t=fn();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 mi=e,e.default=e,t.registerAtRule(e),mi}function vn(){if(wi)return gi;wi=1;var t,e,i=fn();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},gi=n,n.default=n,gi}function pn(){return Si?bi:(Si=1,bi={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)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--;)i+=t[Math.random()*t.length|0];return i})})}function mn(){if(Ci)return ki;Ci=1;var t=ii.existsSync,e=ii.readFileSync,r=ii.dirname,i=ii.join,n=ii.SourceMapConsumer,s=ii.SourceMapGenerator;class o{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 n(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(i,n,s){if(s||this.unsafeMap||/\.map$/i.test(i))return this.root=r(i),t(i)?(this.mapFile=i,e(i,"utf-8").toString().trim()):void 0}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o,t,!0);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;t&&(h=i(r(t),h));var u=this.loadFile(h,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 ki=o,o.default=o,ki}function yn(){if(xi)return Mi;xi=1;var t=pn().nanoid,e=ii.isAbsolute,i=ii.resolve,n=ii.SourceMapConsumer,s=ii.SourceMapGenerator,o=ii.fileURLToPath,a=ii.pathToFileURL,h=ni(),u=mn(),l=ii,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];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[c]=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=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.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 v(this)[t-1]+e-1}fromOffset(t){var e=v(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;"number"==typeof i&&(s=u.originalPositionFor({column:n-1,line:i})),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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 Mi=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Mi}function gn(){if(Ri)return Ei;Ri=1;var t,e,r=fn();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Ei=i,i.default=i,r.registerRoot(i),Ei}function wn(){if(Ai)return Ii;Ai=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 Ii=t,t.default=t,Ii}function bn(){if(Oi)return Ti;Oi=1;var t=fn(),e=wn();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 Ti=r,r.default=r,t.registerRule(r),Ti}function Sn(){if(Li)return _i;Li=1;var t=ii.dirname,e=ii.relative,r=ii.resolve,i=ii.sep,n=ii.SourceMapConsumer,s=ii.SourceMapGenerator,o=ii.pathToFileURL,a=yn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return _i=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 kn(){if(Pi)return Bi;Pi=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".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 Bi=function(C,M){void 0===M&&(M={});var x,E,R,I,A,T,O,D,N,_,L=C.css.valueOf(),B=M.ignoreErrors,P=L.length,F=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,F)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&F>=P,nextToken(C){if(U.length)return U.pop();if(P>F){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(F)){case n:case s:case a:case h:case o:I=F;do{x=L.charCodeAt(I+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(F,I)],F=I-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(x);T=[G,G,F];break;case c:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(F+1),"url"===_&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){I=F;do{if(O=!1,-1===(I=L.indexOf(")",I+1))){if(B||M){I=F;break}H("bracket")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["brackets",L.slice(F,I+1),F,I],F=I}else F>W?(I=L.indexOf(")",F+1),E=L.slice(F,I+1),-1===I||S.test(E)?(W=-1===I?P:I,T=["(","(",F]):(T=["brackets",E,F,I],F=I)):T=["(","(",F];break;case t:case e:A=x===t?"'":'"',I=F;do{if(O=!1,-1===(I=L.indexOf(A,I+1))){if(B||M){I=F+1;break}H("string")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["string",L.slice(F,I+1),F,I],F=I;break;case g:w.lastIndex=F+1,w.test(L),T=["at-word",L.slice(F,1+(I=0===w.lastIndex?L.length-1:w.lastIndex-2)),F,I],F=I;break;case r:for(I=F,R=!0;L.charCodeAt(I+1)===r;)I+=1,R=!R;if(x=L.charCodeAt(I+1),R&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(I+=1))){for(;k.test(L.charAt(I+1));)I+=1;L.charCodeAt(I+1)===s&&(I+=1)}T=["word",L.slice(F,I+1),F,I],F=I;break;default:x===i&&L.charCodeAt(F+1)===m?(0===(I=L.indexOf("*/",F+2)+1)&&(B||M?I=L.length:H("comment")),T=["comment",L.slice(F,I+1),F,I],F=I):(b.lastIndex=F+1,b.test(L),T=["word",L.slice(F,1+(I=0===b.lastIndex?L.length-1:b.lastIndex-2)),F,I],j.push(T),F=I)}return F++,T}},position:()=>F}}}function Cn(){if(ji)return Fi;ji=1;var t=dn(),e=ln(),r=cn(),i=gn(),n=bn(),s=kn(),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 Fi=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 c=s;t.length>s;){var f=t[s][0];if("space"!==f&&"comment"!==f)break;s++}var d=t.slice(c,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var v=t.length-1;v>=0;v--){if("!important"===(u=t[v])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,v);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=v;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+=d.map((t=>t[1])).join(""),d=[]),this.raw(i,"value",d.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 c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,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 Mn(){if(Wi)return Ui;Wi=1;var t=fn(),e=yn(),r=Cn();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 Ui=i,i.default=i,t.registerParse(i),Ui}function xn(){if(Gi)return Hi;Gi=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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 Hi=t,t.default=t,Hi}function En(){if(Vi)return zi;Vi=1;var t=xn();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 zi=e,e.default=e,zi}function Rn(){if($i)return Yi;$i=1;var t={};return Yi=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function In(){if(Zi)return qi;Zi=1;var t=fn(),i=vn(),n=Sn(),s=Mn(),o=En(),a=gn(),h=oi(),u=hn(),l=u.isClean,c=u.my,f=Rn(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v={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=d[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){return t[l]=!1,t.nodes&&t.nodes.forEach((t=>b(t))),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[c]&&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(!v[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||f("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 c=u[e.eventIndex];if(e.eventIndex+=1,c===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[c])return void(e.visitors=this.listeners[c])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;var e=g(t);for(var r of e)if(r===m)t.nodes&&t.each((t=>{t[l]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},qi=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),qi}function An(){if(en)return tn;en=1;var t=dn(),e=ln(),n=fn(),s=ni(),o=cn(),u=vn(),l=function(){if(Ni)return Di;Ni=1;var t=dn(),e=ln(),n=cn(),s=yn(),o=mn(),u=gn(),l=bn();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var v,p,m=f.inputs,y=i(f,a);if(m)for(var g of(d=[],m)){var w=r({},g,{__proto__:s.prototype});w.map&&(w.map=r({},w.map,{__proto__:o.prototype})),d.push(w)}if(y.nodes&&(v=f.nodes.map((t=>c(t,d))),delete y.nodes),y.source){var b=y.source,S=b.inputId,k=i(b,h);y.source=k,null!=S&&(y.source.input=d[S])}if("root"===y.type)p=new u(y);else if("decl"===y.type)p=new n(y);else if("rule"===y.type)p=new l(y);else if("comment"===y.type)p=new e(y);else{if("atrule"!==y.type)throw new Error("Unknown node type: "+f.type);p=new t(y)}if(v)for(var C of(p.nodes=v,v))C.parent=p;return p}return Di=c,c.default=c,Di}(),c=yn(),f=In(),d=wn(),v=un(),p=Mn(),m=function(){if(Qi)return Ki;Qi=1;var t=vn(),e=In(),r=function(){if(Xi)return Ji;Xi=1;var t=Sn(),e=Mn(),r=En(),i=oi(),n=Rn();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],c=u[1];l&&(this.result.css=l),c&&(this.result.map=c)}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 Ji=s,s.default=s,Ji}(),i=gn();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.16",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 Ki=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Ki}(),y=En(),g=gn(),w=bn(),b=oi(),S=xn();function k(){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 m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),tn=k,k.default=k,tn}!function(){if(on)return sn;on=1;var t=An().Input,e=function(){if(nn)return rn;nn=1;var t=ln(),e=Cn(),r=kn();return rn=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=""}}}();sn=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),An();var Tn=(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))(Tn||{});function On(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=Bn(r);e.push(n+": "+i+";")}}return e.join(" ")}var Dn=/-([a-z])/g,Nn=/^--[a-zA-Z0-9-]+$/,_n=t=>Nn.test(t)?t:t.replace(Dn,((t,e)=>e?e.toUpperCase():"")),Ln=/\B([A-Z])/g,Bn=t=>t.replace(Ln,"-$1").toLowerCase();class Pn{constructor(){Nr(this,"parentElement",null),Nr(this,"parentNode",null),Nr(this,"ownerDocument"),Nr(this,"firstChild",null),Nr(this,"lastChild",null),Nr(this,"previousSibling",null),Nr(this,"nextSibling",null),Nr(this,"ELEMENT_NODE",1),Nr(this,"TEXT_NODE",3),Nr(this,"nodeType"),Nr(this,"nodeName"),Nr(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Pn))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 Fn extends Pn{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),Nr(this,"nodeType",9),Nr(this,"nodeName","#document"),Nr(this,"compatMode","CSS1Compat"),Nr(this,"RRNodeType",Tn.Document),Nr(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===Tn.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===Tn.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===Tn.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===Tn.Element||e===Tn.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===Tn.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=$n(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===Tn.Element||r===Tn.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===Tn.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=qn(this,t,e);return i.parentElement=null,i}removeChild(t){return Zn(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 Fn}createDocumentType(t,e,r){var i=new jn(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new Un(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new Gn(t);return e.ownerDocument=this,e}createComment(t){var e=new zn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Vn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class jn extends Pn{constructor(t,e,r){super(),Nr(this,"nodeType",10),Nr(this,"RRNodeType",Tn.DocumentType),Nr(this,"name"),Nr(this,"publicId"),Nr(this,"systemId"),Nr(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class Un extends Pn{constructor(t){super(),Nr(this,"nodeType",1),Nr(this,"RRNodeType",Tn.Element),Nr(this,"tagName"),Nr(this,"attributes",{}),Nr(this,"shadowRoot",null),Nr(this,"scrollLeft"),Nr(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 Yn(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[_n(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=_n(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=On(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=_n(t),n=r[e]||"";return delete r[e],this.attributes.style=On(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 $n(this,t)}insertBefore(t,e){return qn(this,t,e)}removeChild(t){return Zn(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 Wn extends Un{constructor(){super(...arguments),Nr(this,"currentTime"),Nr(this,"volume"),Nr(this,"paused"),Nr(this,"muted"),Nr(this,"playbackRate"),Nr(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 Hn extends Un{constructor(){super(...arguments),Nr(this,"tagName","DIALOG"),Nr(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 Gn extends Pn{constructor(t){super(),Nr(this,"nodeType",3),Nr(this,"nodeName","#text"),Nr(this,"RRNodeType",Tn.Text),Nr(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 zn extends Pn{constructor(t){super(),Nr(this,"nodeType",8),Nr(this,"nodeName","#comment"),Nr(this,"RRNodeType",Tn.Comment),Nr(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 Vn extends Pn{constructor(t){super(),Nr(this,"nodeName","#cdata-section"),Nr(this,"nodeType",4),Nr(this,"RRNodeType",Tn.CDATA),Nr(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 Yn{constructor(t,e){var r=this;if(Nr(this,"onChange"),Nr(this,"classes",[]),Nr(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(" "))})),Nr(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 $n(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 qn(t,e,r){if(!r)return $n(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 Zn(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 Jn=(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))(Jn||{}),Xn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Kn={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"},Qn=null;function ts(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Qn&&(Qn=new WeakSet,setTimeout((()=>{Qn=null}),0)),!is(t,e)){var s=rs(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case Tn.Document:if(!ns(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==Qn||Qn.add(t))}break;case Tn.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;ts(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),es(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)&&Xn[o])t.setAttributeNS(Xn[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),es(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case Tn.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case Tn.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 c=s.sheet;c&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,c)));break;case"DIALOG":var f=s,d=o,v=f.open,p=f.matches("dialog:modal"),m=d.open,y=d.isModal,g=p!==y,w=v!==m;if((g||v&&w)&&f.close(),m&&(w||g))try{y?f.showModal():f.show()}catch(t){console.warn(t)}}break;case Tn.Text:case Tn.Comment:case Tn.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Qn?void 0:Qn.has(t))&&(Qn.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function es(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],c=n[a],f=s[h],d=s[u],v=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===c)c=n[--a];else if(ns(l,f,r.mirror,i))l=n[++o],f=s[++h];else if(ns(c,d,r.mirror,i))c=n[--a],d=s[--u];else if(ns(l,d,r.mirror,i)){try{t.insertBefore(l,c.nextSibling)}catch(t){console.warn(t)}l=n[++o],d=s[--u]}else if(ns(c,f,r.mirror,i)){try{t.insertBefore(c,l)}catch(t){console.warn(t)}c=n[--a],f=s[++h]}else{if(!v){v={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(v[r.mirror.getId(y)]=m)}}var g=n[p=v[i.getId(f)]];if(void 0!==p&&g&&ns(g,f,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=rs(f,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)}}f=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=rs(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;)ts(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function rs(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&is(o,t))return o;switch(t.RRNodeType){case Tn.Document:o=new Document;break;case Tn.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case Tn.Element:var a=t.tagName.toLowerCase();a=Kn[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Xn.svg,a):document.createElement(t.tagName);break;case Tn.Text:o=document.createTextNode(t.data);break;case Tn.Comment:o=document.createComment(t.data);break;case Tn.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Qn||Qn.add(o)}catch(t){}return o}function is(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function ns(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&is(t,e)}class ss extends Fn{constructor(t){super(),Nr(this,"UNSERIALIZED_STARTING_ID",-2),Nr(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),Nr(this,"mirror",new ys),Nr(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.l--}createDocument(t,e,r){return new ss}createDocumentType(t,e,r){var i=new os(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new hs(r);break;case"IFRAME":e=new fs(r,this.mirror);break;case"CANVAS":e=new ls(r);break;case"STYLE":e=new cs(r);break;case"DIALOG":e=new us(r);break;default:e=new as(r)}return e.ownerDocument=this,e}createComment(t){var e=new vs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new ps(t);return e.ownerDocument=this,e}createTextNode(t){var e=new ds(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}}var os=jn;class as extends Un{constructor(){super(...arguments),Nr(this,"inputData",null),Nr(this,"scrollData",null)}}class hs extends Wn{}class us extends Hn{}class ls extends as{constructor(){super(...arguments),Nr(this,"rr_dataURL",null),Nr(this,"canvasMutations",[])}getContext(){return null}}class cs extends as{constructor(){super(...arguments),Nr(this,"rules",[])}}class fs extends as{constructor(t,e){super(t),Nr(this,"contentDocument",new ss),this.contentDocument.mirror=e}}var ds=Gn,vs=zn,ps=Vn;function ms(t,e,i,n){var s,o;switch(t.nodeType){case Jn.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case Jn.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case Jn.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 Jn.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case Jn.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case Jn.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case Jn.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var c=i.getMeta(t);return e instanceof ss&&(c||(c=gs(s,e.unserializedId),i.add(t,c)),e.mirror.add(s,r({},c))),s}class ys{constructor(){Nr(this,"idNodeMap",new Map),Nr(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 gs(t,e){switch(t.RRNodeType){case Tn.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case Tn.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case Tn.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case Tn.Text:case Tn.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case Tn.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function ws(t,e){return-1!==t.indexOf(e)}var bs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Ss={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},ks={};function Cs(t){if(ks[t])return ks[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 bs?bs[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 Ss?Ss[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 ks[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 c=l[t].prototype;return c?(ws(h=navigator.userAgent,"AppleWebKit")&&!ws(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),ks[t]=c):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Ms={};function xs(t,e,r){var i,n=t+"."+String(r);if(Ms[n])return Ms[n].call(e);var s=Cs(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Ms[n]=o,o.call(e)):e[r]}var Es={};function Rs(t,e,r){var i=t+"."+String(r);if(Es[i])return Es[i].bind(e);var n=Cs(t)[r];return"function"!=typeof n?e[r]:(Es[i]=n,n.bind(e))}function Is(){return Cs("MutationObserver").constructor}function As(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 Ts={childNodes:t=>xs("Node",t,"childNodes"),parentNode:t=>xs("Node",t,"parentNode"),parentElement:t=>xs("Node",t,"parentElement"),textContent:t=>xs("Node",t,"textContent"),contains:(t,e)=>Rs("Node",t,"contains")(e),getRootNode:t=>Rs("Node",t,"getRootNode")(),host:t=>t&&"host"in t?xs("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?xs("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Rs("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Rs("Element",t,"querySelectorAll")(e),mutationObserver:Is,patch:As};function Os(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>Ds(r,t,e,i)}function Ds(t,e,r,i){Ns((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function Ns(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var _s="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.",Ls={map:{},getId(){return console.error(_s),-1},getNode(){return console.error(_s),null},removeNodeFromMap(){console.error(_s)},has(){return console.error(_s),!1},reset(){console.error(_s)}};function Bs(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 Ps(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)}}}),()=>Ps(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ls=new Proxy(Ls,{get(t,e,r){return"map"===e&&console.error(_s),Reflect.get(t,e,r)}}));var Fs=Date.now;function js(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=Ts.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=Ts.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function Us(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ws(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Hs(t){return t?t.nodeType===t.ELEMENT_NODE?t:Ts.parentElement(t):null}function Gs(t,e,r,i){if(!t)return!1;var n=Hs(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(xt(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 zs(t,e){return-1!==e.getId(t)}function Vs(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===pt}function Ys(t,e){if(H(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Ts.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||Ys(i,e))}function $s(t){return Boolean(t.changedTouches)}function qs(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 Zs(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 Js(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Js(t.children[r],e)}function Xs(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Ks(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Qs(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=Qs(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 to(t){return!!t&&(t instanceof Pn&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Ts.shadowRoot(t)))}function eo(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:eo(r.cssRules,e.slice(1)):null}function ro(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function io(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())||(Fs=()=>(new Date).getTime());class no{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 so(t){var e,r=null;return"getRootNode"in t&&(null==(e=Ts.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ts.host(Ts.getRootNode(t))&&(r=Ts.host(Ts.getRootNode(t))),r}function oo(t){for(var e,r=t;e=so(r);)r=e;return r}function ao(t){var e=t.ownerDocument;if(!e)return!1;var r=oo(t);return Ts.contains(e,r)}function ho(t){var e=t.ownerDocument;return!!e&&(Ts.contains(e,t)||ao(t))}var uo=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:no,get _mirror(){return Ls},callSafely:Ns,closestElementOfNode:Hs,getBaseDimension:Qs,getNestedRule:eo,getPositionsAndIndex:ro,getRootShadowHost:oo,getShadowHost:so,getWindowHeight:Us,getWindowScroll:js,getWindowWidth:Ws,hasShadowRoot:to,hookSetter:Ps,inDom:ho,isAncestorRemoved:Ys,isBlocked:Gs,isIgnored:Vs,isSerialized:zs,isSerializedIframe:Xs,isSerializedStylesheet:Ks,iterateResolveTree:Js,legacy_isTouchEvent:$s,get nowTimestamp(){return Fs},on:Os,polyfill:qs,queueToResolveTrees:Zs,removeEventListenerSafely:Ds,shadowHostInDom:ao,throttle:Bs,uniqueTextMutations:io},Symbol.toStringTag,{value:"Module"})),lo=(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))(lo||{}),co="rrweb/fullscreen",fo=(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))(fo||{}),vo=(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))(vo||{}),po=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(po||{}),mo=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(mo||{}),yo=(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))(yo||{}),go=(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))(go||{}),wo=(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))(wo||{});function bo(t){return"__ln"in t}class So{constructor(){c(this,"length",0),c(this,"head",null),c(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&&bo(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&&bo(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 ko,Co=(t,e)=>t+"@"+e;class Mo{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"canvasMaskingConfigured"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"canvasManagerReleased",!1),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){var t,e=E();try{this.processBufferedMutations()}finally{(t=E()-e)>N.slowestBatchMs&&(N.slowestBatchMs=t)}}})),c(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new So,i=t=>{for(var e=t,r=pt;r===pt;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=Ts.parentNode(n);if(s&&ho(n)&&"TEXTAREA"!==s.tagName){var o=H(s)?this.mirror.getId(so(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=Bt(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,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Xs(t,this.mirror)&&this.iframeManager.addIframe(t),Ks(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),to(n)&&this.shadowDomManager.addShadowRoot(Ts.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)Eo(this.removesSubTreeCache,s)&&!this.movedSet.has(Ts.parentNode(s))||n(s);for(var o of this.addedSet)Ro(this.droppedSet,o)||Eo(this.removesSubTreeCache,o)?Ro(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(Ts.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(Ts.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=Ts.parentNode(f.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=Ts.host(v);if(-1!==this.mirror.getId(p)){h=f;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=Ts.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=t.attributes;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(m))})),c(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),c(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(Ts.childNodes(t),(t=>Ts.textContent(t)||"")).join("");e.attributes.value=J({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Q(t),value:r,maskInputFn:this.maskInputFn})})),c(this,"processMutation",(t=>{if(!Vs(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Ts.textContent(t.target);Gs(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Et(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,Hs(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=Q(r);n=J({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(Gs(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(this.attributes.push(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Mt(r.tagName,i))if(o.attributes[i]=Ct(this.doc,X(r.tagName),X(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&(a.style.cssText=t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(o.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(Gs(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=H(t.target)?this.mirror.getId(Ts.host(t.target)):this.mirror.getId(t.target);Gs(t.target,this.blockClass,this.blockSelector,!1)||Vs(e,this.mirror,this.slimDOMOptions)||!zs(e,this.mirror)||(this.addedSet.has(e)?(xo(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||Ys(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Co(r,i)]?xo(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!H(t.target)||!G(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),Ts.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(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(Vs(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[Co(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Gs(t,this.blockClass,this.blockSelector,!1)||(Ts.childNodes(t).forEach((t=>this.genAdds(t))),to(t)&&Ts.childNodes(Ts.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","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 xo(t,e){t.delete(e),Ts.childNodes(e).forEach((e=>xo(t,e)))}function Eo(t,e,r){return 0!==t.size&&function(t,e,r){var i=Ts.parentNode(e);return!!i&&t.has(i)}(t,e)}function Ro(t,e){return 0!==t.size&&Io(t,e)}function Io(t,e){var r=Ts.parentNode(e);return!!r&&(!!t.has(r)||Io(t,r))}var Ao=t=>ko?function(){try{return t(...arguments)}catch(t){if(ko&&!0===ko(t))return;throw t}}:t,To=[];function Oo(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 Do(t,e){var r=new Mo;To.push(r),r.init(t);var i=new(Is())(Ao(r.processMutations.bind(r))),n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),i.observe(e,n),{observer:i,buffer:r}}function No(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=Oo(t);if(o&&!Gs(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var c=js(r.defaultView);h=c.left,u=c.top}else h=o.scrollLeft,u=o.scrollTop;var f=h+","+u;a.get(l)!==f&&(a.set(l,f),e({id:l,x:h,y:u}))}},u=[Os("scroll",Ao(Bs(Ao((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(Os("scrollend",Ao(h),r)),()=>u.forEach((t=>t()))}function _o(t,e){for(var r=To.length-1;r>=0;r--){var i=To[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),To.splice(r,1))}}}var Lo=["INPUT","TEXTAREA","SELECT"],Bo=new WeakMap;function Po(t){return function t(e,r){if(Wo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Wo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Wo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Wo("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 Fo(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function jo(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:Ts.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}}),Ao((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function Uo(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};if(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,c=t.canvasMutationCb,f=t.fontCb,d=t.selectionCb,v=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),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var o=Do(t,t.doc);i=o.observer,n=o.buffer}var a,h,u,l,c,f,d,v,p,m,y,g,w,b=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=Bs(Ao((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=Ao(Bs(Ao((t=>{var e=Oo(t),r=$s(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=Fs()),h.push({x:i,y:o,id:n.getId(e),timeOffset:Fs()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?fo.Drag:t instanceof MouseEvent?fo.MouseMove:fo.TouchMove)})),o,{trailing:!1})),c=[Os("mousemove",l,i),Os("touchmove",l,i),Os("drag",l,i)];return Ao((()=>{c.forEach((t=>t()))}))}(t),S=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(vo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=X(t),h=(t=>i=>{var a=Oo(i);if(!Gs(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=po.Mouse;break;case"touch":h=po.Touch;break;case"pen":h=po.Pen}h===po.Touch&&(vo[t]===vo.MouseDown?u="TouchStart":vo[t]===vo.MouseUp&&(u="TouchEnd"))}else $s(i)&&(h=po.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===po.Touch||u.startsWith("Mouse")&&h===po.Mouse)&&(h=null)):vo[t]===vo.Click&&(h=l,l=null);var c=$s(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),d=c.clientX,v=c.clientY;Ao(e)(r({type:vo[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(vo[t]){case vo.MouseDown:case vo.MouseUp:a=a.replace("mouse","pointer");break;case vo.TouchStart:case vo.TouchEnd:return}u.push(Os(a,h,i))})),Ao((()=>{u.forEach((t=>t()))}))}(t),k=No(t),C=(a=t.viewportResizeCb,h=s,u=-1,l=-1,Os("resize",Ao(Bs(Ao((()=>{var t=Us(),e=Ws();u===t&&l===e||(a({width:Number(e),height:Number(t)}),u=t,l=e)})),200)),h)),M=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,c=t.userTriggeredOnInput;function f(t){var e=Oo(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var f=e&&e.tagName;if(e&&"OPTION"===f&&(e=Ts.parentElement(e)),e&&f&&Lo.indexOf(f)>=0&&!Gs(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var v=e.value,p=!1,m=Q(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[f.toLowerCase()]||u[m])&&(v=J({element:e,maskInputOptions:u,tagName:f,type:m,value:v,maskInputFn:l})),d(e,c?{text:v,isChecked:p,userTriggered:r}:{text:v,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;d(t,c?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function d(t,i){var s=Bo.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){Bo.set(t,i);var o=n.getId(t);Ao(e)(r({},i,{id:o}))}}var v=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>Os(t,Ao(f),i))),p=i.defaultView;if(!p)return()=>{v.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&v.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=>Ps(t[0],t[1],{set(){Ao(f)({target:this,isTrusted:!1})}},!1,p)))),Ao((()=>{v.forEach((t=>t()))}))}(t),x=(f=(c=t).mediaInteractionCb,d=c.blockClass,v=c.blockSelector,p=c.mirror,m=c.sampling,y=c.doc,g=Ao((t=>Bs(Ao((e=>{var r=Oo(e);if(r&&!Gs(r,d,v,!0)){var i=r.currentTime,n=r.volume,s=r.muted,o=r.playbackRate,a=r.loop;f({type:t,id:p.getId(r),currentTime:i,volume:n,muted:s,playbackRate:o,loop:a})}})),m.media||500))),w=[Os("play",g(yo.Play),y),Os("pause",g(yo.Pause),y),Os("seeked",g(yo.Seeked),y),Os("volumechange",g(yo.VolumeChange),y),Os("ratechange",g(yo.RateChange),y)],Ao((()=>{w.forEach((t=>t()))}))),E=()=>{},R=()=>{},I=()=>{},A=()=>{};t.recordDOM&&(E=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:Ao(((t,e,s)=>{var o=s[0],a=s[1],h=Fo(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)}))}),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:Ao(((t,e,s)=>{var o=s[0],a=Fo(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)}))}),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:Ao(((t,e,s)=>{var o=s[0],a=Fo(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)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ao(((t,e,s)=>{var o=s[0],a=Fo(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)}))}));var l={};Ho("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Ho("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Ho("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Ho("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var e=t[0],s=t[1];c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ao(((t,e,s)=>{var o=s[0],a=s[1],h=Fo(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:[...Po(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ao(((t,e,s)=>{var o=s[0],a=Fo(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:[...Po(e),o]}]}),t.apply(e,s)}))})})),Ao((()=>{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=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s}),R=jo(t,t.doc),I=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:Ao(((t,e,o)=>{var h,u=o[0],l=o[1],c=o[2];if(n.has(u))return a.apply(e,[u,l,c]);var f=Fo(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror),d=f.id,v=f.styleId;return(d&&-1!==d||v&&-1!==v)&&r({id:d,styleId:v,set:{property:u,value:l,priority:c},index:Po(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ao(((t,e,o)=>{var a,u=o[0];if(n.has(u))return h.apply(e,[u]);var l=Fo(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror),c=l.id,f=l.styleId;return(c&&-1!==c||f&&-1!==f)&&r({id:c,styleId:f,remove:{property:u},index:Po(e.parentRule)}),t.apply(e,o)}))}),Ao((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s}),t.collectFonts&&(A=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=As(r.fonts,"add",(function(t){return function(r){return setTimeout(Ao((()=>{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),Ao((()=>{n.forEach((t=>t()))}))}(t)));var T=function(t){var e=t.doc,r=t.mirror,i=t.blockClass,n=t.blockSelector,s=t.selectionCb,o=!0,a=Ao((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),c=l.startContainer,f=l.startOffset,d=l.endContainer,v=l.endOffset;Gs(c,i,n,!0)||Gs(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),Os("selectionchange",a)}(t),O=function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?As(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),D=[];for(var N of t.plugins)D.push(N.observer(N.callback,s,N.options));return Ao((()=>{if(n){n.destroy(),n.reset();var e=To.indexOf(n);-1!==e&&To.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),b(),S(),k(),C(),M(),x(),E(),R(),I(),A(),T(),O(),D.forEach((t=>t()))}))}function Wo(t){return void 0!==window[t]}function Ho(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Go{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(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 zo{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Go(mt)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"pageHideListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedWindows",new WeakMap),c(this,"attachedDocuments",new WeakMap),c(this,"attachedIframes",new Map),c(this,"loadListenerDisposers",new WeakMap),c(this,"iframeElementsById",new Map),c(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Go(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=>Ns(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{Ds(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);Ns((()=>{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)}))}Ns((()=>{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 lo.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:lo.IncrementalSnapshot,data:{source:fo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case lo.Meta:case lo.Load:case lo.DomContentLoaded:return!1;case lo.Plugin:return e;case lo.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case lo.IncrementalSnapshot:switch(e.data.source){case fo.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 fo.Drag:case fo.TouchMove:case fo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case fo.ViewportResize:return!1;case fo.MediaInteraction:case fo.MouseInteraction:case fo.Scroll:case fo.CanvasMutation:case fo.Input:return this.replaceIds(e.data,t,["id"]),e;case fo.StyleSheetRule:case fo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case fo.Font:return e;case fo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case fo.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===wo.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&&(Ds(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(Ds(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=>{Ns((()=>this.mirror.removeNodeFromMap(t)))})),Ns((()=>_o(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&&Ds(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{Ds(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 Vo{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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(G(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=Ts.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=Do(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=To.indexOf(h);-1!==t&&To.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:No(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(Ts.host(t))),this.restoreHandlers.push({doc:s,handler:jo({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:As(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=Ts.shadowRoot(this);return s&&ho(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 Yo="skip-frame";function $o(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 qo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Jo=0;64>Jo;Jo++)Zo[qo.charCodeAt(Jo)]=Jo;var Xo=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=Zo[t.charCodeAt(e)],i=Zo[t.charCodeAt(e+1)],n=Zo[t.charCodeAt(e+2)],s=Zo[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},Ko=new Map,Qo=(t,e,r)=>{if(t&&(ra(t,e)||"object"==typeof t)){var i=function(t,e){var r=Ko.get(t);return r||Ko.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 ta(t,e,r,i){return t instanceof Array?t.map((t=>ta(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+=qo[r[e]>>2],n+=qo[(3&r[e])<<4|r[e+1]>>4],n+=qo[(15&r[e+1])<<2|r[e+2]>>6],n+=qo[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:[ta(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:[ta(t.data,e,r,i),t.width,t.height]}:ra(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Qo(t,e,r)}:t}var ea=(t,e,r,i)=>t.map((t=>ta(t,e,r,i))),ra=(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])))},ia=["webgl","webgl2"];function na(t){return"nodeType"in t}function sa(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 As(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||na(o)&&Gs(o,e,i,!0))return n.call(this,s);na(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=As(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(!Gs(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&ia.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 oa(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=As(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 c=t.apply(this,u);if(Qo(c,s,this),"tagName"in this.canvas&&!Gs(this.canvas,i,n,!0)){var f=ea(u,s,this,o);r(this.canvas,{type:e,property:h,args:f})}return c}}));a.push(u)}catch(i){var l=Ps(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 aa,ha,ua,la='(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',ca="undefined"!=typeof self&&self.Blob&&new Blob([la],{type:"text/javascript;charset=utf-8"});function fa(t){var e;try{if(!(e=ca&&(self.URL||self.webkitURL).createObjectURL(ca)))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(la),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class da{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(this,"refCount",0),c(this,"torndown",!1),c(this,"resetFrameDedup",null),c(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,u=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:u})}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=sa(r,i,n,!0),l=new Map;try{a=new fa}catch(t){return}var c=!1;a.onerror=()=>{var t;c=!0,cancelAnimationFrame(f),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:mo["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 f,d=1e3/t,v=0,p=t=>{var u,m;c||(v&&d>t-v||(v=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{Gs(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,c=t.clientHeight||t.height,f=Math.max(1,Math.round(u*h)),d=Math.max(1,Math.round(c*h)),v=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return Yo}if(void 0!==o){if(!Array.isArray(o)||!o.every($o))return Yo;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,f,d,u,c);if(v===Yo)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:f,resizeHeight:d,resizeQuality:"medium"}:{resizeWidth:f,resizeHeight:d});a.postMessage({id:i,bitmap:p,width:f,height:d,displayWidth:u,displayHeight:c,dataURLOptions:s.dataURLOptions,maskRegions:v},[p])}catch(t){l.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),f=requestAnimationFrame(p))};f=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(f),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=sa(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=As(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 Gs(this.canvas,r,i,!0)||setTimeout((()=>{var r=ea(h,e,this,n);t(this.canvas,{type:mo["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=Ps(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:mo["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(...oa(e.WebGLRenderingContext.prototype,mo.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...oa(e.WebGL2RenderingContext.prototype,mo.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,u)));this.mutationCb({id:e,type:r[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class va{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new no),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}inlineDeferredLinkElement(t,e){if(-1!==e&&t.isConnected){var r=null;try{var i=t.sheet;i&&(r=V(i))}catch(t){}r&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:r}}]})}}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;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:Y(e,t.href),index:r})))})),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,It.forEach((t=>t.abort())),It.clear()}trackStylesheetInLinkElement(t){}}class pa{constructor(){c(this,"nodeMap",new WeakMap),c(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 ma=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var ya=document.createElement("iframe");document.body.appendChild(ya),Array.from=(null==(n=ya.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(ya)}}catch(t){console.debug("Unable to override Array.from",t)}var ga=Z(),wa=new Set([fo.Mutation,fo.MediaInteraction,fo.StyleSheetRule,fo.CanvasMutation,fo.Font,fo.Log,fo.StyleDeclaration,fo.AdoptedStyleSheet]);function ba(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 Sa(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,c=i.ignoreClass,f=void 0===c?"rr-ignore":c,d=i.ignoreSelector,v=void 0===d?null:d,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=void 0===S?1e4:S,C=i.maskAllInputs,M=i.maskInputOptions,N=i.slimDOMOptions,L=i.maskInputFn,B=i.maskTextFn,P=i.hooks,F=i.packFn,j=i.sampling,U=void 0===j?{}:j,W=i.dataURLOptions,H=void 0===W?{}:W,G=i.canvasResolutionScale,z=i.canvasMasking,V=i.mousemoveWait,Y=i.recordDOM,Z=void 0===Y||Y,J=i.recordCanvas,X=void 0!==J&&J,K=i.recordCrossOriginIframes,Q=void 0!==K&&K,tt=i.recordAfter,et=void 0===tt?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":tt,rt=i.userTriggeredOnInput,it=void 0!==rt&&rt,nt=i.collectFonts,st=void 0!==nt&&nt,ot=i.inlineImages,at=void 0!==ot&&ot,ht=i.plugins,ut=i.keepIframeSrcFn,lt=void 0===ut?()=>!1:ut,ct=i.ignoreCSSAttributes,ft=void 0===ct?new Set([]):ct,dt=i.attributeFilter;ko=i.errorHandler;var vt=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},H),pt=!Q||window.parent===window,mt=!1;if(!pt)try{window.parent.document&&(mt=!1)}catch(t){mt=!0}if(pt&&!n)throw new Error("emit function is required");if(!pt&&!mt)return()=>{};void 0!==V&&void 0===U.mousemove&&(U.mousemove=V),ga.reset();var yt,gt=!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==M?M:{password:!0},wt=Pt(void 0!==N&&N);qs();var bt,St,kt=0,Ct=new Map,Mt=t=>{for(var e of ht||[])e.eventProcessor&&(t=e.eventProcessor(t));return F&&!mt&&(t=F(t)),t};aa=(t,e)=>{var r,i=t;if(i.timestamp=Fs(),!(null==(r=To[0])?void 0:r.isFrozen())||i.type===lo.FullSnapshot||i.type===lo.IncrementalSnapshot&&wa.has(i.data.source)||To.forEach((t=>t.unfreeze())),pt)null==n||n(Mt(i),e);else if(mt){var a={type:"rrweb",event:Mt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===lo.FullSnapshot)yt=i,kt=0;else if(i.type===lo.IncrementalSnapshot){if(i.data.source===fo.Mutation&&i.data.isAttachIframe)return;kt++,(o&&kt>=o||s&&i.timestamp-yt.timestamp>s)&&ha(!0)}};var xt=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=ga.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=At.getIframeElementById(r);n&&i.has(n)?At.forgetIframeId(r):(null==bt||bt(r),At.removeIframeById(r))}})),null==St||St(),At.cleanupDetachedIframes()}aa({type:lo.IncrementalSnapshot,data:r({source:fo.Mutation},t)})},Et=t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.Scroll},t)}),Rt=t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.CanvasMutation},t)}),It=new va({mutationCb:xt,adoptedStyleSheetCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.AdoptedStyleSheet},t)})}),At=new zo({mirror:ga,mutationCb:xt,stylesheetManager:It,recordCrossOriginIframes:Q,wrappedEmit:aa});for(var Tt of ht||[])Tt.getMirror&&Tt.getMirror({nodeMirror:ga,crossOriginIframeMirror:At.crossOriginIframeMirror,crossOriginIframeStyleMirror:At.crossOriginIframeStyleMirror});var Ot=new pa,Dt=null==z?void 0:z.configured;ua=new da({recordCanvas:X,mutationCb:Rt,win:window,blockClass:h,blockSelector:l,mirror:ga,sampling:U.canvas,dataURLOptions:vt,resolutionScale:G,canvasMasking:z});var Nt=new Vo({mutationCb:xt,scrollCb:Et,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:gt,dataURLOptions:vt,maskTextFn:B,maskInputFn:L,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,sampling:U,slimDOMOptions:wt,iframeManager:At,stylesheetManager:It,canvasManager:ua,keepIframeSrcFn:lt,processedNodeManager:Ot,attributeFilter:dt},mirror:ga});ha=function(t){if(void 0===t&&(t=!1),Z){aa({type:lo.Meta,data:{href:window.location.href,width:Ws(),height:Us()}},t),null==e||e(),e=void 0,It.reset(),Nt.init(),To.forEach((t=>t.lock()));var r,i,n=null;try{n=function(t,e){var r,i=e||{},n=i.mirror,s=void 0===n?new q:n,o=i.blockClass,a=void 0===o?"rr-block":o,h=i.blockSelector,u=void 0===h?null:h,l=i.maskTextClass,c=void 0===l?"rr-mask":l,f=i.maskTextSelector,d=void 0===f?null:f,v=i.inlineStylesheet,p=void 0===v||v,m=i.inlineImages,y=void 0!==m&&m,g=i.recordCanvas,w=void 0!==g&&g,b=i.canvasMaskingConfigured,S=i.maskAllInputs,k=void 0!==S&&S,C=i.maskTextFn,M=i.maskInputFn,N=i.slimDOM,L=i.dataURLOptions,B=i.preserveWhiteSpace,P=i.onSerialize,F=i.onIframeLoad,j=i.iframeLoadTimeout,U=i.onIframeListenerRegistered,W=i.onStylesheetLoad,H=i.stylesheetLoadTimeout,G=i.keepIframeSrcFn,z=void 0===G?()=>!1:G,V=i.maxDepth,Y=i.inlineStylesheetBudgetRules,Z=!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}:!1===k?{password:!0}:k,J=Pt(void 0!==N&&N);r=Y,(R+=1)>1||(A=x(),D=[],O=_(r),I=E());try{return Bt(t,{doc:t,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:Z,maskTextFn:C,maskInputFn:M,slimDOMOptions:J,dataURLOptions:L,inlineImages:y,recordCanvas:w,canvasMaskingConfigured:b,preserveWhiteSpace:B,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:j,onIframeListenerRegistered:U,onStylesheetLoad:W,stylesheetLoadTimeout:H,keepIframeSrcFn:z,newlyAddedElement:!1,maxDepth:V})}finally{0===R?T||x():(R-=1)>0||(A.durationMs=E()-I,A.deferredStylesheetCount=D.length,O=null,T=A)}}(document,{mirror:ga,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:gt,inlineStylesheetBudgetRules:k,maskTextFn:B,maskInputFn:L,slimDOM:wt,dataURLOptions:vt,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,onSerialize(t){Xs(t,ga)&&At.addIframe(t),Ks(t,ga)&&It.trackLinkElement(t),to(t)&&Nt.addShadowRoot(Ts.shadowRoot(t),document)},onIframeLoad(t,e){At.attachIframe(t,e),Nt.observeAttachShadow(t)},onIframeListenerRegistered(t,e){At.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){It.attachLinkElement(t,e)},keepIframeSrcFn:lt})}finally{r=D,D=[],i=r}if(!n)return console.warn("Failed to snapshot the document");aa({type:lo.FullSnapshot,data:{node:n,initialOffset:js(window)}},t),To.forEach((t=>t.unlock())),ua.onFullSnapshot(),i.length&&(e=function(t,r,i){var n=!1,s=null,o=0,a=i=>{if(s=null,!n){var h=function(){var e=t[o];t[o]=null,o+=1,e&&Ns((()=>r.inlineDeferredLinkElement(e,ga.getId(e))))};do{h()}while(t.length>o&&i&&!i.didTimeout&&i.timeRemaining()>5);t.length>o?s=ba(a):e=void 0}};return s=ba(a),()=>{n=!0,null==s||s.cancel(),s=null}}(i,It)),Q&&At.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&It.adoptStyleSheets(document.adoptedStyleSheets,ga.getId(document))}};try{var _t=[];bt=t=>{var e=Ct.get(t);e&&(e.forEach((t=>{Ns(t);var e=_t.indexOf(t);-1!==e&&_t.splice(e,1)})),Ct.delete(t))},St=()=>{for(var t of Ct){var e=t[0],r=ga.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==bt||bt(e)}catch(t){null==bt||bt(e)}else null==bt||bt(e)}};var Lt=t=>{var e;return Ao(Uo)({mutationCb:xt,mousemoveCb:(t,e)=>aa({type:lo.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.MouseInteraction},t)}),scrollCb:Et,viewportResizeCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.ViewportResize},t)}),inputCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.Input},t)}),mediaInteractionCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.MediaInteraction},t)}),styleSheetRuleCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.StyleSheetRule},t)}),styleDeclarationCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.StyleDeclaration},t)}),canvasMutationCb:Rt,fontCb:t=>aa({type:lo.IncrementalSnapshot,data:r({source:fo.Font},t)}),selectionCb(t){aa({type:lo.IncrementalSnapshot,data:r({source:fo.Selection},t)})},customElementCb(t){aa({type:lo.IncrementalSnapshot,data:r({source:fo.CustomElement},t)})},blockClass:h,ignoreClass:f,ignoreSelector:v,maskTextClass:m,maskTextSelector:g,maskInputOptions:gt,inlineStylesheet:b,sampling:U,recordDOM:Z,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,userTriggeredOnInput:it,collectFonts:st,doc:t,maskInputFn:L,maskTextFn:B,keepIframeSrcFn:lt,blockSelector:l,slimDOMOptions:wt,dataURLOptions:vt,mirror:ga,iframeManager:At,stylesheetManager:It,shadowDomManager:Nt,processedNodeManager:Ot,canvasManager:ua,ignoreCSSAttributes:ft,attributeFilter:dt,plugins:(null==(e=null==ht?void 0:ht.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>aa({type:lo.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},P)};At.addLoadListener((t=>{try{var e=ga.getId(t),r=Lt(t.contentDocument);if(_t.push(r),-1!==e){var i=Ct.get(e);i||Ct.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),At.addPageHideListener((t=>{var e=ga.getId(t);null==bt||bt(e),_o(t)}));var Ft=-1,jt=t=>aa({type:lo.Custom,data:{tag:co,payload:t}}),Ut=()=>{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?ga.getId(s):-1;o!==Ft&&(-1!==Ft&&jt({id:Ft,enter:!1}),Ft=o,-1!==o&&jt({id:o,enter:!0}))},Wt=()=>{ha(),_t.push(Lt(document)),_t.push(Os("fullscreenchange",Ut)),_t.push(Os("webkitfullscreenchange",Ut)),_t.push(Os("mozfullscreenchange",Ut)),_t.push(Os("MSFullscreenChange",Ut)),ma=!0};return["interactive","complete"].includes(document.readyState)?Wt():(_t.push(Os("DOMContentLoaded",(()=>{aa({type:lo.DomContentLoaded,data:{}}),"DOMContentLoaded"===et&&Wt()}))),_t.push(Os("load",(()=>{aa({type:lo.Load,data:{}}),"load"===et&&Wt()}),window))),()=>{null==e||e(),e=void 0,_t.forEach((t=>Ns(t))),Ot.destroy(),At.removeLoadListener(),At.destroy(),Ct.clear(),Nt.reset(),ga.reset(),ma=!1,ko=void 0}}catch(t){console.warn(t)}}function ka(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)}))}}}Sa.addCustomEvent=(t,e)=>{if(!ma)throw new Error("please add custom event after start recording");aa({type:lo.Custom,data:{tag:t,payload:e}})},Sa.freezePage=()=>{To.forEach((t=>t.freeze()))},Sa.takeFullSnapshot=t=>{if(!ma)throw new Error("please take full snapshot after start recording");ha(t)},Sa.mirror=ga;var Ca,Ma,xa=Object.freeze(Object.defineProperty({__proto__:null,default:ka},Symbol.toStringTag,{value:"Module"}));function Ea(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])?v.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):v.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;v.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===f(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(v.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 c(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function f(t){var e=l(t,"Y")&&c(t,"Y"),r=l(t,"X")&&c(t,"X");return e||r}function d(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(d.bind(t,e))}function v(r,i,n){var a,u,l,c,f=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,c=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,c=h),d({scrollable:a,method:c,startTime:f,startX:u,startY:l,x:i,y:n})}}class Ra{constructor(t,e){void 0===t&&(t=[]),c(this,"timeOffset",0),c(this,"speed"),c(this,"actions"),c(this,"raf",null),c(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 Ia(t,e){if(t.type===lo.IncrementalSnapshot&&t.data.source===fo.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 Aa(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}(Ma=Ca||(Ca={}))[Ma.NotStarted=0]="NotStarted",Ma[Ma.Running=1]="Running",Ma[Ma.Stopped=2]="Stopped";var Ta={type:"xstate.init"};function Oa(t){return void 0===t?[]:[].concat(t)}function Da(t){return{type:"xstate.assign",assignment:t}}function Na(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 _a(t){return function(e){return t===e}}function La(t){return"string"==typeof t?{type:t}:t}function Ba(t,e){return{value:t,context:e,actions:[],changed:!1,matches:_a(t)}}function Pa(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 Fa(t,e){void 0===e&&(e={});var r=Aa(Pa(Oa(t.states[t.initial].entry).map((function(t){return Na(t,e.actions)})),t.context,Ta),2),i={config:t,bh:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:_a(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=La(r),l=t.states[a];if(l.on){var c=Oa(l.on[u.type]);try{for(var f=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})}}(c),d=f.next();!d.done;d=f.next()){var v=d.value;if(void 0===v)return Ba(a,h);var p="string"==typeof v?{target:v}:v,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=Aa(Pa([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return Na(t,i.bh.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:_a(y)}}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(n)throw n.error}}}return Ba(a,h)}};return i}var ja=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function Ua(t){var e=t.initialState,r=Ca.NotStarted,i=new Set,n={Sf:t,send(n){r===Ca.Running&&(e=t.transition(e,n),ja(e,La(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:_a(s.value)}}return r=Ca.Running,ja(e,Ta),n},stop:()=>(r=Ca.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function Wa(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===lo.Meta&&e>=i.timestamp)return t.slice(r)}return t}var Ha=new Map;function Ga(t,e){var r=Ha.get(t);return r||Ha.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function za(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 za(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 Ga(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(za(t,r,i))))}if("base64"in e)return Xo(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(za(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(za(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var Va=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ya(t){return $a.apply(this,arguments)}function $a(){return($a=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===mo.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(za(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(Va.includes(r)){var i=Ga(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function qa(){return qa=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(za(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"))})),qa.apply(this,arguments)}function Za(t){return Ja.apply(this,arguments)}function Ja(){return Ja=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([mo.WebGL,mo.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield Ya({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return qa.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),Ja.apply(this,arguments)}var Xa=["AUDIO","VIDEO"];class Ka{constructor(t){c(this,"mediaMap",new Map),c(this,"warn"),c(this,"service"),c(this,"speedService"),c(this,"emitter"),c(this,"getCurrentTime"),c(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(go.Start,this.start.bind(this)),this.emitter.on(go.SkipStart,this.start.bind(this)),this.emitter.on(go.Pause,this.pause.bind(this)),this.emitter.on(go.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,c=h.playbackRate,f=h.currentTime,d=h.muted,v=h.volume,p=h.loop;return{isPlaying:l===yo.Play||l!==yo.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=f?f:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=c?c:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=v?v:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=d?d: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 c=1;"number"==typeof a.rr_mediaVolume&&(c=a.rr_mediaVolume);var f=0;"number"==typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:e,playbackRate:h,volume:c,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;Xa.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Xa.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Qa(t,e){if(!("DIALOG"!==t.nodeName||t instanceof Pn)){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 th=ka||xa,eh="[replayer]",rh={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ih(t){return t.type==lo.IncrementalSnapshot&&(t.data.source==fo.TouchMove||t.data.source==fo.MouseInteraction&&t.data.type==vo.TouchStart)}class nh{constructor(t,e){var i=this;if(c(this,"wrapper"),c(this,"iframe"),c(this,"service"),c(this,"speedService"),c(this,"config"),c(this,"usingVirtualDom",!1),c(this,"virtualDom",new ss),c(this,"mouse"),c(this,"mouseTail",null),c(this,"tailPositions",[]),c(this,"emitter",th()),c(this,"nextUserInteractionEvent"),c(this,"legacy_missingNodeRetryMap",{}),c(this,"cache",Ir()),c(this,"imageMap",new Map),c(this,"canvasEventMap",new Map),c(this,"mirror",Z()),c(this,"styleMirror",new no),c(this,"mediaManager"),c(this,"firstFullSnapshot",null),c(this,"newDocumentQueue",[]),c(this,"mousePos",null),c(this,"touchActive",null),c(this,"lastMouseDownEvent",null),c(this,"lastHoveredRootNode"),c(this,"lastSelectionData",null),c(this,"lastScrollMap",new Map),c(this,"constructedStyleMutations",[]),c(this,"adoptedStyleSheets",[]),c(this,"emitterHandlers",[]),c(this,"serviceSubscription"),c(this,"speedServiceSubscription"),c(this,"timeouts",new Set),c(this,"applyGeneration",0),c(this,"seekRebuildInFlight",!1),c(this,"styleSheetLoadListeners",new Map),c(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)))})),c(this,"shouldCastInSyncMode",(t=>{switch(t.type){case lo.DomContentLoaded:case lo.Load:return!1;case lo.Custom:return t.data.tag===co;default:return!0}})),c(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(go.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})})),c(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case lo.DomContentLoaded:case lo.Load:break;case lo.Custom:n=()=>{e||i.emitter.emit(go.CustomEvent,t),t.data.tag===co&&i.applyFullscreen(t.data.payload)};break;case lo.Meta:n=()=>i.emitter.emit(go.Resize,{width:t.data.width,height:t.data.height});break;case lo.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.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case lo.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(go.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(go.Finish)))},h=50;t.type===lo.IncrementalSnapshot&&t.data.source===fo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(go.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:rh,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(go.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(go.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{Za({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===fo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===fo.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{ts(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=rs(r.node,this.mirror,this.virtualDom.mirror);ts(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=[]}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(go.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,u,l,f=new Ra([],{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:f,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,u=a.applyEvents,l=a.emitter,Ua(Fa({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:Da({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:Da(((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))Ia(o,n);var a=Wa(i,n),c=a.some((t=>t.type===lo.FullSnapshot&&t.timestamp===n)),f=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===lo.IncrementalSnapshot&&s.data.source===fo.MouseMove&&(f=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(f||0)>n&&l.emit(go.PlayBack);var d=new Array;for(var v of a)(!f||f>=n||v.timestamp>f&&v!==s)&&(n>v.timestamp||c&&v.timestamp===n&&(v.type===lo.Meta||v.type===lo.FullSnapshot))&&d.push(v);u(d,(()=>{var e=function(){if(n>i.timestamp||c&&i.timestamp===n&&(i.type===lo.Meta||i.type===lo.FullSnapshot))return 0;if(f&&n>f&&i===s)return 0;var t=h(i,!1);r.addAction({doAction(){t()},delay:i.delay})};for(var i of Wa(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:Da((t=>r({},t,{lastPlayedEvent:null}))),startLive:Da({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:Da(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;Ia(o,i);var a=s.length-1;if(s[a]&&s[a].timestamp>o.timestamp){for(var u=-1,l=0;a>=l;){var c=Math.floor((l+a)/2);s[c].timestamp>o.timestamp?a=c-1:l=c+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 f=h(o,!1);n.addAction({doAction(){f()},delay:o.delay})}}return r({},t,{events:s})}))}}))),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(go.StateChange,{player:t})})),this.speedService=function(t){return Ua(Fa({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:Da({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:f}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(go.StateChange,{speed:t})})),this.mediaManager=new Ka({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var d=this.service.state.context.events.find((t=>t.type===lo.Meta)),v=this.service.state.context.events.find((t=>t.type===lo.FullSnapshot));if(d){var p=d.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(go.Resize,{width:m,height:y})}),0)}v&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=v,this.rebuildFullSnapshot(v),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},v.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(ih)&&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(go.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(go.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(go.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.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(go.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(go.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;ih(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=Ir()}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&&(Ea(this.iframe.contentWindow,this.iframe.contentDocument),qs(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 q:h,l=Or(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)===v.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=>Qa(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(go.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,gs(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:fo.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)===wo.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})};Or(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=>Qa(t)))}collectIframeAndAttachDocument(t,e){if(Xs(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(go.Start,s),this.emitter.on(go.Pause,s);var o=()=>{this.emitter.off(go.Start,s),this.emitter.off(go.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(go.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(go.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===lo.IncrementalSnapshot&&r.data.source===fo.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(za(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(za(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 fo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case fo.Drag:case fo.TouchMove:case fo.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 fo.MouseInteraction:if(-1===s.id)break;var a=new Event(X(vo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(go.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case vo.Blur:"blur"in h&&h.blur();break;case vo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case vo.Click:case vo.TouchStart:case vo.TouchEnd:case vo.MouseDown:case vo.MouseUp:e?(s.type===vo.TouchStart?this.touchActive=!0:s.type===vo.TouchEnd&&(this.touchActive=!1),s.type===vo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===vo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===vo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===vo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===vo.TouchStart?this.mouse.classList.add("touch-active"):s.type===vo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case vo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case fo.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 fo.ViewportResize:this.emitter.emit(go.Resize,{width:s.width,height:s.height});break;case fo.Input:if(-1===s.id)break;if(this.usingVirtualDom){var c=this.virtualDom.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);c.inputData=s;break}this.applyInput(s);break;case fo.MediaInteraction:var f=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);this.mediaManager.mediaMutation({target:f,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:s});break;case fo.StyleSheetRule:case fo.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 fo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);d.canvasMutations.push({event:t,mutation:s})}else{var v=this.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);Za({event:t,mutation:s,target:v,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case fo.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 fo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case fo.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 Yr),void 0===s&&(s=new ss),function t(e,r){var i=ms(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==Jn.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!==Jn.DOCUMENT_NODE&&e.nodeType!==Jn.ELEMENT_NODE&&e.nodeType!==Jn.DOCUMENT_FRAGMENT_NODE||(e.nodeType===Jn.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=ms(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&&to(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 c=r({},this.legacy_missingNodeRetryMap),f=[],d=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===wo.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?f.push(e):void 0;e.node.isShadow&&(to(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);var s=null,o=null;if(e.previousId&&(s=l.getNode(e.previousId)),e.nextId&&(o=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var a=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Xs(n,l))this.attachDocumentToIframe(e,n);else{var h=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Qa(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},u=Or(e.node,{doc:a,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:h});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===wo.Element&&e.node.type===wo.Text){var v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var p of v)p.nodeType===n.TEXT_NODE&&n.removeChild(p);else if("style"===d.tagName&&1===v.length)for(var m of v)m.nodeType!==n.TEXT_NODE||l.hasNode(m)||(u.textContent=m.textContent,n.removeChild(m))}else if((null==d?void 0:d.type)===wo.Document){var y=n;e.node.type===wo.DocumentType&&(null==(r=y.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===u.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(s&&s.nextSibling&&s.nextSibling.parentNode?n.insertBefore(u,s.nextSibling):o&&o.parentNode?n.contains(o)?n.insertBefore(u,o):n.insertBefore(u,null):n.appendChild(u),h(u,e.node.id),this.usingVirtualDom&&"#text"===u.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Xs(u,this.mirror)){var g=this.mirror.getId(u),w=this.newDocumentQueue.find((t=>t.parentId===g));w&&(this.attachDocumentToIframe(w,u),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==w)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(c,n,u,e)}else c[e.node.id]={node:u,mutation:e}}}};t.adds.forEach((t=>{d(t)}));for(var v=performance.now();f.length;){var p=Zs(f);if(f.length=0,performance.now()-v>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)?Js(m,(t=>{d(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(c).length&&Object.assign(this.legacy_missingNodeRetryMap,c),io(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=l.getNode(e.id);if(!n){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var s=function(){if("string"==typeof a){var t=e.attributes[a];if(null===t)n.removeAttribute(a),"open"===a&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof Pn)){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)}}(n,e);else if("string"==typeof t)try{if("_cssText"===a&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{var s=l.getMeta(n),h=Or(r({},s,{attributes:r({},s.attributes,e.attributes)}),{doc:n.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});Object.assign(s.attributes,e.attributes);var u=n.nextSibling,c=n.parentNode;if(h&&c)return c.removeChild(n),c.insertBefore(h,u),l.replace(e.id,h),1}catch(t){}if("value"===a&&"TEXTAREA"===n.nodeName){var f=n;f.childNodes.forEach((t=>f.removeChild(t)));var d=null==(i=n.ownerDocument)?void 0:i.createTextNode(t);d&&f.appendChild(d)}else n.setAttribute(a,t);"rr_open_mode"===a&&"DIALOG"===n.nodeName&&Qa(n,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===a){var v=t,p=n;for(var m in v)if(!1===v[m])p.style.removeProperty(m);else if(v[m]instanceof Array){var y=v[m];p.style.setProperty(m,y[0],y[1])}else p.style.setProperty(m,v[m])}}};for(var a in e.attributes)if(s())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)===wo.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===fo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===fo.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=ro(i),s=n.index,o=eo(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=ro(r),n=i.index,s=eo(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=eo(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=eo(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){null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(to(r)?n=(null==(e=r.ownerDocument)?void 0:e.defaultView)||null:"#document"===r.nodeName&&(n=r.defaultView),n)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:fo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var i=0,n=(t,e)=>{var r=e.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t));to(t)?t.shadowRoot.adoptedStyleSheets=r:"#document"===t.nodeName&&(t.adoptedStyleSheets=r),r.length!==e.length&&10>i&&(setTimeout((()=>n(t,e)),0+100*i),i++)};n(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,c=a.mutation;e.insertBefore(l,r.nextSibling),delete t[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(t,e,l,c)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Qs(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?rh:Object.assign({},rh,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")})),this.lastHoveredRootNode=t.getRootNode();for(var r=t;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type===lo.IncrementalSnapshot&&t.data.source>fo.Mutation&&fo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(go.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(eh,...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(eh,...e)}}}var sh=Sa.addCustomEvent,oh=Sa.freezePage,ah=Sa.takeFullSnapshot;export{lo as EventType,fo as IncrementalSource,vo as MouseInteractions,nh as Replayer,go as ReplayerEvents,sh as addCustomEvent,Za as canvasMutation,oh as freezePage,L as getLastSnapshotCost,j as getMutationCost,Ls as mirror,Sa as record,Lt as resetMaxDepthState,U as resetSnapshotCostState,ah as takeFullSnapshot,uo as utils,_t 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 d(t,e){return-1!==t.indexOf(e)}var v={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 v?v[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?(d(h=navigator.userAgent,"AppleWebKit")&&!d(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,deferredStylesheetCount:0});function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,E=0,R=C(),I=null,A=null,T=[],O={slowestBatchMs:0},D=t=>t&&t>0?t:null;function N(){return I}var _=32;function L(t,e,r){var i=t.length;if(r>=_)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=L(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+=L(h,e,r+1))}}}catch(t){}}return i}function B(t){return 0!==x&&null!==A&&(R.cssRuleCount>=A||R.cssRuleCount+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),L(e,r,0)}catch(t){return 0}}(t)>A)}function P(){return r({},O)}function F(){x=0,E=0,R=C(),I=null,A=null,T=[],O={slowestBatchMs:0}}function j(t){return t.nodeType===t.ELEMENT_NODE}function U(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 W(t){return"[object ShadowRoot]"==={}.toString.call(t)}var H=0;function G(t){var e,r,i=0===H,n=i?M():0;H+=1;try{var s=t.rules||t.cssRules;if(!s)return null;!function(t){0!==x&&(R.cssRuleCount+=L(t,null,0))}(s);var o=t.href;return!o&&t.ownerNode&&(o=t.ownerNode.baseURI),(r=Array.from(s,(t=>z(t,o))).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(t){return null}finally{H-=1,i&&(e=M()-n,x>0&&(R.stylesheetMs+=e))}}function z(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=G(t.styleSheet)||function(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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return it(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?it(n,e):n}class V{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))),j(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 Y(){return new V}function q(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&Z(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function Z(t){return t.toLowerCase()}var J="__rrweb_original__";function X(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Z(e):null}catch(t){return null}}function K(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 Q=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,tt=/^(?:[a-z+]+:)?\/\//i,et=/^www\..*/i,rt=/^(data:)([^,]*),(.*)/i;function it(t,e){return(t||"").replace(Q,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(tt.test(h)||et.test(h))return"url("+u+h+u+")";if(rt.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 nt,st,ot="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",at=4096,ht=1e5,ut=10,lt=new Map,ft=1,ct=new RegExp("[^a-z0-9-_:]"),dt=-2;function vt(){return ft++}var pt=/^[^ \t\n\r\u000c]+/,mt=/^[, \t\n\r\u000c]+/,yt=new WeakMap;function gt(t,e){return e&&""!==e.trim()?wt(t,e):e}function wt(t,e){var r=yt.get(t);if(r||(r=t.createElement("a"),yt.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function bt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?ot:t}(t,e.maxBase64ImageLength):t}function St(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=gt(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(ht>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>at||t.naturalHeight>at)return e;var n=lt.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(lt.size>=ut){var u=lt.keys().next().value;void 0!==u&&lt.delete(u)}return lt.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),bt(u,s)}if("image"===e)return bt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=gt(t,i);return"image"===e&&l.startsWith("data:")?bt(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(mt),e.length>r;){var s=i(pt);if(","===s.slice(-1))s=gt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=gt(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?it(i,wt(t)):"object"===e&&"data"===r?gt(t,i):i:gt(t,i)}function kt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Ct(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Ct(k.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Ct(k.parentNode(t),e,r)}function Mt(t,e,r,i){var n;if(j(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(Ct(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 xt(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var Et=new Map;function Rt(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function It(t){return null==t?"":t.toLowerCase()}var At=50,Tt=!1,Ot=!1;function Dt(){return Ot}function Nt(){Ot=!1,Tt=!1}function _t(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,d=e.maskInputOptions,v=void 0===d?{}:d,p=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,g=e.dataURLOptions,w=void 0===g?{}:g,b=e.inlineImages,S=void 0!==b&&b,C=e.recordCanvas,M=void 0!==C&&C,E=e.canvasMaskingConfigured,I=e.onSerialize,A=e.onIframeLoad,O=e.iframeLoadTimeout,D=void 0===O?5e3:O,N=e.onIframeListenerRegistered,_=e.onStylesheetLoad,L=e.stylesheetLoadTimeout,P=void 0===L?5e3:L,F=e.keepIframeSrcFn,H=void 0===F?()=>!1:F,z=e.newlyAddedElement,V=void 0!==z&&z,Y=e.depth,Q=void 0===Y?0:Y,tt=e.maxDepth,et=void 0===tt?At:tt,rt=e.needsMask,ot=e.preserveWhiteSpace,at=void 0===ot||ot;if(Q>=et)return Ot=!0,Tt||(Tt=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+et+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;rt||(rt=Mt(t,o,a,void 0===rt)),x>0&&(R.nodeCount+=1);var ht,ut=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.dataURLOptions,d=void 0===f?{}:f,v=e.inlineImages,p=e.recordCanvas,m=e.canvasMaskingConfigured,y=e.keepIframeSrcFn,g=e.newlyAddedElement,w=void 0!==g&&g,b=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:b};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s,o=e.doc,a=e.inlineStylesheet,h=e.maskInputOptions,u=void 0===h?{}:h,l=e.maskInputFn,f=e.dataURLOptions,d=void 0===f?{}:f,v=e.inlineImages,p=e.recordCanvas,m=e.canvasMaskingConfigured,y=e.keepIframeSrcFn,g=e.newlyAddedElement,w=void 0!==g&&g,b=e.rootId,S=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),C=function(t){if(t instanceof HTMLFormElement)return"form";var e=Z(t.tagName);return ct.test(e)?"div":e}(t),M={},E=t.attributes.length,R=0;E>R;R++){var I=t.attributes[R];kt(C,I.name)||(M[I.name]=St(o,C,Z(I.name),I.value,t,d))}if("link"===C&&a&&!S){var A=t.sheet;if(!A){var O=function(t){return t.href}(t);O&&!(A=Rt(o,O))&&O.includes(".css")&&(A=Rt(o,window.location.origin+"/"+O.replace(window.location.href,"")))}var D=null;A&&(B(A)?x>0&&T.push(t):D=G(A)),D&&(delete M.rel,delete M.href,M._cssText=D)}var N;if("style"===C&&t.sheet&&!(t.innerText||k.textContent(t)||"").trim().length){var _=G(t.sheet);_&&(M._cssText=_)}if("input"===C||"textarea"===C||"select"===C){var L=t.value,P=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&L?M.value=q({element:t,type:X(t),tagName:C,value:L,maskInputOptions:u,maskInputFn:l}):P&&(M.checked=P)}if("option"===C&&(t.selected&&!u.select?M.selected=!0:delete M.selected),"dialog"===C&&t.open)try{M.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){M.rr_open_mode="modal",M.ph_rr_could_not_detect_modal=!0}if("canvas"===C&&p&&!(null==m?void 0:m()))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((J in n?n[J]: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)||(M.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var F=t.toDataURL(d.type,d.quality),j=o.createElement("canvas");j.width=t.width,j.height=t.height,F!==j.toDataURL(d.type,d.quality)&&(M.rr_dataURL=F)}if("img"===C&&v){nt||(nt=o.createElement("canvas"),st=nt.getContext("2d"));var U=t,W=U.currentSrc||U.getAttribute("src")||"<unknown-src>",H=U.crossOrigin,z=()=>{xt(U,"load",z);try{nt.width=U.naturalWidth,nt.height=U.naturalHeight,st.drawImage(U,0,0),M.rr_dataURL=nt.toDataURL(d.type,d.quality)}catch(t){if("anonymous"!==U.crossOrigin)return U.crossOrigin="anonymous",void(U.complete&&0!==U.naturalWidth?z():U.addEventListener("load",z));console.warn("Cannot inline img src="+W+"! Error: "+t)}"anonymous"===U.crossOrigin&&(H?M.crossOrigin=H:U.removeAttribute("crossorigin"))};U.complete&&0!==U.naturalWidth?z():U.addEventListener("load",z)}if("audio"===C||"video"===C){var V=M;V.rr_mediaState=t.paused?"paused":"played",V.rr_mediaCurrentTime=t.currentTime,V.rr_mediaPlaybackRate=t.playbackRate,V.rr_mediaMuted=t.muted,V.rr_mediaLoop=t.loop,V.rr_mediaVolume=t.volume}if(w||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop)),S){var Y=t.getBoundingClientRect(),K=Y.width,Q=Y.height,tt=Y.left,et=Y.top,rt=null==(r=o.defaultView)?void 0:r.getComputedStyle(t);M={class:M.class,rr_width:K+"px",rr_height:Q+"px",rr_left:Math.floor(tt+((null==(i=o.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(et+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"},rt&&(M.rr_position=rt.position||"static",rt.transform&&"none"!==rt.transform&&(M.rr_transform=rt.transform),rt.display&&rt.display.startsWith("inline")&&(M.rr_display=rt.display))}"iframe"!==C||y(M.src)||(t.contentDocument||(M.rr_src=M.src),delete M.src);try{customElements.get(C)&&(s=!0)}catch(t){}return{type:c.Element,tagName:C,attributes:M,childNodes:[],isSVG:(N=t,Boolean("svg"===N.tagName||N.ownerSVGElement)||void 0),needBlock:S,rootId:b,isCustom:s}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,dataURLOptions:d,inlineImages:v,recordCanvas:p,canvasMaskingConfigured:m,keepIframeSrcFn:y,newlyAddedElement:w,rootId:b});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(B(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var f=G(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=it(h,wt(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:b});case t.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:c.Comment,textContent:k.textContent(t)||"",rootId:b};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,inlineStylesheet:f,maskInputOptions:v,maskTextFn:p,maskInputFn:m,dataURLOptions:w,inlineImages:S,recordCanvas:M,canvasMaskingConfigured:E,keepIframeSrcFn:H,newlyAddedElement:V});if(!ut)return console.warn(t,"not serialized"),null;ht=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"===K(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(It(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===It(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(It(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&It(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(It(t.attributes.property).match(/^(og|twitter|fb):/)||It(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===It(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(It(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(It(t.attributes.name))||It(t.attributes.property).match(/^article:/)||It(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(It(t.attributes.name)))return!0}}return!1}(ut,y)&&(at||ut.type!==c.Text||ut.isStyle||ut.textContent.replace(/^\s+|\s+$/gm,"").length)?vt():dt;var lt=Object.assign(ut,{id:ht});if(i.add(t,lt),ht===dt)return null;I&&I(t);var ft=!u;if(lt.type===c.Element){ft=ft&&!lt.needBlock,delete lt.needBlock;var pt=k.shadowRoot(t);pt&&W(pt)&&(lt.isShadowHost=!0)}if((lt.type===c.Document||lt.type===c.Element)&&ft){y.headWhitespace&&lt.type===c.Element&&"head"===lt.tagName&&(at=!1);var mt={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:f,maskInputOptions:v,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:M,canvasMaskingConfigured:E,preserveWhiteSpace:at,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:P,keepIframeSrcFn:H,depth:Q+1,maxDepth:et};if(lt.type===c.Element&&"textarea"===lt.tagName&&void 0!==lt.attributes.value);else for(var yt of Array.from(k.childNodes(t))){var gt=_t(yt,mt);gt&&lt.childNodes.push(gt)}var bt=null;if(j(t)&&(bt=k.shadowRoot(t)))for(var Ct of Array.from(k.childNodes(bt))){var Dt=_t(Ct,mt);Dt&&(W(bt)&&(Dt.isShadow=!0),lt.childNodes.push(Dt))}}var Nt=k.parentNode(t);if(Nt&&U(Nt)&&W(Nt)&&(lt.isShadow=!0),lt.type===c.Element&&"iframe"===lt.tagName){var Lt=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),xt(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?xt(t,"load",o):(a=!0,xt(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 d=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(d),xt(t,"load",o)}}return t.addEventListener("load",o),()=>{xt(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&A){var r=_t(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:v,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:M,canvasMaskingConfigured:E,preserveWhiteSpace:at,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:P,keepIframeSrcFn:H,depth:Q+1,maxDepth:et});r&&A(t,r)}}),D);null==N||N(t,Lt)}return lt.type===c.Element&&"link"===lt.tagName&&"stylesheet"===lt.attributes.rel&&function(e,h,u){if(!Et.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var c=new AbortController,d=!1,g=()=>{if(!d){d=!0;try{(()=>{if(_){var e=_t(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:rt,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:v,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:w,inlineImages:S,recordCanvas:M,canvasMaskingConfigured:E,preserveWhiteSpace:at,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:D,onStylesheetLoad:_,stylesheetLoadTimeout:P,keepIframeSrcFn:H,depth:Q,maxDepth:et});e&&_(t,e)}})()}finally{Et.delete(e),c.abort()}}},b=setTimeout(g,u);c.signal.addEventListener("abort",(()=>clearTimeout(b)),{once:!0}),e.addEventListener("load",g,{signal:c.signal,once:!0}),Et.set(e,c)}}}(t,0,P),lt}function Lt(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 Bt=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Pt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(Bt)&&(t.params=t.params.replace(Bt,"$1-$2"))}}}},Ft={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 jt(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function Ut(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 Wt,Ht={exports:{}};function Gt(){if(Wt)return Ht.exports;Wt=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 Ht.exports=e(),Ht.exports.createColors=e,Ht.exports}var zt,Vt,Yt,$t,qt,Zt,Jt=Ut(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Xt(){if(Vt)return zt;Vt=1;var t=Gt(),e=Jt;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),d=Math.min(this.line+2,f.length),v=String(d).length;return f.slice(c,d).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-v)+" | ";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 zt=r,r.default=r,zt}function Kt(){if($t)return Yt;$t=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 Yt=h,h.default=h,Yt}function Qt(){if(Zt)return qt;Zt=1;var t=Kt();function e(e,r){new t(r).stringify(e)}return qt=e,e.default=e,qt}var te,ee,re,ie,ne,se,oe,ae,he,ue,le,fe,ce,de,ve,pe,me,ye,ge,we,be,Se,ke,Ce,Me,xe,Ee,Re,Ie,Ae,Te,Oe,De,Ne,_e,Le,Be,Pe,Fe,je,Ue,We,He,Ge,ze,Ve,Ye,$e,qe,Ze,Je,Xe,Ke,Qe={};function tr(){return te||(te=1,Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my")),Qe}function er(){if(re)return ee;re=1;var t=Xt(),e=Kt(),r=Qt(),i=tr(),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 d=new c.constructor;f.push(d),i.push([c,d,o])}}else{if("object"===l&&null!==u){var v=new u.constructor;i.push([u,v,void 0]),u=v}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 d=h[c];if(Array.isArray(d)){var v=[];f[c]=v;for(var p=0;d.length>p;p++){var m=d[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,v,p]):v[p]=m.toJSON(null,e):v[p]=m}}else if("object"==typeof d&&d.toJSON)d.toJSON===a.prototype.toJSON?n.push([d,f,c]):f[c]=d.toJSON(null,e);else if("source"===c){if(null==d)continue;var y=e.get(d.input);null==y&&e.set(d.input,y=e.size),f[c]={end:d.end,inputId:y,start:d.start}}else f[c]=d}}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 ee=a,a.default=a,ee}function rr(){if(ne)return ie;ne=1;var t=er();class e extends t{constructor(t){super(t),this.type="comment"}}return ie=e,e.default=e,ie}function ir(){if(oe)return se;oe=1;var t=er();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 se=e,e.default=e,se}function nr(){if(he)return ae;he=1;var t,e,r,i,n=rr(),s=ir(),o=er(),a=tr(),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},ae=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)}},ae}function sr(){if(le)return ue;le=1;var t=nr();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 ue=e,e.default=e,t.registerAtRule(e),ue}function or(){if(ce)return fe;ce=1;var t,e,i=nr();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},fe=n,n.default=n,fe}function ar(){return ve?de:(ve=1,de={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 hr(){if(me)return pe;me=1;var t=Jt.existsSync,e=Jt.readFileSync,r=Jt.dirname,i=Jt.isAbsolute,n=Jt.join,s=Jt.relative,o=Jt.sep,a=Jt.SourceMapConsumer,h=Jt.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 pe=u,u.default=u,pe}function ur(){if(ge)return ye;ge=1;var t=ar().nanoid,e=Jt.isAbsolute,i=Jt.resolve,n=Jt.SourceMapConsumer,s=Jt.SourceMapGenerator,o=Jt.fileURLToPath,a=Jt.pathToFileURL,h=Xt(),u=hr(),l=Jt,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),d=Boolean(i&&e);function v(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=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&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 d=this.fromOffset(u=f.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var v=this.fromOffset(o=c.offset);s=v.line,n=v.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 v(this)[t-1]+e-1}fromOffset(t){var e=v(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 d=u.sourceContentFor(l.source);return d&&(c.source=d),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 ye=p,p.default=p,l&&l.registerInput&&l.registerInput(p),ye}function lr(){if(be)return we;be=1;var t,e,r=nr();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},we=i,i.default=i,r.registerRoot(i),we}function fr(){if(ke)return Se;ke=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 Se=t,t.default=t,Se}function cr(){if(Me)return Ce;Me=1;var t=nr(),e=fr();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 Ce=r,r.default=r,t.registerRule(r),Ce}function dr(){if(Ie)return Re;Ie=1;var t=Jt.dirname,e=Jt.relative,r=Jt.resolve,i=Jt.sep,n=Jt.SourceMapConsumer,s=Jt.SourceMapGenerator,o=Jt.pathToFileURL,a=ur(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Re=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 vr(){if(Te)return Ae;Te=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),d="{".charCodeAt(0),v="}".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 Ae=function(C,M){void 0===M&&(M={});var x,E,R,I,A,T,O,D,N,_,L=C.css.valueOf(),B=M.ignoreErrors,P=L.length,F=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,F)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&F>=P,nextToken(C){if(U.length)return U.pop();if(P>F){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(F)){case n:case s:case a:case h:case o:I=F;do{x=L.charCodeAt(I+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(F,I)],F=I-1;break;case u:case l:case d:case v:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,F];break;case f:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(F+1),"url"===_&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){I=F;do{if(O=!1,-1===(I=L.indexOf(")",I+1))){if(B||M){I=F;break}H("bracket")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["brackets",L.slice(F,I+1),F,I],F=I}else F>W?(I=L.indexOf(")",F+1),E=L.slice(F,I+1),-1===I||S.test(E)?(W=-1===I?P:I,T=["(","(",F]):(T=["brackets",E,F,I],F=I)):T=["(","(",F];break;case t:case e:A=x===t?"'":'"',I=F;do{if(O=!1,-1===(I=L.indexOf(A,I+1))){if(B||M){I=F+1;break}H("string")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["string",L.slice(F,I+1),F,I],F=I;break;case g:w.lastIndex=F+1,w.test(L),T=["at-word",L.slice(F,1+(I=0===w.lastIndex?L.length-1:w.lastIndex-2)),F,I],F=I;break;case r:for(I=F,R=!0;L.charCodeAt(I+1)===r;)I+=1,R=!R;if(x=L.charCodeAt(I+1),R&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(I+=1))){for(;k.test(L.charAt(I+1));)I+=1;L.charCodeAt(I+1)===s&&(I+=1)}T=["word",L.slice(F,I+1),F,I],F=I;break;default:x===i&&L.charCodeAt(F+1)===m?(0===(I=L.indexOf("*/",F+2)+1)&&(B||M?I=L.length:H("comment")),T=["comment",L.slice(F,I+1),F,I],F=I):(b.lastIndex=F+1,b.test(L),T=["word",L.slice(F,1+(I=0===b.lastIndex?L.length-1:b.lastIndex-2)),F,I],j.push(T),F=I)}return F++,T}},position:()=>F}}}function pr(){if(De)return Oe;De=1;var t=sr(),e=rr(),r=ir(),i=lr(),n=cr(),s=vr(),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 Oe=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 d=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var v=t.length-1;v>=0;v--){if("!important"===(u=t[v])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,v);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=v;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+=d.map((t=>t[1])).join(""),d=[]),this.raw(i,"value",d.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 mr(){if(_e)return Ne;_e=1;var t=nr(),e=ur(),r=pr();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 Ne=i,i.default=i,t.registerParse(i),Ne}function yr(){if(Be)return Le;Be=1;var t=nr(),e=tr().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 Le=r,r.default=r,Le}function gr(){if(Fe)return Pe;Fe=1;var t=yr();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 Pe=e,e.default=e,Pe}function wr(){if(Ue)return je;Ue=1;var t={};return je=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function br(){if(He)return We;He=1;var t=nr(),i=or(),n=dr(),s=mr(),o=gr(),a=lr(),h=Qt(),u=tr(),l=u.isClean,f=u.my,c=wr(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v={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=d[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(!v[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},We=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),We}function Sr(){if(qe)return $e;qe=1;var t=sr(),e=rr(),n=nr(),o=Xt(),a=ir(),h=or(),u=function(){if(Ee)return xe;Ee=1;var t=sr(),e=rr(),n=ir(),o=ur(),a=hr(),h=lr(),u=cr();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 d=c.source,v=d.inputId,p=i(d,s);c.source=p,null!=v&&(c.source.input=a[v])}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 xe=c,c.default=c,xe}(),l=ur(),f=br(),c=fr(),d=er(),v=mr(),p=function(){if(Ye)return Ve;Ye=1;var t=or(),e=br(),r=function(){if(ze)return Ge;ze=1;var t=dr(),e=mr(),r=gr(),i=Qt(),n=wr();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 Ge=s,s.default=s,Ge}(),i=lr();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 Ve=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Ve}(),m=gr(),y=lr(),g=cr(),w=Qt(),b=yr();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=v,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=d,f.registerPostcss(S),$e=S,S.default=S,$e}var kr=jt(function(){if(Ke)return Xe;Ke=1;var t=Sr().Input,e=function(){if(Je)return Ze;Je=1;var t=rr(),e=pr(),r=vr();return Ze=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 Xe=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),Cr=jt(Sr()),Mr={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 xr(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=Cr([Pt,Ft]).process(t,{parser:kr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function Er(){return{stylesWithHoverClass:new Map}}var Rr=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),Ir=new Set;function Ar(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 d=s.getNode(t.id),v=s.getMeta(d);if(i=t,(r=v)&&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=Mr[t.tagName]?Mr[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(Rr.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){Ir.has(t.tagName)||(Ir.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,d="style"===a&&"_cssText"===u;if(d&&n&&"string"==typeof l&&(l=xr(l,s)),!f&&!d||"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"===K(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 v=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(v&&"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)v||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)v||(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=xr(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=Ar(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&&j(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 Tr=Object.defineProperty,Or=(t,e,r)=>((t,e,r)=>e in t?Tr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),Dr=Object.defineProperty,Nr=(t,e,r)=>((t,e,r)=>e in t?Dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function _r(t,e){return-1!==t.indexOf(e)}var Lr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Br={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Pr={};function Fr(t){if(Pr[t])return Pr[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 Lr?Lr[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 Br?Br[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 Pr[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?(_r(h=navigator.userAgent,"AppleWebKit")&&!_r(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Pr[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var jr={};function Ur(t,e,r){var i,n=t+"."+String(r);if(jr[n])return jr[n].call(e);var s=Fr(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(jr[n]=o,o.call(e)):e[r]}var Wr={};function Hr(t,e,r){var i=t+"."+String(r);if(Wr[i])return Wr[i].bind(e);var n=Fr(t)[r];return"function"!=typeof n?e[r]:(Wr[i]=n,n.bind(e))}var Gr={childNodes:t=>Ur("Node",t,"childNodes"),parentNode:t=>Ur("Node",t,"parentNode"),parentElement:t=>Ur("Node",t,"parentElement"),textContent:t=>Ur("Node",t,"textContent"),contains:(t,e)=>Hr("Node",t,"contains")(e),getRootNode:t=>Hr("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Ur("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Ur("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Hr("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Hr("Element",t,"querySelectorAll")(e),mutationObserver:()=>Fr("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()=>{}}}},zr=class{constructor(){Nr(this,"idNodeMap",new Map),Nr(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=Gr.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 Vr(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 Yr,$r={exports:{}};function qr(){if(Yr)return $r.exports;Yr=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 $r.exports=e(),$r.exports.createColors=e,$r.exports}var Zr,Jr,Xr,Kr,Qr,ti,ei=Vr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function ri(){if(Jr)return Zr;Jr=1;var t=qr(),e=ei;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),d=Math.min(this.line+2,f.length),v=String(d).length;return f.slice(c,d).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-v)+" | ";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 Zr=r,r.default=r,Zr}function ii(){if(Kr)return Xr;Kr=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 Xr=h,h.default=h,Xr}function ni(){if(ti)return Qr;ti=1;var t=ii();function e(e,r){new t(r).stringify(e)}return Qr=e,e.default=e,Qr}var si,oi,ai,hi,ui,li,fi,ci,di,vi,pi,mi,yi,gi,wi,bi,Si,ki,Ci,Mi,xi,Ei,Ri,Ii,Ai,Ti,Oi,Di,Ni,_i,Li,Bi,Pi,Fi,ji,Ui,Wi,Hi,Gi,zi,Vi,Yi,$i,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn={};function on(){return si||(si=1,sn.isClean=Symbol("isClean"),sn.my=Symbol("my")),sn}function an(){if(ai)return oi;ai=1;var t=ri(),e=ii(),r=ni(),i=on(),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 d=new c.constructor;f.push(d),i.push([c,d,o])}}else{if("object"===l&&null!==u){var v=new u.constructor;i.push([u,v,void 0]),u=v}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 d=h[c];if(Array.isArray(d)){var v=[];f[c]=v;for(var p=0;d.length>p;p++){var m=d[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,v,p]):v[p]=m.toJSON(null,e):v[p]=m}}else if("object"==typeof d&&d.toJSON)d.toJSON===a.prototype.toJSON?n.push([d,f,c]):f[c]=d.toJSON(null,e);else if("source"===c){if(null==d)continue;var y=e.get(d.input);null==y&&e.set(d.input,y=e.size),f[c]={end:d.end,inputId:y,start:d.start}}else f[c]=d}}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 oi=a,a.default=a,oi}function hn(){if(ui)return hi;ui=1;var t=an();class e extends t{constructor(t){super(t),this.type="comment"}}return hi=e,e.default=e,hi}function un(){if(fi)return li;fi=1;var t=an();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 li=e,e.default=e,li}function ln(){if(di)return ci;di=1;var t,e,r,i,n=hn(),s=un(),o=an(),a=on(),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},ci=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)}},ci}function fn(){if(pi)return vi;pi=1;var t=ln();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 vi=e,e.default=e,t.registerAtRule(e),vi}function cn(){if(yi)return mi;yi=1;var t,e,i=ln();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},mi=n,n.default=n,mi}function dn(){return wi?gi:(wi=1,gi={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 vn(){if(Si)return bi;Si=1;var t=ei.existsSync,e=ei.readFileSync,r=ei.dirname,i=ei.isAbsolute,n=ei.join,s=ei.relative,o=ei.sep,a=ei.SourceMapConsumer,h=ei.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 bi=u,u.default=u,bi}function pn(){if(Ci)return ki;Ci=1;var t=dn().nanoid,e=ei.isAbsolute,i=ei.resolve,n=ei.SourceMapConsumer,s=ei.SourceMapGenerator,o=ei.fileURLToPath,a=ei.pathToFileURL,h=ri(),u=vn(),l=ei,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),d=Boolean(i&&e);function v(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=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&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 d=this.fromOffset(u=f.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var v=this.fromOffset(o=c.offset);s=v.line,n=v.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 v(this)[t-1]+e-1}fromOffset(t){var e=v(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 d=u.sourceContentFor(l.source);return d&&(c.source=d),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 ki=p,p.default=p,l&&l.registerInput&&l.registerInput(p),ki}function mn(){if(xi)return Mi;xi=1;var t,e,r=ln();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},Mi=i,i.default=i,r.registerRoot(i),Mi}function yn(){if(Ri)return Ei;Ri=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 Ei=t,t.default=t,Ei}function gn(){if(Ai)return Ii;Ai=1;var t=ln(),e=yn();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 Ii=r,r.default=r,t.registerRule(r),Ii}function wn(){if(Ni)return Di;Ni=1;var t=ei.dirname,e=ei.relative,r=ei.resolve,i=ei.sep,n=ei.SourceMapConsumer,s=ei.SourceMapGenerator,o=ei.pathToFileURL,a=pn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Di=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 bn(){if(Li)return _i;Li=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),d="{".charCodeAt(0),v="}".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 _i=function(C,M){void 0===M&&(M={});var x,E,R,I,A,T,O,D,N,_,L=C.css.valueOf(),B=M.ignoreErrors,P=L.length,F=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,F)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&F>=P,nextToken(C){if(U.length)return U.pop();if(P>F){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(F)){case n:case s:case a:case h:case o:I=F;do{x=L.charCodeAt(I+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(F,I)],F=I-1;break;case u:case l:case d:case v:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,F];break;case f:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(F+1),"url"===_&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){I=F;do{if(O=!1,-1===(I=L.indexOf(")",I+1))){if(B||M){I=F;break}H("bracket")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["brackets",L.slice(F,I+1),F,I],F=I}else F>W?(I=L.indexOf(")",F+1),E=L.slice(F,I+1),-1===I||S.test(E)?(W=-1===I?P:I,T=["(","(",F]):(T=["brackets",E,F,I],F=I)):T=["(","(",F];break;case t:case e:A=x===t?"'":'"',I=F;do{if(O=!1,-1===(I=L.indexOf(A,I+1))){if(B||M){I=F+1;break}H("string")}for(D=I;L.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);T=["string",L.slice(F,I+1),F,I],F=I;break;case g:w.lastIndex=F+1,w.test(L),T=["at-word",L.slice(F,1+(I=0===w.lastIndex?L.length-1:w.lastIndex-2)),F,I],F=I;break;case r:for(I=F,R=!0;L.charCodeAt(I+1)===r;)I+=1,R=!R;if(x=L.charCodeAt(I+1),R&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(I+=1))){for(;k.test(L.charAt(I+1));)I+=1;L.charCodeAt(I+1)===s&&(I+=1)}T=["word",L.slice(F,I+1),F,I],F=I;break;default:x===i&&L.charCodeAt(F+1)===m?(0===(I=L.indexOf("*/",F+2)+1)&&(B||M?I=L.length:H("comment")),T=["comment",L.slice(F,I+1),F,I],F=I):(b.lastIndex=F+1,b.test(L),T=["word",L.slice(F,1+(I=0===b.lastIndex?L.length-1:b.lastIndex-2)),F,I],j.push(T),F=I)}return F++,T}},position:()=>F}}}function Sn(){if(Pi)return Bi;Pi=1;var t=fn(),e=hn(),r=un(),i=mn(),n=gn(),s=bn(),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 Bi=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 d=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var v=t.length-1;v>=0;v--){if("!important"===(u=t[v])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,v);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=v;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+=d.map((t=>t[1])).join(""),d=[]),this.raw(i,"value",d.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 kn(){if(ji)return Fi;ji=1;var t=ln(),e=pn(),r=Sn();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 Fi=i,i.default=i,t.registerParse(i),Fi}function Cn(){if(Wi)return Ui;Wi=1;var t=ln(),e=on().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 Ui=r,r.default=r,Ui}function Mn(){if(Gi)return Hi;Gi=1;var t=Cn();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 Hi=e,e.default=e,Hi}function xn(){if(Vi)return zi;Vi=1;var t={};return zi=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function En(){if($i)return Yi;$i=1;var t=ln(),i=cn(),n=wn(),s=kn(),o=Mn(),a=mn(),h=ni(),u=on(),l=u.isClean,f=u.my,c=xn(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v={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=d[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(!v[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},Yi=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),Yi}function Rn(){if(Qi)return Ki;Qi=1;var t=fn(),e=hn(),n=ln(),s=ri(),a=un(),h=cn(),u=function(){if(Oi)return Ti;Oi=1;var t=fn(),e=hn(),n=un(),s=pn(),a=vn(),h=mn(),u=gn();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 d=c.source,v=d.inputId,p=i(d,o);c.source=p,null!=v&&(c.source.input=a[v])}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 Ti=c,c.default=c,Ti}(),l=pn(),f=En(),c=yn(),d=an(),v=kn(),p=function(){if(Xi)return Ji;Xi=1;var t=cn(),e=En(),r=function(){if(Zi)return qi;Zi=1;var t=wn(),e=kn(),r=Mn(),i=ni(),n=xn();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 qi=s,s.default=s,qi}(),i=mn();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 Ji=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Ji}(),m=Mn(),y=mn(),g=gn(),w=ni(),b=Cn();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=v,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=d,f.registerPostcss(S),Ki=S,S.default=S,Ki}!function(){if(nn)return rn;nn=1;var t=Rn().Input,e=function(){if(en)return tn;en=1;var t=hn(),e=Sn(),r=bn();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=""}}}();rn=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),Rn();var In=(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))(In||{});function An(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=_n(r);e.push(n+": "+i+";")}}return e.join(" ")}var Tn=/-([a-z])/g,On=/^--[a-zA-Z0-9-]+$/,Dn=t=>On.test(t)?t:t.replace(Tn,((t,e)=>e?e.toUpperCase():"")),Nn=/\B([A-Z])/g,_n=t=>t.replace(Nn,"-$1").toLowerCase();class Ln{constructor(){Or(this,"parentElement",null),Or(this,"parentNode",null),Or(this,"ownerDocument"),Or(this,"firstChild",null),Or(this,"lastChild",null),Or(this,"previousSibling",null),Or(this,"nextSibling",null),Or(this,"ELEMENT_NODE",1),Or(this,"TEXT_NODE",3),Or(this,"nodeType"),Or(this,"nodeName"),Or(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Ln))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 Bn extends Ln{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),Or(this,"nodeType",9),Or(this,"nodeName","#document"),Or(this,"compatMode","CSS1Compat"),Or(this,"RRNodeType",In.Document),Or(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===In.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===In.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===In.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===In.Element||e===In.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===In.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=Vn(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===In.Element||r===In.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===In.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Yn(this,t,e);return i.parentElement=null,i}removeChild(t){return $n(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 Bn}createDocumentType(t,e,r){var i=new Pn(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new Fn(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new Wn(t);return e.ownerDocument=this,e}createComment(t){var e=new Hn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Gn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class Pn extends Ln{constructor(t,e,r){super(),Or(this,"nodeType",10),Or(this,"RRNodeType",In.DocumentType),Or(this,"name"),Or(this,"publicId"),Or(this,"systemId"),Or(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class Fn extends Ln{constructor(t){super(),Or(this,"nodeType",1),Or(this,"RRNodeType",In.Element),Or(this,"tagName"),Or(this,"attributes",{}),Or(this,"shadowRoot",null),Or(this,"scrollLeft"),Or(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 zn(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[Dn(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=Dn(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=An(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=Dn(t),n=r[e]||"";return delete r[e],this.attributes.style=An(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 Vn(this,t)}insertBefore(t,e){return Yn(this,t,e)}removeChild(t){return $n(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 jn extends Fn{constructor(){super(...arguments),Or(this,"currentTime"),Or(this,"volume"),Or(this,"paused"),Or(this,"muted"),Or(this,"playbackRate"),Or(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 Un extends Fn{constructor(){super(...arguments),Or(this,"tagName","DIALOG"),Or(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 Wn extends Ln{constructor(t){super(),Or(this,"nodeType",3),Or(this,"nodeName","#text"),Or(this,"RRNodeType",In.Text),Or(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 Hn extends Ln{constructor(t){super(),Or(this,"nodeType",8),Or(this,"nodeName","#comment"),Or(this,"RRNodeType",In.Comment),Or(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 Gn extends Ln{constructor(t){super(),Or(this,"nodeName","#cdata-section"),Or(this,"nodeType",4),Or(this,"RRNodeType",In.CDATA),Or(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 zn{constructor(t,e){var r=this;if(Or(this,"onChange"),Or(this,"classes",[]),Or(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(" "))})),Or(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 Vn(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Yn(t,e,r){if(!r)return Vn(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 $n(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 qn=(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))(qn||{}),Zn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Jn={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"},Xn=null;function Kn(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Xn&&(Xn=new WeakSet,setTimeout((()=>{Xn=null}),0)),!es(t,e)){var s=ts(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case In.Document:if(!rs(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==Xn||Xn.add(t))}break;case In.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;Kn(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Qn(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)&&Zn[o])t.setAttributeNS(Zn[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),Qn(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case In.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case In.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,d=o,v=c.open,p=c.matches("dialog:modal"),m=d.open,y=d.isModal,g=p!==y,w=v!==m;if((g||v&&w)&&c.close(),m&&(w||g))try{y?c.showModal():c.show()}catch(t){console.warn(t)}}break;case In.Text:case In.Comment:case In.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Xn?void 0:Xn.has(t))&&(Xn.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function Qn(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],d=s[u],v=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(rs(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(rs(f,d,r.mirror,i))f=n[--a],d=s[--u];else if(rs(l,d,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],d=s[--u]}else if(rs(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!v){v={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(v[r.mirror.getId(y)]=m)}}var g=n[p=v[i.getId(c)]];if(void 0!==p&&g&&rs(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=ts(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=ts(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;)Kn(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function ts(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&es(o,t))return o;switch(t.RRNodeType){case In.Document:o=new Document;break;case In.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case In.Element:var a=t.tagName.toLowerCase();a=Jn[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Zn.svg,a):document.createElement(t.tagName);break;case In.Text:o=document.createTextNode(t.data);break;case In.Comment:o=document.createComment(t.data);break;case In.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Xn||Xn.add(o)}catch(t){}return o}function es(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function rs(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&es(t,e)}class is extends Bn{constructor(t){super(),Or(this,"UNSERIALIZED_STARTING_ID",-2),Or(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),Or(this,"mirror",new ps),Or(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.l--}createDocument(t,e,r){return new is}createDocumentType(t,e,r){var i=new ns(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new os(r);break;case"IFRAME":e=new ls(r,this.mirror);break;case"CANVAS":e=new hs(r);break;case"STYLE":e=new us(r);break;case"DIALOG":e=new as(r);break;default:e=new ss(r)}return e.ownerDocument=this,e}createComment(t){var e=new cs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new ds(t);return e.ownerDocument=this,e}createTextNode(t){var e=new fs(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}}var ns=Pn;class ss extends Fn{constructor(){super(...arguments),Or(this,"inputData",null),Or(this,"scrollData",null)}}class os extends jn{}class as extends Un{}class hs extends ss{constructor(){super(...arguments),Or(this,"rr_dataURL",null),Or(this,"canvasMutations",[])}getContext(){return null}}class us extends ss{constructor(){super(...arguments),Or(this,"rules",[])}}class ls extends ss{constructor(t,e){super(t),Or(this,"contentDocument",new is),this.contentDocument.mirror=e}}var fs=Wn,cs=Hn,ds=Gn;function vs(t,e,i,n){var s,o;switch(t.nodeType){case qn.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case qn.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case qn.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 qn.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case qn.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case qn.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case qn.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var f=i.getMeta(t);return e instanceof is&&(f||(f=ms(s,e.unserializedId),i.add(t,f)),e.mirror.add(s,r({},f))),s}class ps{constructor(){Or(this,"idNodeMap",new Map),Or(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 ms(t,e){switch(t.RRNodeType){case In.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case In.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case In.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case In.Text:case In.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case In.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function ys(t,e){return-1!==t.indexOf(e)}var gs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},ws={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},bs={};function Ss(t){if(bs[t])return bs[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 gs?gs[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 ws?ws[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 bs[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?(ys(h=navigator.userAgent,"AppleWebKit")&&!ys(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),bs[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var ks={};function Cs(t,e,r){var i,n=t+"."+String(r);if(ks[n])return ks[n].call(e);var s=Ss(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(ks[n]=o,o.call(e)):e[r]}var Ms={};function xs(t,e,r){var i=t+"."+String(r);if(Ms[i])return Ms[i].bind(e);var n=Ss(t)[r];return"function"!=typeof n?e[r]:(Ms[i]=n,n.bind(e))}function Es(){return Ss("MutationObserver").constructor}function Rs(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 Is={childNodes:t=>Cs("Node",t,"childNodes"),parentNode:t=>Cs("Node",t,"parentNode"),parentElement:t=>Cs("Node",t,"parentElement"),textContent:t=>Cs("Node",t,"textContent"),contains:(t,e)=>xs("Node",t,"contains")(e),getRootNode:t=>xs("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Cs("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Cs("Element",t,"shadowRoot"):null,querySelector:(t,e)=>xs("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>xs("Element",t,"querySelectorAll")(e),mutationObserver:Es,patch:Rs};function As(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>Ts(r,t,e,i)}function Ts(t,e,r,i){Os((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function Os(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var Ds="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.",Ns={map:{},getId(){return console.error(Ds),-1},getNode(){return console.error(Ds),null},removeNodeFromMap(){console.error(Ds)},has(){return console.error(Ds),!1},reset(){console.error(Ds)}};function _s(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 Ls(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)}}}),()=>Ls(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ns=new Proxy(Ns,{get(t,e,r){return"map"===e&&console.error(Ds),Reflect.get(t,e,r)}}));var Bs=Date.now;function Ps(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=Is.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=Is.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function Fs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function js(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Us(t){return t?t.nodeType===t.ELEMENT_NODE?t:Is.parentElement(t):null}function Ws(t,e,r,i){if(!t)return!1;var n=Us(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(Ct(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 Hs(t,e){return-1!==e.getId(t)}function Gs(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===dt}function zs(t,e){if(U(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Is.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||zs(i,e))}function Vs(t){return Boolean(t.changedTouches)}function Ys(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 $s(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 qs(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)qs(t.children[r],e)}function Zs(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Js(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Xs(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=Xs(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 Ks(t){return!!t&&(t instanceof Ln&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Is.shadowRoot(t)))}function Qs(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Qs(r.cssRules,e.slice(1)):null}function to(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function eo(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())||(Bs=()=>(new Date).getTime());class ro{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 io(t){var e,r=null;return"getRootNode"in t&&(null==(e=Is.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Is.host(Is.getRootNode(t))&&(r=Is.host(Is.getRootNode(t))),r}function no(t){for(var e,r=t;e=io(r);)r=e;return r}function so(t){var e=t.ownerDocument;if(!e)return!1;var r=no(t);return Is.contains(e,r)}function oo(t){var e=t.ownerDocument;return!!e&&(Is.contains(e,t)||so(t))}var ao=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:ro,get _mirror(){return Ns},callSafely:Os,closestElementOfNode:Us,getBaseDimension:Xs,getNestedRule:Qs,getPositionsAndIndex:to,getRootShadowHost:no,getShadowHost:io,getWindowHeight:Fs,getWindowScroll:Ps,getWindowWidth:js,hasShadowRoot:Ks,hookSetter:Ls,inDom:oo,isAncestorRemoved:zs,isBlocked:Ws,isIgnored:Gs,isSerialized:Hs,isSerializedIframe:Zs,isSerializedStylesheet:Js,iterateResolveTree:qs,legacy_isTouchEvent:Vs,get nowTimestamp(){return Bs},on:As,polyfill:Ys,queueToResolveTrees:$s,removeEventListenerSafely:Ts,shadowHostInDom:so,throttle:_s,uniqueTextMutations:eo},Symbol.toStringTag,{value:"Module"})),ho=(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))(ho||{}),uo="rrweb/fullscreen",lo=(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))(lo||{}),fo=(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))(fo||{}),co=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(co||{}),vo=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(vo||{}),po=(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))(po||{}),mo=(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))(mo||{}),yo=(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))(yo||{});function go(t){return"__ln"in t}class wo{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&&go(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&&go(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 bo,So=(t,e)=>t+"@"+e;class ko{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",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,"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=M();try{this.processBufferedMutations()}finally{(t=M()-e)>O.slowestBatchMs&&(O.slowestBatchMs=t)}}})),u(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new wo,i=t=>{for(var e=t,r=dt;r===dt;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=Is.parentNode(n);if(s&&oo(n)&&"TEXTAREA"!==s.tagName){var o=U(s)?this.mirror.getId(io(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=_t(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,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Zs(t,this.mirror)&&this.iframeManager.addIframe(t),Js(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Ks(n)&&this.shadowDomManager.addShadowRoot(Is.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)Mo(this.removesSubTreeCache,s)&&!this.movedSet.has(Is.parentNode(s))||n(s);for(var o of this.addedSet)xo(this.droppedSet,o)||Mo(this.removesSubTreeCache,o)?xo(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(Is.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 d=this.mirror.getId(Is.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==d){h=c;break}var v=Is.parentNode(c.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=Is.host(v);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=Is.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=t.attributes;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(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(Is.childNodes(t),(t=>Is.textContent(t)||"")).join("");e.attributes.value=q({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:X(t),value:r,maskInputFn:this.maskInputFn})})),u(this,"processMutation",(t=>{if(!Gs(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Is.textContent(t.target);Ws(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Mt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,Us(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=X(r);n=q({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(Ws(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(this.attributes.push(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!kt(r.tagName,i))if(o.attributes[i]=St(this.doc,Z(r.tagName),Z(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&(a.style.cssText=t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var f of Array.from(a.style))""===r.style.getPropertyValue(f)&&(o.styleDiff[f]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(o.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(Ws(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=U(t.target)?this.mirror.getId(Is.host(t.target)):this.mirror.getId(t.target);Ws(t.target,this.blockClass,this.blockSelector,!1)||Gs(e,this.mirror,this.slimDOMOptions)||!Hs(e,this.mirror)||(this.addedSet.has(e)?(Co(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||zs(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[So(r,i)]?Co(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!U(t.target)||!W(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),Is.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(Gs(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[So(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ws(t,this.blockClass,this.blockSelector,!1)||(Is.childNodes(t).forEach((t=>this.genAdds(t))),Ks(t)&&Is.childNodes(Is.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","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 Co(t,e){t.delete(e),Is.childNodes(e).forEach((e=>Co(t,e)))}function Mo(t,e,r){return 0!==t.size&&function(t,e,r){var i=Is.parentNode(e);return!!i&&t.has(i)}(t,e)}function xo(t,e){return 0!==t.size&&Eo(t,e)}function Eo(t,e){var r=Is.parentNode(e);return!!r&&(!!t.has(r)||Eo(t,r))}var Ro=t=>bo?function(){try{return t(...arguments)}catch(t){if(bo&&!0===bo(t))return;throw t}}:t,Io=[];function Ao(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 To(t,e){var r=new ko;Io.push(r),r.init(t);var i=new(Es())(Ro(r.processMutations.bind(r))),n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),i.observe(e,n),{observer:i,buffer:r}}function Oo(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=Ao(t);if(o&&!Ws(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=Ps(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=[As("scroll",Ro(_s(Ro((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(As("scrollend",Ro(h),r)),()=>u.forEach((t=>t()))}function Do(t,e){for(var r=Io.length-1;r>=0;r--){var i=Io[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),Io.splice(r,1))}}}var No=["INPUT","TEXTAREA","SELECT"],_o=new WeakMap;function Lo(t){return function t(e,r){if(jo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||jo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||jo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||jo("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 Bo(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function Po(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:Is.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}}),Ro((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function Fo(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};if(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,d=t.selectionCb,v=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),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var o=To(t,t.doc);i=o.observer,n=o.buffer}var a,h,u,l,f,c,d,v,p,m,y,g,w,b=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=_s(Ro((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=Ro(_s(Ro((t=>{var e=Ao(t),r=Vs(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=Bs()),h.push({x:i,y:o,id:n.getId(e),timeOffset:Bs()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?lo.Drag:t instanceof MouseEvent?lo.MouseMove:lo.TouchMove)})),o,{trailing:!1})),f=[As("mousemove",l,i),As("touchmove",l,i),As("drag",l,i)];return Ro((()=>{f.forEach((t=>t()))}))}(t),S=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(fo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=Z(t),h=(t=>i=>{var a=Ao(i);if(!Ws(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=co.Mouse;break;case"touch":h=co.Touch;break;case"pen":h=co.Pen}h===co.Touch&&(fo[t]===fo.MouseDown?u="TouchStart":fo[t]===fo.MouseUp&&(u="TouchEnd"))}else Vs(i)&&(h=co.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===co.Touch||u.startsWith("Mouse")&&h===co.Mouse)&&(h=null)):fo[t]===fo.Click&&(h=l,l=null);var f=Vs(i)?i.changedTouches[0]:i;if(f){var c=n.getId(a),d=f.clientX,v=f.clientY;Ro(e)(r({type:fo[u],id:c,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(fo[t]){case fo.MouseDown:case fo.MouseUp:a=a.replace("mouse","pointer");break;case fo.TouchStart:case fo.TouchEnd:return}u.push(As(a,h,i))})),Ro((()=>{u.forEach((t=>t()))}))}(t),k=Oo(t),C=(a=t.viewportResizeCb,h=s,u=-1,l=-1,As("resize",Ro(_s(Ro((()=>{var t=Fs(),e=js();u===t&&l===e||(a({width:Number(e),height:Number(t)}),u=t,l=e)})),200)),h)),M=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=Ao(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=Is.parentElement(e)),e&&c&&No.indexOf(c)>=0&&!Ws(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var v=e.value,p=!1,m=X(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(v=q({element:e,maskInputOptions:u,tagName:c,type:m,value:v,maskInputFn:l})),d(e,f?{text:v,isChecked:p,userTriggered:r}:{text:v,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;d(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function d(t,i){var s=_o.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){_o.set(t,i);var o=n.getId(t);Ro(e)(r({},i,{id:o}))}}var v=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>As(t,Ro(c),i))),p=i.defaultView;if(!p)return()=>{v.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&v.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=>Ls(t[0],t[1],{set(){Ro(c)({target:this,isTrusted:!1})}},!1,p)))),Ro((()=>{v.forEach((t=>t()))}))}(t),x=(c=(f=t).mediaInteractionCb,d=f.blockClass,v=f.blockSelector,p=f.mirror,m=f.sampling,y=f.doc,g=Ro((t=>_s(Ro((e=>{var r=Ao(e);if(r&&!Ws(r,d,v,!0)){var i=r.currentTime,n=r.volume,s=r.muted,o=r.playbackRate,a=r.loop;c({type:t,id:p.getId(r),currentTime:i,volume:n,muted:s,playbackRate:o,loop:a})}})),m.media||500))),w=[As("play",g(po.Play),y),As("pause",g(po.Pause),y),As("seeked",g(po.Seeked),y),As("volumechange",g(po.VolumeChange),y),As("ratechange",g(po.RateChange),y)],Ro((()=>{w.forEach((t=>t()))}))),E=()=>{},R=()=>{},I=()=>{},A=()=>{};t.recordDOM&&(E=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:Ro(((t,e,s)=>{var o=s[0],a=s[1],h=Bo(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)}))}),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:Ro(((t,e,s)=>{var o=s[0],a=Bo(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)}))}),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:Ro(((t,e,s)=>{var o=s[0],a=Bo(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)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ro(((t,e,s)=>{var o=s[0],a=Bo(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)}))}));var l={};Uo("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Uo("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Uo("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Uo("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:Ro(((t,e,s)=>{var o=s[0],a=s[1],h=Bo(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:[...Lo(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(f[e].deleteRule,{apply:Ro(((t,e,s)=>{var o=s[0],a=Bo(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:[...Lo(e),o]}]}),t.apply(e,s)}))})})),Ro((()=>{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}),R=Po(t,t.doc),I=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:Ro(((t,e,o)=>{var h,u=o[0],l=o[1],f=o[2];if(n.has(u))return a.apply(e,[u,l,f]);var c=Bo(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror),d=c.id,v=c.styleId;return(d&&-1!==d||v&&-1!==v)&&r({id:d,styleId:v,set:{property:u,value:l,priority:f},index:Lo(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ro(((t,e,o)=>{var a,u=o[0];if(n.has(u))return h.apply(e,[u]);var l=Bo(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror),f=l.id,c=l.styleId;return(f&&-1!==f||c&&-1!==c)&&r({id:f,styleId:c,remove:{property:u},index:Lo(e.parentRule)}),t.apply(e,o)}))}),Ro((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s}),t.collectFonts&&(A=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=Rs(r.fonts,"add",(function(t){return function(r){return setTimeout(Ro((()=>{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),Ro((()=>{n.forEach((t=>t()))}))}(t)));var T=function(t){var e=t.doc,r=t.mirror,i=t.blockClass,n=t.blockSelector,s=t.selectionCb,o=!0,a=Ro((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),f=l.startContainer,c=l.startOffset,d=l.endContainer,v=l.endOffset;Ws(f,i,n,!0)||Ws(d,i,n,!0)||a.push({start:r.getId(f),startOffset:c,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),As("selectionchange",a)}(t),O=function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?Rs(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),D=[];for(var N of t.plugins)D.push(N.observer(N.callback,s,N.options));return Ro((()=>{if(n){n.destroy(),n.reset();var e=Io.indexOf(n);-1!==e&&Io.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),b(),S(),k(),C(),M(),x(),E(),R(),I(),A(),T(),O(),D.forEach((t=>t()))}))}function jo(t){return void 0!==window[t]}function Uo(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Wo{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 Ho{constructor(t){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new Wo(vt)),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 Wo(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=>Os(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{Ts(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);Os((()=>{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)}))}Os((()=>{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 ho.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:ho.IncrementalSnapshot,data:{source:lo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case ho.Meta:case ho.Load:case ho.DomContentLoaded:return!1;case ho.Plugin:return e;case ho.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case ho.IncrementalSnapshot:switch(e.data.source){case lo.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 lo.Drag:case lo.TouchMove:case lo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case lo.ViewportResize:return!1;case lo.MediaInteraction:case lo.MouseInteraction:case lo.Scroll:case lo.CanvasMutation:case lo.Input:return this.replaceIds(e.data,t,["id"]),e;case lo.StyleSheetRule:case lo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case lo.Font:return e;case lo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case lo.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===yo.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&&(Ts(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(Ts(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=>{Os((()=>this.mirror.removeNodeFromMap(t)))})),Os((()=>Do(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&&Ts(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{Ts(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 Go{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(W(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=Is.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=To(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=Io.indexOf(h);-1!==t&&Io.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:Oo(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(Is.host(t))),this.restoreHandlers.push({doc:s,handler:Po({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:Rs(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=Is.shadowRoot(this);return s&&oo(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 zo="skip-frame";function Vo(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 Yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$o="undefined"==typeof Uint8Array?[]:new Uint8Array(256),qo=0;64>qo;qo++)$o[Yo.charCodeAt(qo)]=qo;var Zo=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=$o[t.charCodeAt(e)],i=$o[t.charCodeAt(e+1)],n=$o[t.charCodeAt(e+2)],s=$o[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},Jo=new Map,Xo=(t,e,r)=>{if(t&&(ta(t,e)||"object"==typeof t)){var i=function(t,e){var r=Jo.get(t);return r||Jo.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 Ko(t,e,r,i){return t instanceof Array?t.map((t=>Ko(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+=Yo[r[e]>>2],n+=Yo[(3&r[e])<<4|r[e+1]>>4],n+=Yo[(15&r[e+1])<<2|r[e+2]>>6],n+=Yo[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:[Ko(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:[Ko(t.data,e,r,i),t.width,t.height]}:ta(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Xo(t,e,r)}:t}var Qo=(t,e,r,i)=>t.map((t=>Ko(t,e,r,i))),ta=(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])))},ea=["webgl","webgl2"];function ra(t){return"nodeType"in t}function ia(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 Rs(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||ra(o)&&Ws(o,e,i,!0))return n.call(this,s);ra(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=Rs(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(!Ws(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&ea.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 na(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=Rs(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(Xo(f,s,this),"tagName"in this.canvas&&!Ws(this.canvas,i,n,!0)){var c=Qo(u,s,this,o);r(this.canvas,{type:e,property:h,args:c})}return f}}));a.push(u)}catch(i){var l=Ls(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 sa,oa,aa,ha='(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',ua="undefined"!=typeof self&&self.Blob&&new Blob([ha],{type:"text/javascript;charset=utf-8"});function la(t){var e;try{if(!(e=ua&&(self.URL||self.webkitURL).createObjectURL(ua)))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(ha),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class fa{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=ia(r,i,n,!0),l=new Map;try{a=new la}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:vo["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,d=1e3/t,v=0,p=t=>{var u,m;f||(v&&d>t-v||(v=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{Ws(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)),d=Math.max(1,Math.round(f*h)),v=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return zo}if(void 0!==o){if(!Array.isArray(o)||!o.every(Vo))return zo;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,d,u,f);if(v===zo)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:d,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:d});a.postMessage({id:i,bitmap:p,width:c,height:d,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:v},[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=ia(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=Rs(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 Ws(this.canvas,r,i,!0)||setTimeout((()=>{var r=Qo(h,e,this,n);t(this.canvas,{type:vo["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=Ls(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:vo["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(...na(e.WebGLRenderingContext.prototype,vo.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...na(e.WebGL2RenderingContext.prototype,vo.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 ca{constructor(t){u(this,"trackedLinkElements",new WeakSet),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"styleMirror",new ro),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}inlineDeferredLinkElement(t,e){if(-1!==e&&t.isConnected){var r=null;try{var i=t.sheet;i&&(r=G(i))}catch(t){}r&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:r}}]})}}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;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:z(e,t.href),index:r})))})),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,Et.forEach((t=>t.abort())),Et.clear()}trackStylesheetInLinkElement(t){}}class da{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 va=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var pa=document.createElement("iframe");document.body.appendChild(pa),Array.from=(null==(n=pa.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(pa)}}catch(t){console.debug("Unable to override Array.from",t)}var ma=Y(),ya=new Set([lo.Mutation,lo.MediaInteraction,lo.StyleSheetRule,lo.CanvasMutation,lo.Font,lo.Log,lo.StyleDeclaration,lo.AdoptedStyleSheet]);function ga(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 wa(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,d=i.ignoreSelector,v=void 0===d?null:d,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=void 0===S?1e4:S,O=i.maskAllInputs,N=i.maskInputOptions,_=i.slimDOMOptions,L=i.maskInputFn,B=i.maskTextFn,P=i.hooks,F=i.packFn,j=i.sampling,U=void 0===j?{}:j,W=i.dataURLOptions,H=void 0===W?{}:W,G=i.canvasResolutionScale,z=i.canvasMasking,Y=i.mousemoveWait,q=i.recordDOM,Z=void 0===q||q,J=i.recordCanvas,X=void 0!==J&&J,K=i.recordCrossOriginIframes,Q=void 0!==K&&K,tt=i.recordAfter,et=void 0===tt?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":tt,rt=i.userTriggeredOnInput,it=void 0!==rt&&rt,nt=i.collectFonts,st=void 0!==nt&&nt,ot=i.inlineImages,at=void 0!==ot&&ot,ht=i.plugins,ut=i.keepIframeSrcFn,lt=void 0===ut?()=>!1:ut,ft=i.ignoreCSSAttributes,ct=void 0===ft?new Set([]):ft,dt=i.attributeFilter;bo=i.errorHandler;var vt=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},H),pt=!Q||window.parent===window,mt=!1;if(!pt)try{window.parent.document&&(mt=!1)}catch(t){mt=!0}if(pt&&!n)throw new Error("emit function is required");if(!pt&&!mt)return()=>{};void 0!==Y&&void 0===U.mousemove&&(U.mousemove=Y),ma.reset();var yt,gt=!0===O?{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!==N?N:{password:!0},wt=Lt(void 0!==_&&_);Ys();var bt,St,kt=0,Ct=new Map,Mt=t=>{for(var e of ht||[])e.eventProcessor&&(t=e.eventProcessor(t));return F&&!mt&&(t=F(t)),t};sa=(t,e)=>{var r,i=t;if(i.timestamp=Bs(),!(null==(r=Io[0])?void 0:r.isFrozen())||i.type===ho.FullSnapshot||i.type===ho.IncrementalSnapshot&&ya.has(i.data.source)||Io.forEach((t=>t.unfreeze())),pt)null==n||n(Mt(i),e);else if(mt){var a={type:"rrweb",event:Mt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===ho.FullSnapshot)yt=i,kt=0;else if(i.type===ho.IncrementalSnapshot){if(i.data.source===lo.Mutation&&i.data.isAttachIframe)return;kt++,(o&&kt>=o||s&&i.timestamp-yt.timestamp>s)&&oa(!0)}};var xt=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=ma.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=At.getIframeElementById(r);n&&i.has(n)?At.forgetIframeId(r):(null==bt||bt(r),At.removeIframeById(r))}})),null==St||St(),At.cleanupDetachedIframes()}sa({type:ho.IncrementalSnapshot,data:r({source:lo.Mutation},t)})},Et=t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.Scroll},t)}),Rt=t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.CanvasMutation},t)}),It=new ca({mutationCb:xt,adoptedStyleSheetCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.AdoptedStyleSheet},t)})}),At=new Ho({mirror:ma,mutationCb:xt,stylesheetManager:It,recordCrossOriginIframes:Q,wrappedEmit:sa});for(var Tt of ht||[])Tt.getMirror&&Tt.getMirror({nodeMirror:ma,crossOriginIframeMirror:At.crossOriginIframeMirror,crossOriginIframeStyleMirror:At.crossOriginIframeStyleMirror});var Ot=new da,Dt=null==z?void 0:z.configured;aa=new fa({recordCanvas:X,mutationCb:Rt,win:window,blockClass:h,blockSelector:l,mirror:ma,sampling:U.canvas,dataURLOptions:vt,resolutionScale:G,canvasMasking:z});var Nt=new Go({mutationCb:xt,scrollCb:Et,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:gt,dataURLOptions:vt,maskTextFn:B,maskInputFn:L,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,sampling:U,slimDOMOptions:wt,iframeManager:At,stylesheetManager:It,canvasManager:aa,keepIframeSrcFn:lt,processedNodeManager:Ot,attributeFilter:dt},mirror:ma});oa=function(t){if(void 0===t&&(t=!1),Z){sa({type:ho.Meta,data:{href:window.location.href,width:js(),height:Fs()}},t),null==e||e(),e=void 0,It.reset(),Nt.init(),Io.forEach((t=>t.lock()));var r,i,n=null;try{n=function(t,e){var r,i=e||{},n=i.mirror,s=void 0===n?new V:n,o=i.blockClass,a=void 0===o?"rr-block":o,h=i.blockSelector,u=void 0===h?null:h,l=i.maskTextClass,f=void 0===l?"rr-mask":l,c=i.maskTextSelector,d=void 0===c?null:c,v=i.inlineStylesheet,p=void 0===v||v,m=i.inlineImages,y=void 0!==m&&m,g=i.recordCanvas,w=void 0!==g&&g,b=i.canvasMaskingConfigured,S=i.maskAllInputs,k=void 0!==S&&S,O=i.maskTextFn,N=i.maskInputFn,_=i.slimDOM,L=i.dataURLOptions,B=i.preserveWhiteSpace,P=i.onSerialize,F=i.onIframeLoad,j=i.iframeLoadTimeout,U=i.onIframeListenerRegistered,W=i.onStylesheetLoad,H=i.stylesheetLoadTimeout,G=i.keepIframeSrcFn,z=void 0===G?()=>!1:G,Y=i.maxDepth,q=i.inlineStylesheetBudgetRules,Z=!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}:!1===k?{password:!0}:k,J=Lt(void 0!==_&&_);r=q,(x+=1)>1||(R=C(),T=[],A=D(r),E=M());try{return _t(t,{doc:t,mirror:s,blockClass:a,blockSelector:u,maskTextClass:f,maskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:Z,maskTextFn:O,maskInputFn:N,slimDOMOptions:J,dataURLOptions:L,inlineImages:y,recordCanvas:w,canvasMaskingConfigured:b,preserveWhiteSpace:B,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:j,onIframeListenerRegistered:U,onStylesheetLoad:W,stylesheetLoadTimeout:H,keepIframeSrcFn:z,newlyAddedElement:!1,maxDepth:Y})}finally{0===x?I||C():(x-=1)>0||(R.durationMs=M()-E,R.deferredStylesheetCount=T.length,A=null,I=R)}}(document,{mirror:ma,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:gt,inlineStylesheetBudgetRules:k,maskTextFn:B,maskInputFn:L,slimDOM:wt,dataURLOptions:vt,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,onSerialize(t){Zs(t,ma)&&At.addIframe(t),Js(t,ma)&&It.trackLinkElement(t),Ks(t)&&Nt.addShadowRoot(Is.shadowRoot(t),document)},onIframeLoad(t,e){At.attachIframe(t,e),Nt.observeAttachShadow(t)},onIframeListenerRegistered(t,e){At.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){It.attachLinkElement(t,e)},keepIframeSrcFn:lt})}finally{r=T,T=[],i=r}if(!n)return console.warn("Failed to snapshot the document");sa({type:ho.FullSnapshot,data:{node:n,initialOffset:Ps(window)}},t),Io.forEach((t=>t.unlock())),aa.onFullSnapshot(),i.length&&(e=function(t,r,i){var n=!1,s=null,o=0,a=i=>{if(s=null,!n){var h=function(){var e=t[o];t[o]=null,o+=1,e&&Os((()=>r.inlineDeferredLinkElement(e,ma.getId(e))))};do{h()}while(t.length>o&&i&&!i.didTimeout&&i.timeRemaining()>5);t.length>o?s=ga(a):e=void 0}};return s=ga(a),()=>{n=!0,null==s||s.cancel(),s=null}}(i,It)),Q&&At.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&It.adoptStyleSheets(document.adoptedStyleSheets,ma.getId(document))}};try{var Bt=[];bt=t=>{var e=Ct.get(t);e&&(e.forEach((t=>{Os(t);var e=Bt.indexOf(t);-1!==e&&Bt.splice(e,1)})),Ct.delete(t))},St=()=>{for(var t of Ct){var e=t[0],r=ma.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==bt||bt(e)}catch(t){null==bt||bt(e)}else null==bt||bt(e)}};var Pt=t=>{var e;return Ro(Fo)({mutationCb:xt,mousemoveCb:(t,e)=>sa({type:ho.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.MouseInteraction},t)}),scrollCb:Et,viewportResizeCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.ViewportResize},t)}),inputCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.Input},t)}),mediaInteractionCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.MediaInteraction},t)}),styleSheetRuleCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.StyleSheetRule},t)}),styleDeclarationCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.StyleDeclaration},t)}),canvasMutationCb:Rt,fontCb:t=>sa({type:ho.IncrementalSnapshot,data:r({source:lo.Font},t)}),selectionCb(t){sa({type:ho.IncrementalSnapshot,data:r({source:lo.Selection},t)})},customElementCb(t){sa({type:ho.IncrementalSnapshot,data:r({source:lo.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:v,maskTextClass:m,maskTextSelector:g,maskInputOptions:gt,inlineStylesheet:b,sampling:U,recordDOM:Z,recordCanvas:X,canvasMaskingConfigured:Dt,inlineImages:at,userTriggeredOnInput:it,collectFonts:st,doc:t,maskInputFn:L,maskTextFn:B,keepIframeSrcFn:lt,blockSelector:l,slimDOMOptions:wt,dataURLOptions:vt,mirror:ma,iframeManager:At,stylesheetManager:It,shadowDomManager:Nt,processedNodeManager:Ot,canvasManager:aa,ignoreCSSAttributes:ct,attributeFilter:dt,plugins:(null==(e=null==ht?void 0:ht.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>sa({type:ho.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},P)};At.addLoadListener((t=>{try{var e=ma.getId(t),r=Pt(t.contentDocument);if(Bt.push(r),-1!==e){var i=Ct.get(e);i||Ct.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),At.addPageHideListener((t=>{var e=ma.getId(t);null==bt||bt(e),Do(t)}));var Ft=-1,jt=t=>sa({type:ho.Custom,data:{tag:uo,payload:t}}),Ut=()=>{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?ma.getId(s):-1;o!==Ft&&(-1!==Ft&&jt({id:Ft,enter:!1}),Ft=o,-1!==o&&jt({id:o,enter:!0}))},Wt=()=>{oa(),Bt.push(Pt(document)),Bt.push(As("fullscreenchange",Ut)),Bt.push(As("webkitfullscreenchange",Ut)),Bt.push(As("mozfullscreenchange",Ut)),Bt.push(As("MSFullscreenChange",Ut)),va=!0};return["interactive","complete"].includes(document.readyState)?Wt():(Bt.push(As("DOMContentLoaded",(()=>{sa({type:ho.DomContentLoaded,data:{}}),"DOMContentLoaded"===et&&Wt()}))),Bt.push(As("load",(()=>{sa({type:ho.Load,data:{}}),"load"===et&&Wt()}),window))),()=>{null==e||e(),e=void 0,Bt.forEach((t=>Os(t))),Ot.destroy(),At.removeLoadListener(),At.destroy(),Ct.clear(),Nt.reset(),ma.reset(),va=!1,bo=void 0}}catch(t){console.warn(t)}}function ba(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)}))}}}wa.addCustomEvent=(t,e)=>{if(!va)throw new Error("please add custom event after start recording");sa({type:ho.Custom,data:{tag:t,payload:e}})},wa.freezePage=()=>{Io.forEach((t=>t.freeze()))},wa.takeFullSnapshot=t=>{if(!va)throw new Error("please take full snapshot after start recording");oa(t)},wa.mirror=ma;var Sa,ka,Ca=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"}));function Ma(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])?v.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):v.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;v.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?(v.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 d(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(d.bind(t,e))}function v(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),d({scrollable:a,method:f,startTime:c,startX:u,startY:l,x:i,y:n})}}class xa{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 Ea(t,e){if(t.type===ho.IncrementalSnapshot&&t.data.source===lo.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 Ra(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}(ka=Sa||(Sa={}))[ka.NotStarted=0]="NotStarted",ka[ka.Running=1]="Running",ka[ka.Stopped=2]="Stopped";var Ia={type:"xstate.init"};function Aa(t){return void 0===t?[]:[].concat(t)}function Ta(t){return{type:"xstate.assign",assignment:t}}function Oa(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 Da(t){return function(e){return t===e}}function Na(t){return"string"==typeof t?{type:t}:t}function _a(t,e){return{value:t,context:e,actions:[],changed:!1,matches:Da(t)}}function La(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 Ba(t,e){void 0===e&&(e={});var r=Ra(La(Aa(t.states[t.initial].entry).map((function(t){return Oa(t,e.actions)})),t.context,Ia),2),i={config:t,bh:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:Da(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=Na(r),l=t.states[a];if(l.on){var f=Aa(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),d=c.next();!d.done;d=c.next()){var v=d.value;if(void 0===v)return _a(a,h);var p="string"==typeof v?{target:v}:v,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=Ra(La([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return Oa(t,i.bh.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:Da(y)}}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return _a(a,h)}};return i}var Pa=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function Fa(t){var e=t.initialState,r=Sa.NotStarted,i=new Set,n={Sf:t,send(n){r===Sa.Running&&(e=t.transition(e,n),Pa(e,Na(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:Da(s.value)}}return r=Sa.Running,Pa(e,Ia),n},stop:()=>(r=Sa.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function ja(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===ho.Meta&&e>=i.timestamp)return t.slice(r)}return t}var Ua=new Map;function Wa(t,e){var r=Ua.get(t);return r||Ua.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function Ha(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 Ha(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 Wa(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(Ha(t,r,i))))}if("base64"in e)return Zo(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(Ha(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(Ha(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var Ga=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function za(t){return Va.apply(this,arguments)}function Va(){return(Va=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===vo.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(Ha(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(Ga.includes(r)){var i=Wa(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function Ya(){return Ya=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(Ha(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"))})),Ya.apply(this,arguments)}function $a(t){return qa.apply(this,arguments)}function qa(){return qa=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([vo.WebGL,vo.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield za({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return Ya.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),qa.apply(this,arguments)}var Za=["AUDIO","VIDEO"];class Ja{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(mo.Start,this.start.bind(this)),this.emitter.on(mo.SkipStart,this.start.bind(this)),this.emitter.on(mo.Pause,this.pause.bind(this)),this.emitter.on(mo.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,d=h.muted,v=h.volume,p=h.loop;return{isPlaying:l===po.Play||l!==po.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!=v?v:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=d?d: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;Za.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Za.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Xa(t,e){if(!("DIALOG"!==t.nodeName||t instanceof Ln)){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 Ka=ba||Ca,Qa="[replayer]",th={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function eh(t){return t.type==ho.IncrementalSnapshot&&(t.data.source==lo.TouchMove||t.data.source==lo.MouseInteraction&&t.data.type==fo.TouchStart)}class rh{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 is),u(this,"mouse"),u(this,"mouseTail",null),u(this,"tailPositions",[]),u(this,"emitter",Ka()),u(this,"nextUserInteractionEvent"),u(this,"legacy_missingNodeRetryMap",{}),u(this,"cache",Er()),u(this,"imageMap",new Map),u(this,"canvasEventMap",new Map),u(this,"mirror",Y()),u(this,"styleMirror",new ro),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 ho.DomContentLoaded:case ho.Load:return!1;case ho.Custom:return t.data.tag===uo;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(mo.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 ho.DomContentLoaded:case ho.Load:break;case ho.Custom:n=()=>{e||i.emitter.emit(mo.CustomEvent,t),t.data.tag===uo&&i.applyFullscreen(t.data.payload)};break;case ho.Meta:n=()=>i.emitter.emit(mo.Resize,{width:t.data.width,height:t.data.height});break;case ho.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.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case ho.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(mo.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(mo.Finish)))},h=50;t.type===ho.IncrementalSnapshot&&t.data.source===lo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(mo.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:th,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(mo.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(mo.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{$a({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===lo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===lo.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{Kn(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=ts(r.node,this.mirror,this.virtualDom.mirror);Kn(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=[]}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(mo.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,l,f,c=new xa([],{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,Fa(Ba({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:Ta({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:Ta(((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))Ea(o,n);var a=ja(i,n),u=a.some((t=>t.type===ho.FullSnapshot&&t.timestamp===n)),c=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===ho.IncrementalSnapshot&&s.data.source===lo.MouseMove&&(c=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(c||0)>n&&f.emit(mo.PlayBack);var d=new Array;for(var v of a)(!c||c>=n||v.timestamp>c&&v!==s)&&(n>v.timestamp||u&&v.timestamp===n&&(v.type===ho.Meta||v.type===ho.FullSnapshot))&&d.push(v);l(d,(()=>{var e=function(){if(n>i.timestamp||u&&i.timestamp===n&&(i.type===ho.Meta||i.type===ho.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 ja(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:Ta((t=>r({},t,{lastPlayedEvent:null}))),startLive:Ta({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:Ta(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;Ea(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(mo.StateChange,{player:t})})),this.speedService=function(t){return Fa(Ba({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:Ta({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(mo.StateChange,{speed:t})})),this.mediaManager=new Ja({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var d=this.service.state.context.events.find((t=>t.type===ho.Meta)),v=this.service.state.context.events.find((t=>t.type===ho.FullSnapshot));if(d){var p=d.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(mo.Resize,{width:m,height:y})}),0)}v&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=v,this.rebuildFullSnapshot(v),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},v.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(eh)&&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(mo.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(mo.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(mo.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.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(mo.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(mo.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;eh(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=Er()}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&&(Ma(this.iframe.contentWindow,this.iframe.contentDocument),Ys(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 V:h,l=Ar(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=>Xa(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(mo.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,ms(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:lo.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)===yo.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})};Ar(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=>Xa(t)))}collectIframeAndAttachDocument(t,e){if(Zs(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(mo.Start,s),this.emitter.on(mo.Pause,s);var o=()=>{this.emitter.off(mo.Start,s),this.emitter.off(mo.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(mo.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(mo.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===ho.IncrementalSnapshot&&r.data.source===lo.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(Ha(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(Ha(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 lo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case lo.Drag:case lo.TouchMove:case lo.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 lo.MouseInteraction:if(-1===s.id)break;var a=new Event(Z(fo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(mo.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case fo.Blur:"blur"in h&&h.blur();break;case fo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case fo.Click:case fo.TouchStart:case fo.TouchEnd:case fo.MouseDown:case fo.MouseUp:e?(s.type===fo.TouchStart?this.touchActive=!0:s.type===fo.TouchEnd&&(this.touchActive=!1),s.type===fo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===fo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===fo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===fo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===fo.TouchStart?this.mouse.classList.add("touch-active"):s.type===fo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case fo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case lo.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 lo.ViewportResize:this.emitter.emit(mo.Resize,{width:s.width,height:s.height});break;case lo.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 lo.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 lo.StyleSheetRule:case lo.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 lo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);d.canvasMutations.push({event:t,mutation:s})}else{var v=this.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);$a({event:t,mutation:s,target:v,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case lo.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 lo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case lo.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 zr),void 0===s&&(s=new is),function t(e,r){var i=vs(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==qn.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!==qn.DOCUMENT_NODE&&e.nodeType!==qn.ELEMENT_NODE&&e.nodeType!==qn.DOCUMENT_FRAGMENT_NODE||(e.nodeType===qn.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=vs(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&&Ks(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=[],d=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===yo.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?c.push(e):void 0;e.node.isShadow&&(Ks(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);var s=null,o=null;if(e.previousId&&(s=l.getNode(e.previousId)),e.nextId&&(o=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var a=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Zs(n,l))this.attachDocumentToIframe(e,n);else{var h=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Xa(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},u=Ar(e.node,{doc:a,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:h});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===yo.Element&&e.node.type===yo.Text){var v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var p of v)p.nodeType===n.TEXT_NODE&&n.removeChild(p);else if("style"===d.tagName&&1===v.length)for(var m of v)m.nodeType!==n.TEXT_NODE||l.hasNode(m)||(u.textContent=m.textContent,n.removeChild(m))}else if((null==d?void 0:d.type)===yo.Document){var y=n;e.node.type===yo.DocumentType&&(null==(r=y.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===u.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(s&&s.nextSibling&&s.nextSibling.parentNode?n.insertBefore(u,s.nextSibling):o&&o.parentNode?n.contains(o)?n.insertBefore(u,o):n.insertBefore(u,null):n.appendChild(u),h(u,e.node.id),this.usingVirtualDom&&"#text"===u.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Zs(u,this.mirror)){var g=this.mirror.getId(u),w=this.newDocumentQueue.find((t=>t.parentId===g));w&&(this.attachDocumentToIframe(w,u),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==w)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,n,u,e)}else f[e.node.id]={node:u,mutation:e}}}};t.adds.forEach((t=>{d(t)}));for(var v=performance.now();c.length;){var p=$s(c);if(c.length=0,performance.now()-v>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)?qs(m,(t=>{d(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),eo(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=l.getNode(e.id);if(!n){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var s=function(){if("string"==typeof a){var t=e.attributes[a];if(null===t)n.removeAttribute(a),"open"===a&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof Ln)){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)}}(n,e);else if("string"==typeof t)try{if("_cssText"===a&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{var s=l.getMeta(n),h=Ar(r({},s,{attributes:r({},s.attributes,e.attributes)}),{doc:n.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});Object.assign(s.attributes,e.attributes);var u=n.nextSibling,f=n.parentNode;if(h&&f)return f.removeChild(n),f.insertBefore(h,u),l.replace(e.id,h),1}catch(t){}if("value"===a&&"TEXTAREA"===n.nodeName){var c=n;c.childNodes.forEach((t=>c.removeChild(t)));var d=null==(i=n.ownerDocument)?void 0:i.createTextNode(t);d&&c.appendChild(d)}else n.setAttribute(a,t);"rr_open_mode"===a&&"DIALOG"===n.nodeName&&Xa(n,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===a){var v=t,p=n;for(var m in v)if(!1===v[m])p.style.removeProperty(m);else if(v[m]instanceof Array){var y=v[m];p.style.setProperty(m,y[0],y[1])}else p.style.setProperty(m,v[m])}}};for(var a in e.attributes)if(s())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)===yo.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===lo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===lo.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=Qs(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=Qs(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=Qs(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=Qs(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){null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(Ks(r)?n=(null==(e=r.ownerDocument)?void 0:e.defaultView)||null:"#document"===r.nodeName&&(n=r.defaultView),n)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:lo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var i=0,n=(t,e)=>{var r=e.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t));Ks(t)?t.shadowRoot.adoptedStyleSheets=r:"#document"===t.nodeName&&(t.adoptedStyleSheets=r),r.length!==e.length&&10>i&&(setTimeout((()=>n(t,e)),0+100*i),i++)};n(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=Xs(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?th:Object.assign({},th,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")})),this.lastHoveredRootNode=t.getRootNode();for(var r=t;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type===ho.IncrementalSnapshot&&t.data.source>lo.Mutation&&lo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(mo.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(Qa,...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(Qa,...e)}}}var ih=wa.addCustomEvent,nh=wa.freezePage,sh=wa.takeFullSnapshot;export{ho as EventType,lo as IncrementalSource,fo as MouseInteractions,rh as Replayer,mo as ReplayerEvents,ih as addCustomEvent,$a as canvasMutation,nh as freezePage,N as getLastSnapshotCost,P as getMutationCost,Ns as mirror,wa as record,Nt as resetMaxDepthState,F as resetSnapshotCostState,sh as takeFullSnapshot,ao as utils,Dt as wasMaxDepthReached};
2
2
  //# sourceMappingURL=rrweb.js.map