@lark-sentry/screen-record 1.0.0
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/index.cjs +19072 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +19068 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.cjs +2 -0
- package/dist/index.min.cjs.map +1 -0
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Status as e,EventType as t,SentryPlugin as r}from"@lark-sentry/types";import{MinHeap as s,sentry as n,getTime as i}from"@lark-sentry/utils";import o from"@lark-sentry/reporter";import{DEFAULT_OPTIONS as a}from"@lark-sentry/constants";var l,h=Object.defineProperty,c=(e,t,r)=>((e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),u=Object.defineProperty,d=(e,t,r)=>((e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),p=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(p||{});const f={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function y(e){if(g[e])return g[e];const t=globalThis[e],r=t.prototype,s=e in f?f[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in m?m[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return g[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?g[e]=i:r}catch{return r}}const w={};function b(e,t,r){var s;const n=`${e}.${String(r)}`;if(w[n])return w[n].call(t);const i=y(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(w[n]=o,o.call(t)):t[r]}const v={};function S(e,t,r){const s=`${e}.${String(r)}`;if(v[s])return v[s].bind(t);const n=y(e)[r];return"function"!=typeof n?t[r]:(v[s]=n,n.bind(t))}const _={childNodes:function(e){return b("Node",e,"childNodes")},parentNode:function(e){return b("Node",e,"parentNode")},parentElement:function(e){return b("Node",e,"parentElement")},textContent:function(e){return b("Node",e,"textContent")},contains:function(e,t){return S("Node",e,"contains")(t)},getRootNode:function(e){return S("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?b("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?b("Element",e,"shadowRoot"):null},querySelector:function(e,t){return b("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return b("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return y("MutationObserver").constructor}};function C(e){return e.nodeType===e.ELEMENT_NODE}function k(e){const t=e&&"host"in e&&"mode"in e&&_.host(e)||null;return Boolean(t&&"shadowRoot"in t&&_.shadowRoot(t)===e)}function x(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function I(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,e=>O(e,s)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function O(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=I(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?P(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?P(r,t):r}}class A{constructor(){d(this,"idNodeMap",new Map),d(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function R({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";const a=s&&M(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function M(e){return e.toLowerCase()}const E="__rrweb_original__";function T(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?M(t):null}function N(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const D=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,L=/^(?:[a-z+]+:)?\/\//i,z=/^www\..*/i,F=/^(data:)([^,]*),(.*)/i;function P(e,t){return(e||"").replace(D,(e,r,s,n,i,o)=>{const a=s||i||o,l=r||n||"";if(!a)return e;if(L.test(a)||z.test(a))return`url(${l}${a}${l})`;if(F.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const h=t.split("/"),c=a.split("/");h.pop();for(const e of c)"."!==e&&(".."===e?h.pop():h.push(e));return`url(${l}${h.join("/")}${l})`})}function U(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function B(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=U(e);for(let n=1;n<r.length;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const i=U(r[n].textContent);for(let r=3;r<i.length;r++){const n=i.substring(0,r);if(2===t.split(n).length){const r=t.indexOf(n);for(let t=r;t<e.length;t++)if(U(e.substring(0,t)).length===r){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(e,t).join("/* rr_split */")}let Z=1;const j=new RegExp("[^a-z0-9-_:]");function W(){return Z++}let V,G;const Y=/^[^ \t\n\r\u000c]+/,H=/^[, \t\n\r\u000c]+/;const J=new WeakMap;function X(e,t){return t&&""!==t.trim()?$(e,t):t}function K(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function $(e,t){let r=J.get(e);if(r||(r=e.createElement("a"),J.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Q(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?X(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(H),!(r>=t.length);){let i=s(Y);if(","===i.slice(-1))i=X(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=X(e,i);let o=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((i+s).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,n.push((i+s).trim());break}"("===e&&(o=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?P(s,$(e)):"object"===t&&"data"===r?X(e,s):s:X(e,s):s}function q(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function ee(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ee(_.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&ee(_.parentNode(e),t,r)}function te(e,t,r,s){let n;if(C(e)){if(n=e,!_.childNodes(n).length)return!1}else{if(null===_.parentElement(e))return!1;n=_.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(ee(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function re(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:h,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g=!1,cssCaptured:y=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:p.Document,childNodes:[],compatMode:e.compatMode}:{type:p.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:p.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:h,recordCanvas:c,keepIframeSrcFn:u,newlyAddedElement:d=!1,rootId:f}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=M(e.tagName);return j.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];q(g,s.name,s.value)||(y[s.name]=Q(r,g,M(s.name),s.value))}if("link"===g&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=I(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=I(e.sheet);t&&(e.childNodes.length>1&&(t=B(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=R({element:e,type:T(e),tagName:g,value:t,maskInputOptions:o,maskInputFn:a}):r&&(y.checked=r)}"option"===g&&(e.selected&&!o.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&c)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,i=E in n?n[E]:n;if(new Uint32Array(i.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(y.rr_dataURL=t)}if("img"===g&&h){V||(V=r.createElement("canvas"),G=V.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{V.width=t.naturalWidth,V.height=t.naturalHeight,G.drawImage(t,0,0),y.rr_dataURL=V.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===g||"video"===g){const t=y;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}d||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==g||u(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:p.Element,tagName:g,attributes:y,childNodes:[],isSVG:K(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:u,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g,rootId:w});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,o=_.parentNode(e),a=o&&o.tagName;let l="";const h="STYLE"===a||void 0,c="SCRIPT"===a||void 0;c?l="SCRIPT_PLACEHOLDER":i||(l=_.textContent(e),h&&l&&(l=P(l,$(t.doc))));!h&&!c&&l&&r&&(l=s?s(l,_.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:h,rootId:w,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:p.Comment,textContent:_.textContent(e)||"",rootId:w};default:return!1}}function se(e){return null==e?"":e.toLowerCase()}function ne(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:c={},maskTextFn:u,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:g=!1,recordCanvas:y=!1,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:A=!1,cssCaptured:R=!1}=t;let{needsMask:M}=t,{preserveWhiteSpace:E=!0}=t;if(!M){M=te(e,o,a,void 0===M)}const T=re(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:M,inlineStylesheet:h,maskInputOptions:c,maskTextFn:u,maskInputFn:d,dataURLOptions:m,inlineImages:g,recordCanvas:y,keepIframeSrcFn:O,newlyAddedElement:A,cssCaptured:R});if(!T)return console.warn(e,"not serialized"),null;let D;D=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===p.Comment)return!0;if(e.type===p.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===N(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(se(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===se(e.attributes.name)||"icon"===se(e.attributes.rel)||"apple-touch-icon"===se(e.attributes.rel)||"shortcut icon"===se(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&se(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(se(e.attributes.property).match(/^(og|twitter|fb):/)||se(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===se(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===se(e.attributes.name)||"googlebot"===se(e.attributes.name)||"bingbot"===se(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===se(e.attributes.name)||"generator"===se(e.attributes.name)||"framework"===se(e.attributes.name)||"publisher"===se(e.attributes.name)||"progid"===se(e.attributes.name)||se(e.attributes.property).match(/^article:/)||se(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===se(e.attributes.name)||"yandex-verification"===se(e.attributes.name)||"csrf-token"===se(e.attributes.name)||"p:domain_verify"===se(e.attributes.name)||"verify-v1"===se(e.attributes.name)||"verification"===se(e.attributes.name)||"shopify-checkout-api-token"===se(e.attributes.name)))return!0}}return!1}(T,f)||!E&&T.type===p.Text&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?-2:W();const L=Object.assign(T,{id:D});if(s.add(e,L),-2===D)return null;w&&w(e);let z=!l;if(L.type===p.Element){z=z&&!L.needBlock,delete L.needBlock;const t=_.shadowRoot(e);t&&x(t)&&(L.isShadowHost=!0)}if((L.type===p.Document||L.type===p.Element)&&z){f.headWhitespace&&L.type===p.Element&&"head"===L.tagName&&(E=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:M,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:c,maskTextFn:u,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:O,cssCaptured:!1};if(L.type===p.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else{L.type===p.Element&&void 0!==L.attributes._cssText&&"string"==typeof L.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(_.childNodes(e))){const e=ne(r,t);e&&L.childNodes.push(e)}}let k=null;if(C(e)&&(k=_.shadowRoot(e)))for(const e of Array.from(_.childNodes(k))){const r=ne(e,t);r&&(x(k)&&(r.isShadow=!0),L.childNodes.push(r))}}const F=_.parentNode(e);return F&&k(F)&&x(F)&&(L.isShadow=!0),L.type===p.Element&&"iframe"===L.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,i=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}const o="about:blank";if(s.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&b){const r=ne(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:M,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:c,maskTextFn:u,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:O});r&&b(e,r)}},v),L.type===p.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===N(L.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(S){const t=ne(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:M,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:c,maskTextFn:u,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:O});t&&S(e,t)}},I),L}function ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oe(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var ae={exports:{}},le=String,he=function(){return{isColorSupported:!1,reset:le,bold:le,dim:le,italic:le,underline:le,inverse:le,hidden:le,strikethrough:le,black:le,red:le,green:le,yellow:le,blue:le,magenta:le,cyan:le,white:le,gray:le,bgBlack:le,bgRed:le,bgGreen:le,bgYellow:le,bgBlue:le,bgMagenta:le,bgCyan:le,bgWhite:le}};ae.exports=he(),ae.exports.createColors=he;var ce=ae.exports;const ue=oe(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let de=ce,pe=ue,fe=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}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(e){if(!this.source)return"";let t=this.source;null==e&&(e=de.isColorSupported),pe&&e&&(t=pe(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=de.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var me=fe;fe.default=fe;var ge={};ge.isClean=Symbol("isClean"),ge.my=Symbol("my");const ye={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let we=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return ye[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=ye[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var be=we;we.default=we;let ve=be;function Se(e,t){new ve(t).stringify(e)}var _e=Se;Se.default=Se;let{isClean:Ce,my:ke}=ge,xe=me,Ie=be,Oe=_e;function Ae(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>Ae(e,r)):("object"===i&&null!==n&&(n=Ae(n)),r[s]=n)}return r}let Re=class{constructor(e={}){this.raws={},this[Ce]=!1,this[ke]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ae(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new xe(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ce]){this[Ce]=!1;let e=this;for(;e=e.parent;)e[Ce]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Ie).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Oe){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Me=Re;Re.default=Re;let Ee=Me,Te=class extends Ee{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Ne=Te;Te.default=Te;var De={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Le,SourceMapGenerator:ze}=ue,{existsSync:Fe,readFileSync:Pe}=ue,{dirname:Ue,join:Be}=ue;let Ze=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ue(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Le(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ue(e),Fe(e))return this.mapFile=e,Pe(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Le)return ze.fromSourceMap(t).toString();if(t instanceof ze)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Be(Ue(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var je=Ze;Ze.default=Ze;let{SourceMapConsumer:We,SourceMapGenerator:Ve}=ue,{fileURLToPath:Ge,pathToFileURL:Ye}=ue,{isAbsolute:He,resolve:Je}=ue,{nanoid:Xe}=De,Ke=ue,$e=me,Qe=je,qe=Symbol("fromOffsetCache"),et=Boolean(We&&Ve),tt=Boolean(Je&&He),rt=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!tt||/^\w+:\/\//.test(t.from)||He(t.from)?this.file=t.from:this.file=Je(t.from)),tt&&et){let e=new Qe(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Xe(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new $e(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new $e(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Ye&&(n.input.url=Ye(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[qe])r=this[qe];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[qe]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Je(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=He(a.source)?Ye(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ye(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Ge)throw new Error("file: protocol is not available in this PostCSS build");l.file=Ge(i)}let h=o.sourceContentFor(a.source);return h&&(l.source=h),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var st=rt;rt.default=rt,Ke&&Ke.registerInput&&Ke.registerInput(rt);let{SourceMapConsumer:nt,SourceMapGenerator:it}=ue,{dirname:ot,relative:at,resolve:lt,sep:ht}=ue,{pathToFileURL:ct}=ue,ut=st,dt=Boolean(nt&&it),pt=Boolean(ot&<&&at&&ht);var ft=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||ot(e.file);!1===this.mapOpts.sourcesContent?(t=new nt(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pt&&dt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=it.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new it({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 it({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?ot(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=ot(lt(r,this.mapOpts.annotation)));let s=at(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ut(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ct){let t=ct(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ht&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let mt=Me,gt=class extends mt{constructor(e){super(e),this.type="comment"}};var yt=gt;gt.default=gt;let wt,bt,vt,St,{isClean:_t,my:Ct}=ge,kt=Ne,xt=yt,It=Me;function Ot(e){return e.map(e=>(e.nodes&&(e.nodes=Ot(e.nodes)),delete e.source,e))}function At(e){if(e[_t]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)At(t)}let Rt=class e extends It{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Ot(wt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new kt(t)]}else if(t.selector)t=[new bt(t)];else if(t.name)t=[new vt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new xt(t)]}return t.map(t=>(t[Ct]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[_t]&&At(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Rt.registerParse=e=>{wt=e},Rt.registerRule=e=>{bt=e},Rt.registerAtRule=e=>{vt=e},Rt.registerRoot=e=>{St=e};var Mt=Rt;Rt.default=Rt,Rt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,vt.prototype):"rule"===e.type?Object.setPrototypeOf(e,bt.prototype):"decl"===e.type?Object.setPrototypeOf(e,kt.prototype):"comment"===e.type?Object.setPrototypeOf(e,xt.prototype):"root"===e.type&&Object.setPrototypeOf(e,St.prototype),e[Ct]=!0,e.nodes&&e.nodes.forEach(e=>{Rt.rebuild(e)})};let Et,Tt,Nt=Mt,Dt=class extends Nt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Et(new Tt,this,e).stringify()}};Dt.registerLazyResult=e=>{Et=e},Dt.registerProcessor=e=>{Tt=e};var Lt=Dt;Dt.default=Dt;let zt={};var Ft=function(e){zt[e]||(zt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Pt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var Ut=Pt;Pt.default=Pt;let Bt=Ut,Zt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Bt(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var jt=Zt;Zt.default=Zt;const Wt="'".charCodeAt(0),Vt='"'.charCodeAt(0),Gt="\\".charCodeAt(0),Yt="/".charCodeAt(0),Ht="\n".charCodeAt(0),Jt=" ".charCodeAt(0),Xt="\f".charCodeAt(0),Kt="\t".charCodeAt(0),$t="\r".charCodeAt(0),Qt="[".charCodeAt(0),qt="]".charCodeAt(0),er="(".charCodeAt(0),tr=")".charCodeAt(0),rr="{".charCodeAt(0),sr="}".charCodeAt(0),nr=";".charCodeAt(0),ir="*".charCodeAt(0),or=":".charCodeAt(0),ar="@".charCodeAt(0),lr=/[\t\n\f\r "#'()/;[\\\]{}]/g,hr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cr=/.[\r\n"'(/\\]/,ur=/[\da-f]/i;let dr=Mt,pr=class extends dr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var fr=pr;pr.default=pr,dr.registerAtRule(pr);let mr,gr,yr=Mt,wr=class extends yr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new mr(new gr,this,e).stringify()}};wr.registerLazyResult=e=>{mr=e},wr.registerProcessor=e=>{gr=e};var br=wr;wr.default=wr,yr.registerRoot(wr);let vr={comma:e=>vr.split(e,[","],!0),space:e=>vr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Sr=vr;vr.default=vr;let _r=Mt,Cr=Sr,kr=class extends _r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Cr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var xr=kr;kr.default=kr,_r.registerRule(kr);let Ir=Ne,Or=function(e,t={}){let r,s,n,i,o,a,l,h,c,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case Ht:case Jt:case Kt:case $t:case Xt:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Jt||r===Ht||r===Kt||r===$t||r===Xt);u=["space",d.slice(m,s)],m=s-1;break;case Qt:case qt:case rr:case sr:case or:case nr:case tr:{let e=String.fromCharCode(r);u=[e,e,m];break}case er:if(h=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===h&&c!==Wt&&c!==Vt&&c!==Jt&&c!==Ht&&c!==Kt&&c!==Xt&&c!==$t){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}w("bracket")}for(l=s;d.charCodeAt(l-1)===Gt;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),i=d.slice(m,s+1),-1===s||cr.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Wt:case Vt:n=r===Wt?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}w("string")}for(l=s;d.charCodeAt(l-1)===Gt;)l-=1,a=!a}while(a);u=["string",d.slice(m,s+1),m,s],m=s;break;case ar:lr.lastIndex=m+1,lr.test(d),s=0===lr.lastIndex?d.length-1:lr.lastIndex-2,u=["at-word",d.slice(m,s+1),m,s],m=s;break;case Gt:for(s=m,o=!0;d.charCodeAt(s+1)===Gt;)s+=1,o=!o;if(r=d.charCodeAt(s+1),o&&r!==Yt&&r!==Jt&&r!==Ht&&r!==Kt&&r!==$t&&r!==Xt&&(s+=1,ur.test(d.charAt(s)))){for(;ur.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Jt&&(s+=1)}u=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Yt&&d.charCodeAt(m+1)===ir?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:w("comment")),u=["comment",d.slice(m,s+1),m,s],m=s):(hr.lastIndex=m+1,hr.test(d),s=0===hr.lastIndex?d.length-1:hr.lastIndex-2,u=["word",d.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Ar=yt,Rr=fr,Mr=br,Er=xr;const Tr={empty:!0,space:!0};let Nr=Mt,Dr=class{constructor(e){this.input=e,this.root=new Mr,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Rr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Ar;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Or(this.input)}decl(e,t){let r=new Ir;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Er;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,h="",c=!0;for(let e=0;e<l;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",Tr[a]||Tr[o]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new Er;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Lr=st;function zr(e,t){let r=new Lr(e,t),s=new Dr(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Fr=zr;zr.default=zr,Nr.registerParse(zr);let{isClean:Pr,my:Ur}=ge,Br=ft,Zr=_e,jr=Mt,Wr=Lt,Vr=Ft,Gr=jt,Yr=Fr,Hr=br;const Jr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xr={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},Kr={Once:!0,postcssPlugin:!0,prepare:!0};function $r(e){return"object"==typeof e&&"function"==typeof e.then}function Qr(e){let t=!1,r=Jr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function qr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Qr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function es(e){return e[Pr]=!1,e.nodes&&e.nodes.forEach(e=>es(e)),e}let ts={},rs=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Gr)n=es(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Yr;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Ur]&&jr.rebuild(n)}else n=es(r);this.result=new Gr(t,n,s),this.helpers={...ts,postcss:ts,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Xr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Kr[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if($r(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Pr];){e[Pr]=!0;let t=[qr(e)];for(;t.length>0;){let e=this.visitTick(t);if($r(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return $r(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Br(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if($r(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Pr];)e[Pr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Vr("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if($r(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Pr])return s[Pr]=!0,void e.push(qr(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Pr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Pr]=!0;let t=Qr(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Pr]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};rs.registerPostcss=e=>{ts=e};var ss=rs;rs.default=rs,Hr.registerLazyResult(rs),Wr.registerLazyResult(rs);let ns=ft,is=_e,os=Ft,as=Fr;const ls=jt;let hs=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=is;this.result=new ls(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new ns(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||os("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=as;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var cs=hs;hs.default=hs;let us=cs,ds=ss,ps=Lt,fs=br,ms=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.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 t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new ds(this,e,t):new us(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gs=ms;ms.default=ms,fs.registerProcessor(ms),ps.registerProcessor(ms);let ys=Ne,ws=je,bs=yt,vs=fr,Ss=st,_s=br,Cs=xr;function ks(e,t){if(Array.isArray(e))return e.map(e=>ks(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Ss.prototype};r.map&&(r.map={...r.map,__proto__:ws.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ks(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new _s(s);if("decl"===s.type)return new ys(s);if("rule"===s.type)return new Cs(s);if("comment"===s.type)return new bs(s);if("atrule"===s.type)return new vs(s);throw new Error("Unknown node type: "+e.type)}var xs=ks;ks.default=ks;let Is=me,Os=Ne,As=ss,Rs=Mt,Ms=gs,Es=_e,Ts=xs,Ns=Lt,Ds=Ut,Ls=yt,zs=fr,Fs=jt,Ps=st,Us=Fr,Bs=Sr,Zs=xr,js=br,Ws=Me;function Vs(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ms(e)}Vs.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Ms).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Vs([n(r)]).process(e,t)},n},Vs.stringify=Es,Vs.parse=Us,Vs.fromJSON=Ts,Vs.list=Bs,Vs.comment=e=>new Ls(e),Vs.atRule=e=>new zs(e),Vs.decl=e=>new Os(e),Vs.rule=e=>new Zs(e),Vs.root=e=>new js(e),Vs.document=e=>new Ns(e),Vs.CssSyntaxError=Is,Vs.Declaration=Os,Vs.Container=Rs,Vs.Processor=Ms,Vs.Document=Ns,Vs.Comment=Ls,Vs.Warning=Ds,Vs.AtRule=zs,Vs.Result=Fs,Vs.Input=Ps,Vs.Rule=Zs,Vs.Root=js,Vs.Node=Ws,As.registerPostcss(Vs);var Gs=Vs;Vs.default=Vs;const Ys=ie(Gs);Ys.stringify,Ys.fromJSON,Ys.plugin,Ys.parse,Ys.list,Ys.document,Ys.comment,Ys.atRule,Ys.rule,Ys.decl,Ys.root,Ys.CssSyntaxError,Ys.Declaration,Ys.Container,Ys.Processor,Ys.Document,Ys.Comment,Ys.Warning,Ys.AtRule,Ys.Result,Ys.Input,Ys.Rule,Ys.Root,Ys.Node;var Hs=Object.defineProperty,Js=(e,t,r)=>((e,t,r)=>t in e?Hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ks(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var $s={exports:{}},Qs=String,qs=function(){return{isColorSupported:!1,reset:Qs,bold:Qs,dim:Qs,italic:Qs,underline:Qs,inverse:Qs,hidden:Qs,strikethrough:Qs,black:Qs,red:Qs,green:Qs,yellow:Qs,blue:Qs,magenta:Qs,cyan:Qs,white:Qs,gray:Qs,bgBlack:Qs,bgRed:Qs,bgGreen:Qs,bgYellow:Qs,bgBlue:Qs,bgMagenta:Qs,bgCyan:Qs,bgWhite:Qs}};$s.exports=qs(),$s.exports.createColors=qs;var en=$s.exports;const tn=Ks(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let rn=en,sn=tn,nn=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}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(e){if(!this.source)return"";let t=this.source;null==e&&(e=rn.isColorSupported),sn&&e&&(t=sn(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=rn.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var on=nn;nn.default=nn;var an={};an.isClean=Symbol("isClean"),an.my=Symbol("my");const ln={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let hn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return ln[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=ln[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var cn=hn;hn.default=hn;let un=cn;function dn(e,t){new un(t).stringify(e)}var pn=dn;dn.default=dn;let{isClean:fn,my:mn}=an,gn=on,yn=cn,wn=pn;function bn(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>bn(e,r)):("object"===i&&null!==n&&(n=bn(n)),r[s]=n)}return r}let vn=class{constructor(e={}){this.raws={},this[fn]=!1,this[mn]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=bn(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new gn(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[fn]){this[fn]=!1;let e=this;for(;e=e.parent;)e[fn]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new yn).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=wn){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Sn=vn;vn.default=vn;let _n=Sn,Cn=class extends _n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var kn=Cn;Cn.default=Cn;var xn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:In,SourceMapGenerator:On}=tn,{existsSync:An,readFileSync:Rn}=tn,{dirname:Mn,join:En}=tn;let Tn=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Mn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new In(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Mn(e),An(e))return this.mapFile=e,Rn(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof In)return On.fromSourceMap(t).toString();if(t instanceof On)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=En(Mn(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Nn=Tn;Tn.default=Tn;let{SourceMapConsumer:Dn,SourceMapGenerator:Ln}=tn,{fileURLToPath:zn,pathToFileURL:Fn}=tn,{isAbsolute:Pn,resolve:Un}=tn,{nanoid:Bn}=xn,Zn=tn,jn=on,Wn=Nn,Vn=Symbol("fromOffsetCache"),Gn=Boolean(Dn&&Ln),Yn=Boolean(Un&&Pn),Hn=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Yn||/^\w+:\/\//.test(t.from)||Pn(t.from)?this.file=t.from:this.file=Un(t.from)),Yn&&Gn){let e=new Wn(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Bn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new jn(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new jn(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Fn&&(n.input.url=Fn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Vn])r=this[Vn];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Vn]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Un(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=Pn(a.source)?Fn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Fn(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!zn)throw new Error("file: protocol is not available in this PostCSS build");l.file=zn(i)}let h=o.sourceContentFor(a.source);return h&&(l.source=h),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Jn=Hn;Hn.default=Hn,Zn&&Zn.registerInput&&Zn.registerInput(Hn);let{SourceMapConsumer:Xn,SourceMapGenerator:Kn}=tn,{dirname:$n,relative:Qn,resolve:qn,sep:ei}=tn,{pathToFileURL:ti}=tn,ri=Jn,si=Boolean(Xn&&Kn),ni=Boolean($n&&qn&&Qn&&ei);var ii=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||$n(e.file);!1===this.mapOpts.sourcesContent?(t=new Xn(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ni&&si&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Kn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Kn({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 Kn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?$n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=$n(qn(r,this.mapOpts.annotation)));let s=Qn(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ri(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ti){let t=ti(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ei&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let oi=Sn,ai=class extends oi{constructor(e){super(e),this.type="comment"}};var li=ai;ai.default=ai;let hi,ci,ui,di,{isClean:pi,my:fi}=an,mi=kn,gi=li,yi=Sn;function wi(e){return e.map(e=>(e.nodes&&(e.nodes=wi(e.nodes)),delete e.source,e))}function bi(e){if(e[pi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)bi(t)}let vi=class e extends yi{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=wi(hi(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new mi(t)]}else if(t.selector)t=[new ci(t)];else if(t.name)t=[new ui(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new gi(t)]}return t.map(t=>(t[fi]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[pi]&&bi(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};vi.registerParse=e=>{hi=e},vi.registerRule=e=>{ci=e},vi.registerAtRule=e=>{ui=e},vi.registerRoot=e=>{di=e};var Si=vi;vi.default=vi,vi.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ui.prototype):"rule"===e.type?Object.setPrototypeOf(e,ci.prototype):"decl"===e.type?Object.setPrototypeOf(e,mi.prototype):"comment"===e.type?Object.setPrototypeOf(e,gi.prototype):"root"===e.type&&Object.setPrototypeOf(e,di.prototype),e[fi]=!0,e.nodes&&e.nodes.forEach(e=>{vi.rebuild(e)})};let _i,Ci,ki=Si,xi=class extends ki{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _i(new Ci,this,e).stringify()}};xi.registerLazyResult=e=>{_i=e},xi.registerProcessor=e=>{Ci=e};var Ii=xi;xi.default=xi;let Oi={};var Ai=function(e){Oi[e]||(Oi[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Ri=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var Mi=Ri;Ri.default=Ri;let Ei=Mi,Ti=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Ei(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Ni=Ti;Ti.default=Ti;const Di="'".charCodeAt(0),Li='"'.charCodeAt(0),zi="\\".charCodeAt(0),Fi="/".charCodeAt(0),Pi="\n".charCodeAt(0),Ui=" ".charCodeAt(0),Bi="\f".charCodeAt(0),Zi="\t".charCodeAt(0),ji="\r".charCodeAt(0),Wi="[".charCodeAt(0),Vi="]".charCodeAt(0),Gi="(".charCodeAt(0),Yi=")".charCodeAt(0),Hi="{".charCodeAt(0),Ji="}".charCodeAt(0),Xi=";".charCodeAt(0),Ki="*".charCodeAt(0),$i=":".charCodeAt(0),Qi="@".charCodeAt(0),qi=/[\t\n\f\r "#'()/;[\\\]{}]/g,eo=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,to=/.[\r\n"'(/\\]/,ro=/[\da-f]/i;let so=Si,no=class extends so{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var io=no;no.default=no,so.registerAtRule(no);let oo,ao,lo=Si,ho=class extends lo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new oo(new ao,this,e).stringify()}};ho.registerLazyResult=e=>{oo=e},ho.registerProcessor=e=>{ao=e};var co=ho;ho.default=ho,lo.registerRoot(ho);let uo={comma:e=>uo.split(e,[","],!0),space:e=>uo.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var po=uo;uo.default=uo;let fo=Si,mo=po,go=class extends fo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return mo.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var yo=go;go.default=go,fo.registerRule(go);let wo=kn,bo=function(e,t={}){let r,s,n,i,o,a,l,h,c,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case Pi:case Ui:case Zi:case ji:case Bi:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Ui||r===Pi||r===Zi||r===ji||r===Bi);u=["space",d.slice(m,s)],m=s-1;break;case Wi:case Vi:case Hi:case Ji:case $i:case Xi:case Yi:{let e=String.fromCharCode(r);u=[e,e,m];break}case Gi:if(h=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===h&&c!==Di&&c!==Li&&c!==Ui&&c!==Pi&&c!==Zi&&c!==Bi&&c!==ji){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}w("bracket")}for(l=s;d.charCodeAt(l-1)===zi;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),i=d.slice(m,s+1),-1===s||to.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Di:case Li:n=r===Di?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}w("string")}for(l=s;d.charCodeAt(l-1)===zi;)l-=1,a=!a}while(a);u=["string",d.slice(m,s+1),m,s],m=s;break;case Qi:qi.lastIndex=m+1,qi.test(d),s=0===qi.lastIndex?d.length-1:qi.lastIndex-2,u=["at-word",d.slice(m,s+1),m,s],m=s;break;case zi:for(s=m,o=!0;d.charCodeAt(s+1)===zi;)s+=1,o=!o;if(r=d.charCodeAt(s+1),o&&r!==Fi&&r!==Ui&&r!==Pi&&r!==Zi&&r!==ji&&r!==Bi&&(s+=1,ro.test(d.charAt(s)))){for(;ro.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Ui&&(s+=1)}u=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Fi&&d.charCodeAt(m+1)===Ki?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:w("comment")),u=["comment",d.slice(m,s+1),m,s],m=s):(eo.lastIndex=m+1,eo.test(d),s=0===eo.lastIndex?d.length-1:eo.lastIndex-2,u=["word",d.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},vo=li,So=io,_o=co,Co=yo;const ko={empty:!0,space:!0};let xo=Si,Io=class{constructor(e){this.input=e,this.root=new _o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new So;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new vo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=bo(this.input)}decl(e,t){let r=new wo;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Co;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,h="",c=!0;for(let e=0;e<l;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",ko[a]||ko[o]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new Co;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Oo=Jn;function Ao(e,t){let r=new Oo(e,t),s=new Io(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Ro=Ao;Ao.default=Ao,xo.registerParse(Ao);let{isClean:Mo,my:Eo}=an,To=ii,No=pn,Do=Si,Lo=Ii,zo=Ai,Fo=Ni,Po=Ro,Uo=co;const Bo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zo={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},jo={Once:!0,postcssPlugin:!0,prepare:!0};function Wo(e){return"object"==typeof e&&"function"==typeof e.then}function Vo(e){let t=!1,r=Bo[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Go(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Vo(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Yo(e){return e[Mo]=!1,e.nodes&&e.nodes.forEach(e=>Yo(e)),e}let Ho={},Jo=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Fo)n=Yo(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Po;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Eo]&&Do.rebuild(n)}else n=Yo(r);this.result=new Fo(t,n,s),this.helpers={...Ho,postcss:Ho,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Zo[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jo[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Wo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Mo];){e[Mo]=!0;let t=[Go(e)];for(;t.length>0;){let e=this.visitTick(t);if(Wo(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return Wo(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=No;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new To(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Wo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Mo];)e[Mo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||zo("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Wo(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Mo])return s[Mo]=!0,void e.push(Go(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Mo]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Mo]=!0;let t=Vo(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Mo]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Jo.registerPostcss=e=>{Ho=e};var Xo=Jo;Jo.default=Jo,Uo.registerLazyResult(Jo),Lo.registerLazyResult(Jo);let Ko=ii,$o=pn,Qo=Ai,qo=Ro;const ea=Ni;let ta=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=$o;this.result=new ea(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Ko(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Qo("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=qo;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var ra=ta;ta.default=ta;let sa=ra,na=Xo,ia=Ii,oa=co,aa=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.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 t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new na(this,e,t):new sa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var la=aa;aa.default=aa,oa.registerProcessor(aa),ia.registerProcessor(aa);let ha=kn,ca=Nn,ua=li,da=io,pa=Jn,fa=co,ma=yo;function ga(e,t){if(Array.isArray(e))return e.map(e=>ga(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:pa.prototype};r.map&&(r.map={...r.map,__proto__:ca.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ga(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new fa(s);if("decl"===s.type)return new ha(s);if("rule"===s.type)return new ma(s);if("comment"===s.type)return new ua(s);if("atrule"===s.type)return new da(s);throw new Error("Unknown node type: "+e.type)}var ya=ga;ga.default=ga;let wa=on,ba=kn,va=Xo,Sa=Si,_a=la,Ca=pn,ka=ya,xa=Ii,Ia=Mi,Oa=li,Aa=io,Ra=Ni,Ma=Jn,Ea=Ro,Ta=po,Na=yo,Da=co,La=Sn;function za(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new _a(e)}za.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new _a).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return za([n(r)]).process(e,t)},n},za.stringify=Ca,za.parse=Ea,za.fromJSON=ka,za.list=Ta,za.comment=e=>new Oa(e),za.atRule=e=>new Aa(e),za.decl=e=>new ba(e),za.rule=e=>new Na(e),za.root=e=>new Da(e),za.document=e=>new xa(e),za.CssSyntaxError=wa,za.Declaration=ba,za.Container=Sa,za.Processor=_a,za.Document=xa,za.Comment=Oa,za.Warning=Ia,za.AtRule=Aa,za.Result=Ra,za.Input=Ma,za.Rule=Na,za.Root=Da,za.Node=La,va.registerPostcss(za);var Fa=za;za.default=za;const Pa=Xs(Fa);Pa.stringify,Pa.fromJSON,Pa.plugin,Pa.parse,Pa.list,Pa.document,Pa.comment,Pa.atRule,Pa.rule,Pa.decl,Pa.root,Pa.CssSyntaxError,Pa.Declaration,Pa.Container,Pa.Processor,Pa.Document,Pa.Comment,Pa.Warning,Pa.AtRule,Pa.Result,Pa.Input,Pa.Rule,Pa.Root,Pa.Node;class Ua{constructor(...e){Js(this,"parentElement",null),Js(this,"parentNode",null),Js(this,"ownerDocument"),Js(this,"firstChild",null),Js(this,"lastChild",null),Js(this,"previousSibling",null),Js(this,"nextSibling",null),Js(this,"ELEMENT_NODE",1),Js(this,"TEXT_NODE",3),Js(this,"nodeType"),Js(this,"nodeName"),Js(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Ua))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Ba={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Za={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ja={};function Wa(e){if(ja[e])return ja[e];const t=globalThis[e],r=t.prototype,s=e in Ba?Ba[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in Za?Za[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return ja[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?ja[e]=i:r}catch{return r}}const Va={};function Ga(e,t,r){var s;const n=`${e}.${String(r)}`;if(Va[n])return Va[n].call(t);const i=Wa(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(Va[n]=o,o.call(t)):t[r]}const Ya={};function Ha(e,t,r){const s=`${e}.${String(r)}`;if(Ya[s])return Ya[s].bind(t);const n=Wa(e)[r];return"function"!=typeof n?t[r]:(Ya[s]=n,n.bind(t))}function Ja(){return Wa("MutationObserver").constructor}const Xa={childNodes:function(e){return Ga("Node",e,"childNodes")},parentNode:function(e){return Ga("Node",e,"parentNode")},parentElement:function(e){return Ga("Node",e,"parentElement")},textContent:function(e){return Ga("Node",e,"textContent")},contains:function(e,t){return Ha("Node",e,"contains")(t)},getRootNode:function(e){return Ha("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ga("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ga("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ga("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ga("Element",e,"querySelectorAll")(t)},mutationObserver:Ja};function Ka(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const $a="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.";let Qa={map:{},getId:()=>(console.error($a),-1),getNode:()=>(console.error($a),null),removeNodeFromMap(){console.error($a)},has:()=>(console.error($a),!1),reset(){console.error($a)}};function qa(e,t,r={}){let s=null,n=0;return function(...i){const o=Date.now();n||!1!==r.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=o,e.apply(l,i)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,i)},a))}}function el(e,t,r,s,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>el(e,t,i||{},!0)}function tl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Qa=new Proxy(Qa,{get:(e,t,r)=>("map"===t&&console.error($a),Reflect.get(e,t,r))}));let rl=Date.now;function sl(e){var t,r,s,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=Xa.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(s=Xa.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function nl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function il(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ol(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Xa.parentElement(e)}function al(e,t,r,s){if(!e)return!1;const n=ol(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(ee(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function ll(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function hl(e,t){if(k(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Xa.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||hl(s,t))}function cl(e){return Boolean(e.changedTouches)}function ul(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function dl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function pl(e){return!!e&&(e instanceof Ua&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Xa.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(rl=()=>(new Date).getTime());class fl{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ml(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Xa.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Xa.host(Xa.getRootNode(e))&&(r=Xa.host(Xa.getRootNode(e))),r}function gl(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=ml(r);)r=t;return r}(e);return Xa.contains(t,r)}function yl(e){const t=e.ownerDocument;return!!t&&(Xa.contains(t,e)||gl(e))}var wl=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(wl||{}),bl=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(bl||{}),vl=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(vl||{}),Sl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Sl||{}),_l=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(_l||{}),Cl=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Cl||{}),kl=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(kl||{});function xl(e){return"__ln"in e}class Il{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&xl(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&xl(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Ol=(e,t)=>`${e}@${t}`;class Al{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,"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,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),c(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Il,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const i=Xa.parentNode(n);if(!i||!yl(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=k(i)?this.mirror.getId(ml(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);const h=ne(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,inlineImages:this.inlineImages,onSerialize:e=>{ul(e,this.mirror)&&this.iframeManager.addIframe(e),dl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),pl(n)&&this.shadowDomManager.addShadowRoot(Xa.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});h&&(e.push({parentId:a,nextId:l,node:h}),t.add(h.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Ml(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Xa.parentNode(e))||n(e);for(const e of this.addedSet)El(this.droppedSet,e)||Ml(this.removesSubTreeCache,e,this.mirror)?El(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let i=null;for(;r.length;){let e=null;if(i){const t=this.mirror.getId(Xa.parentNode(i.value)),r=s(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Xa.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Xa.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Xa.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,r=Xa.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.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(o))}),c(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(Xa.childNodes(e),e=>Xa.textContent(e)||"").join("")}),c(this,"processMutation",e=>{if(!ll(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Xa.textContent(e.target);al(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:te(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ol(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=T(t);s=R({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(al(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!q(t.tagName,r))if(n.attributes[r]=Q(this.doc,M(t.tagName),M(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||i!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===i?s:[s,i]:n._unchangedStyles[e]=[s,i]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(al(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),s=k(e.target)?this.mirror.getId(Xa.host(e.target)):this.mirror.getId(e.target);al(e.target,this.blockClass,this.blockSelector,!1)||ll(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Rl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||hl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ol(r,s)]?Rl(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!k(e.target)||!x(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Xa.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),c(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ll(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Ol(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);al(e,this.blockClass,this.blockSelector,!1)||(Xa.childNodes(e).forEach(e=>this.genAdds(e)),pl(e)&&Xa.childNodes(Xa.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Rl(e,t){e.delete(t),Xa.childNodes(t).forEach(t=>Rl(e,t))}function Ml(e,t,r){return 0!==e.size&&function(e,t){const r=Xa.parentNode(t);return!!r&&e.has(r)}(e,t)}function El(e,t){return 0!==e.size&&Tl(e,t)}function Tl(e,t){const r=Xa.parentNode(t);return!!r&&(!!e.has(r)||Tl(e,r))}let Nl;const Dl=e=>{if(!Nl)return e;return(...t)=>{try{return e(...t)}catch(e){if(Nl&&!0===Nl(e))return;throw e}}},Ll=[];function zl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Fl(e,t){const r=new Al;Ll.push(r),r.init(e);const s=new(Ja())(Dl(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Pl({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(vl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=M(i);const h=(t=>i=>{const o=zl(i);if(al(o,s,n,!0))return;let a=null,h=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Sl.Mouse;break;case"touch":a=Sl.Touch;break;case"pen":a=Sl.Pen}a===Sl.Touch?vl[t]===vl.MouseDown?h="TouchStart":vl[t]===vl.MouseUp&&(h="TouchEnd"):Sl.Pen}else cl(i)&&(a=Sl.Touch);null!==a?(l=a,(h.startsWith("Touch")&&a===Sl.Touch||h.startsWith("Mouse")&&a===Sl.Mouse)&&(a=null)):vl[t]===vl.Click&&(a=l,l=null);const c=cl(i)?i.changedTouches[0]:i;if(!c)return;const u=r.getId(o),{clientX:d,clientY:p}=c;Dl(e)({type:vl[h],id:u,x:d,y:p,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(vl[i]){case vl.MouseDown:case vl.MouseUp:o=o.replace("mouse","pointer");break;case vl.TouchStart:case vl.TouchEnd:return}a.push(Ka(o,h,t))}),Dl(()=>{a.forEach(e=>e())})}function Ul({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return Ka("scroll",Dl(qa(Dl(i=>{const o=zl(i);if(!o||al(o,s,n,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=sl(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const Bl=["INPUT","TEXTAREA","SELECT"],Zl=new WeakMap;function jl(e){return function(e,t){if(Yl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Yl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Yl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Yl("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Wl(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Vl({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(Xa.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(i=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return s}}),Dl(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function Gl(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:h,styleDeclarationCb:c,canvasMutationCb:u,fontCb:d,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),h(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),c(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Fl(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=qa(Dl(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),h=Dl(qa(Dl(e=>{const t=zl(e),{clientX:r,clientY:n}=cl(e)?e.changedTouches[0]:e;o||(o=rl()),a.push({x:r,y:n,id:s.getId(t),timeOffset:rl()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?bl.Drag:e instanceof MouseEvent?bl.MouseMove:bl.TouchMove)}),n,{trailing:!1})),c=[Ka("mousemove",h,r),Ka("touchmove",h,r),Ka("drag",h,r)];return Dl(()=>{c.forEach(e=>e())})}(e),i=Pl(e),o=Ul(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Ka("resize",Dl(qa(Dl(()=>{const t=nl(),n=il();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:h,userTriggeredOnInput:c}){function u(e){let r=zl(e);const h=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=Xa.parentElement(r)),!r||!u||Bl.indexOf(u)<0||al(r,s,n,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let p=r.value,f=!1;const m=T(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(p=R({element:r,maskInputOptions:a,tagName:u,type:m,value:p,maskInputFn:l})),d(r,c?{text:p,isChecked:f,userTriggered:h}:{text:p,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;d(e,c?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function d(t,s){const n=Zl.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Zl.set(t,s);const n=r.getId(t);Dl(e)({...s,id:n})}}const p=("last"===h.input?["change"]:["input","change"]).map(e=>Ka(e,Dl(u),t)),f=t.defaultView;if(!f)return()=>{p.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...g.map(e=>el(e[0],e[1],{set(){Dl(u)({target:this,isTrusted:!1})}},!1,f))),Dl(()=>{p.forEach(e=>e())})}(e),h=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){const o=Dl(i=>qa(Dl(n=>{const o=zl(n);if(!o||al(o,t,r,!0))return;const{currentTime:a,volume:l,muted:h,playbackRate:c,loop:u}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:h,playbackRate:c,loop:u})}),n.media||500)),a=[Ka("play",o(Cl.Play),i),Ka("pause",o(Cl.Pause),i),Ka("seeked",o(Cl.Seeked),i),Ka("volumechange",o(Cl.VolumeChange),i),Ka("ratechange",o(Cl.RateChange),i)];return Dl(()=>{a.forEach(e=>e())})}(e);let c=()=>{},u=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Dl((s,n,i)=>{const[o,a]=i,{id:l,styleId:h}=Wl(n,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:a}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const i=s.CSSStyleSheet.prototype.deleteRule;let o,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Dl((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Wl(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Dl((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Wl(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),s.apply(n,i)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Dl((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Wl(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));const l={};Hl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Hl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Hl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Hl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const h={};return Object.entries(l).forEach(([s,n])=>{h[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(h[s].insertRule,{apply:Dl((s,n,i)=>{const[o,a]=i,{id:l,styleId:h}=Wl(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:[...jl(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:Dl((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Wl(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...jl(n),o]}]}),s.apply(n,i)})})}),Dl(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=i,o&&(s.CSSStyleSheet.prototype.replace=o),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=h[e].insertRule,t.prototype.deleteRule=h[e].deleteRule})})}(e,{win:r}),u=Vl(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Dl((n,o,a)=>{var l;const[h,c,u]=a;if(r.has(h))return i.apply(o,[h,c,u]);const{id:d,styleId:p}=Wl(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:h,value:c,priority:u},index:jl(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Dl((n,i,a)=>{var l;const[h]=a;if(r.has(h))return o.apply(i,[h]);const{id:c,styleId:u}=Wl(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,remove:{property:h},index:jl(i.parentRule)}),n.apply(i,a)})}),Dl(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){const s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const o=tl(t.fonts,"add",function(t){return function(r){return setTimeout(Dl(()=>{const t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=i}),s.push(o),Dl(()=>{s.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:i}=e;let o=!0;const a=Dl(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:h,endOffset:c}=i;al(o,s,n,!0)||al(h,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(h),endOffset:c})}i({ranges:a})});return a(),Ka("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?tl(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return Dl(()=>{Ll.forEach(e=>e.reset()),null==s||s.disconnect(),n(),i(),o(),a(),l(),h(),c(),u(),d(),p(),f(),m(),g.forEach(e=>e())})}function Yl(e){return void 0!==window[e]}function Hl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Jl{constructor(e){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),i=s||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Xl{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Jl(W)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case wl.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:wl.IncrementalSnapshot,data:{source:bl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case wl.Meta:case wl.Load:case wl.DomContentLoaded:return!1;case wl.Plugin:return t;case wl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case wl.IncrementalSnapshot:switch(t.data.source){case bl.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case bl.Drag:case bl.TouchMove:case bl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case bl.ViewportResize:return!1;case bl.MediaInteraction:case bl.MouseInteraction:case bl.Scroll:case bl.CanvasMutation:case bl.Input:return this.replaceIds(t.data,e,["id"]),t;case bl.StyleSheetRule:case bl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case bl.Font:return t;case bl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case bl.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===kl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Kl{constructor(e){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!x(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Fl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ul({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Xa.host(e))),this.restoreHandlers.push(Vl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(tl(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),i=Xa.shadowRoot(this);return i&&yl(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var $l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ql="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ql=0;ql<64;ql++)Ql[$l.charCodeAt(ql)]=ql;const eh=new Map;const th=(e,t,r)=>{if(!e||!nh(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=eh.get(e);return r||(r=new Map,eh.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function rh(e,t,r){if(e instanceof Array)return e.map(e=>rh(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=$l[r[t]>>2],n+=$l[(3&r[t])<<4|r[t+1]>>4],n+=$l[(15&r[t+1])<<2|r[t+2]>>6],n+=$l[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[rh(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[rh(e.data,t,r),e.width,e.height]}}if(nh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:th(e,t,r)}}return e}const sh=(e,t,r)=>e.map(e=>rh(e,t,r)),nh=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function ih(e,t,r,s){const n=[];try{const i=tl(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!al(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function oh(e,t,r,s,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=tl(e,l,function(e){return function(...o){const a=e.apply(this,o);if(th(a,i,this),"tagName"in this.canvas&&!al(this.canvas,s,n,!0)){const e=sh(o,i,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});o.push(a)}catch{const s=el(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const ah="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",lh="undefined"!=typeof window&&window.Blob&&new Blob([(hh=ah,Uint8Array.from(atob(hh),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var hh;function ch(e){let t;try{if(t=lh&&(window.URL||window.webkitURL).createObjectURL(lh),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+ah,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class uh{constructor(e){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,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const i=ih(t,r,s,!0),o=new Map,a=new ch;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:i}=e.data;this.mutationCb({id:t,type:_l["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let h,c=0;const u=e=>{c&&e-c<l||(c=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{al(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(o.get(r))return;if(0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),h=requestAnimationFrame(u)};h=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=ih(e,t,r,!1),n=function(e,t,r,s){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=tl(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return al(this.canvas,r,s,!0)||setTimeout(()=>{const r=sh(i,t,this);e(this.canvas,{type:_l["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{const r=el(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:_l["2D"],property:o,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){const n=[];return n.push(...oh(t.WebGLRenderingContext.prototype,_l.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...oh(t.WebGL2RenderingContext.prototype,_l.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map(e=>{const{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class dh{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new fl),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:O(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class ph{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let fh,mh,gh,yh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(l=e.contentWindow)?void 0:l.Array.from)||Array.from,document.body.removeChild(e)}}catch(Bc){console.debug("Unable to override Array.from",Bc)}const wh=new A;function bh(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:_=!1,recordCrossOriginIframes:C=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:I=!1,inlineImages:O=!1,plugins:R,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:T}=e;Nl=T;const N=!C||window.parent===window;let D=!1;if(!N)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!D)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),wh.reset();const L=!0===u?{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!==d?d:{password:!0},z=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let F;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let P=0;const U=e=>{for(const t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};fh=(e,n)=>{var i;const o=e;if(o.timestamp=rl(),!(null==(i=Ll[0])?void 0:i.isFrozen())||o.type===wl.FullSnapshot||o.type===wl.IncrementalSnapshot&&o.data.source===bl.Mutation||Ll.forEach(e=>e.unfreeze()),N)null==t||t(U(o),n);else if(D){const e={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===wl.FullSnapshot)F=o,P=0;else if(o.type===wl.IncrementalSnapshot){if(o.data.source===bl.Mutation&&o.data.isAttachIframe)return;P++;const e=s&&P>=s,t=r&&o.timestamp-F.timestamp>r;(e||t)&&mh(!0)}};const B=e=>{fh({type:wl.IncrementalSnapshot,data:{source:bl.Mutation,...e}})},Z=e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.Scroll,...e}}),j=e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.CanvasMutation,...e}}),W=new dh({mutationCb:B,adoptedStyleSheetCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.AdoptedStyleSheet,...e}})}),V=new Xl({mirror:wh,mutationCb:B,stylesheetManager:W,recordCrossOriginIframes:C,wrappedEmit:fh});for(const e of R||[])e.getMirror&&e.getMirror({nodeMirror:wh,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new ph;gh=new uh({recordCanvas:_,mutationCb:j,win:window,blockClass:n,blockSelector:i,mirror:wh,sampling:w.canvas,dataURLOptions:b});const Y=new Kl({mutationCb:B,scrollCb:Z,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:L,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:_,inlineImages:O,sampling:w,slimDOMOptions:z,iframeManager:V,stylesheetManager:W,canvasManager:gh,keepIframeSrcFn:M,processedNodeManager:G},mirror:wh});mh=(e=!1)=>{if(!S)return;fh({type:wl.Meta,data:{href:window.location.href,width:il(),height:nl()}},e),W.reset(),Y.init(),Ll.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new A,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:u,maskInputFn:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return ne(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:u,maskInputFn:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:h,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:wh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:z,dataURLOptions:b,recordCanvas:_,inlineImages:O,onSerialize:e=>{ul(e,wh)&&V.addIframe(e),dl(e,wh)&&W.trackLinkElement(e),pl(e)&&Y.addShadowRoot(Xa.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!t)return console.warn("Failed to snapshot the document");fh({type:wl.FullSnapshot,data:{node:t,initialOffset:sl(window)}},e),Ll.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,wh.getId(document))};try{const e=[],t=e=>{var t;return Dl(Gl)({mutationCb:B,mousemoveCb:(e,t)=>fh({type:wl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.MouseInteraction,...e}}),scrollCb:Z,viewportResizeCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.ViewportResize,...e}}),inputCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.Input,...e}}),mediaInteractionCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.MediaInteraction,...e}}),styleSheetRuleCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.StyleSheetRule,...e}}),styleDeclarationCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.StyleDeclaration,...e}}),canvasMutationCb:j,fontCb:e=>fh({type:wl.IncrementalSnapshot,data:{source:bl.Font,...e}}),selectionCb:e=>{fh({type:wl.IncrementalSnapshot,data:{source:bl.Selection,...e}})},customElementCb:e=>{fh({type:wl.IncrementalSnapshot,data:{source:bl.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:h,maskInputOptions:L,inlineStylesheet:c,sampling:w,recordDOM:S,recordCanvas:_,inlineImages:O,userTriggeredOnInput:x,collectFonts:I,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:M,blockSelector:i,slimDOMOptions:z,dataURLOptions:b,mirror:wh,iframeManager:V,stylesheetManager:W,shadowDomManager:Y,processedNodeManager:G,canvasManager:gh,ignoreCSSAttributes:E,plugins:(null==(t=null==R?void 0:R.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>fh({type:wl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};V.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{mh(),e.push(t(document)),yh=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Ka("DOMContentLoaded",()=>{fh({type:wl.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&r()})),e.push(Ka("load",()=>{fh({type:wl.Load,data:{}}),"load"===k&&r()},window))),()=>{e.forEach(e=>e()),G.destroy(),yh=!1,Nl=void 0}}catch(e){console.warn(e)}}var vh,Sh;bh.addCustomEvent=(e,t)=>{if(!yh)throw new Error("please add custom event after start recording");fh({type:wl.Custom,data:{tag:e,payload:t}})},bh.freezePage=()=>{Ll.forEach(e=>e.freeze())},bh.takeFullSnapshot=e=>{if(!yh)throw new Error("please take full snapshot after start recording");mh(e)},bh.mirror=wh,(Sh=vh||(vh={}))[Sh.NotStarted=0]="NotStarted",Sh[Sh.Running=1]="Running",Sh[Sh.Stopped=2]="Stopped";function _h(e){let t=e.length;for(;--t>=0;)e[t]=0}const Ch=256,kh=286,xh=30,Ih=15,Oh=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Ah=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Rh=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Mh=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eh=new Array(576);_h(Eh);const Th=new Array(60);_h(Th);const Nh=new Array(512);_h(Nh);const Dh=new Array(256);_h(Dh);const Lh=new Array(29);_h(Lh);const zh=new Array(xh);function Fh(e,t,r,s,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=s,this.max_length=n,this.has_stree=e&&e.length}let Ph,Uh,Bh;function Zh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}_h(zh);const jh=e=>e<256?Nh[e]:Nh[256+(e>>>7)],Wh=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Vh=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,Wh(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},Gh=(e,t,r)=>{Vh(e,r[2*t],r[2*t+1])},Yh=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},Hh=(e,t,r)=>{const s=new Array(16);let n,i,o=0;for(n=1;n<=Ih;n++)o=o+r[n-1]<<1,s[n]=o;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=Yh(s[t]++,t))}},Jh=e=>{let t;for(t=0;t<kh;t++)e.dyn_ltree[2*t]=0;for(t=0;t<xh;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Xh=e=>{e.bi_valid>8?Wh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Kh=(e,t,r,s)=>{const n=2*t,i=2*r;return e[n]<e[i]||e[n]===e[i]&&s[t]<=s[r]},$h=(e,t,r)=>{const s=e.heap[r];let n=r<<1;for(;n<=e.heap_len&&(n<e.heap_len&&Kh(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Kh(t,s,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=s},Qh=(e,t,r)=>{let s,n,i,o,a=0;if(0!==e.sym_next)do{s=255&e.pending_buf[e.sym_buf+a++],s+=(255&e.pending_buf[e.sym_buf+a++])<<8,n=e.pending_buf[e.sym_buf+a++],0===s?Gh(e,n,t):(i=Dh[n],Gh(e,i+Ch+1,t),o=Oh[i],0!==o&&(n-=Lh[i],Vh(e,n,o)),s--,i=jh(s),Gh(e,i,r),o=Ah[i],0!==o&&(s-=zh[i],Vh(e,s,o)))}while(a<e.sym_next);Gh(e,256,t)},qh=(e,t)=>{const r=t.dyn_tree,s=t.stat_desc.static_tree,n=t.stat_desc.has_stree,i=t.stat_desc.elems;let o,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<i;o++)0!==r[2*o]?(e.heap[++e.heap_len]=h=o,e.depth[o]=0):r[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=h<2?++h:0,r[2*l]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=s[2*l+1]);for(t.max_code=h,o=e.heap_len>>1;o>=1;o--)$h(e,r,o);l=i;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$h(e,r,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,r[2*l]=r[2*o]+r[2*a],e.depth[l]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,r[2*o+1]=r[2*a+1]=l,e.heap[1]=l++,$h(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,s=t.max_code,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,u,d,p,f,m=0;for(d=0;d<=Ih;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],d=r[2*r[2*c+1]+1]+1,d>l&&(d=l,m++),r[2*c+1]=d,c>s||(e.bl_count[d]++,p=0,c>=a&&(p=o[c-a]),f=r[2*c],e.opt_len+=f*(d+p),i&&(e.static_len+=f*(n[2*c+1]+p)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(c=e.bl_count[d];0!==c;)u=e.heap[--h],u>s||(r[2*u+1]!==d&&(e.opt_len+=(d-r[2*u+1])*r[2*u],r[2*u+1]=d),c--)}})(e,t),Hh(r,h,e.bl_count)},ec=(e,t,r)=>{let s,n,i=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,s=0;s<=r;s++)n=o,o=t[2*(s+1)+1],++a<l&&n===o||(a<h?e.bl_tree[2*n]+=a:0!==n?(n!==i&&e.bl_tree[2*n]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,i=n,0===o?(l=138,h=3):n===o?(l=6,h=3):(l=7,h=4))},tc=(e,t,r)=>{let s,n,i=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),s=0;s<=r;s++)if(n=o,o=t[2*(s+1)+1],!(++a<l&&n===o)){if(a<h)do{Gh(e,n,e.bl_tree)}while(0!==--a);else 0!==n?(n!==i&&(Gh(e,n,e.bl_tree),a--),Gh(e,16,e.bl_tree),Vh(e,a-3,2)):a<=10?(Gh(e,17,e.bl_tree),Vh(e,a-3,3)):(Gh(e,18,e.bl_tree),Vh(e,a-11,7));a=0,i=n,0===o?(l=138,h=3):n===o?(l=6,h=3):(l=7,h=4)}};let rc=!1;const sc=(e,t,r,s)=>{Vh(e,0+(s?1:0),3),Xh(e),Wh(e,r),Wh(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var nc=e=>{rc||((()=>{let e,t,r,s,n;const i=new Array(16);for(r=0,s=0;s<28;s++)for(Lh[s]=r,e=0;e<1<<Oh[s];e++)Dh[r++]=s;for(Dh[r-1]=s,n=0,s=0;s<16;s++)for(zh[s]=n,e=0;e<1<<Ah[s];e++)Nh[n++]=s;for(n>>=7;s<xh;s++)for(zh[s]=n<<7,e=0;e<1<<Ah[s]-7;e++)Nh[256+n++]=s;for(t=0;t<=Ih;t++)i[t]=0;for(e=0;e<=143;)Eh[2*e+1]=8,e++,i[8]++;for(;e<=255;)Eh[2*e+1]=9,e++,i[9]++;for(;e<=279;)Eh[2*e+1]=7,e++,i[7]++;for(;e<=287;)Eh[2*e+1]=8,e++,i[8]++;for(Hh(Eh,287,i),e=0;e<xh;e++)Th[2*e+1]=5,Th[2*e]=Yh(e,5);Ph=new Fh(Eh,Oh,257,kh,Ih),Uh=new Fh(Th,Ah,0,xh,Ih),Bh=new Fh(new Array(0),Rh,0,19,7)})(),rc=!0),e.l_desc=new Zh(e.dyn_ltree,Ph),e.d_desc=new Zh(e.dyn_dtree,Uh),e.bl_desc=new Zh(e.bl_tree,Bh),e.bi_buf=0,e.bi_valid=0,Jh(e)},ic=(e,t,r,s)=>{let n,i,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<Ch;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),qh(e,e.l_desc),qh(e,e.d_desc),o=(e=>{let t;for(ec(e,e.dyn_ltree,e.l_desc.max_code),ec(e,e.dyn_dtree,e.d_desc.max_code),qh(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Mh[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),n=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=n&&(n=i)):n=i=r+5,r+4<=n&&-1!==t?sc(e,t,r,s):4===e.strategy||i===n?(Vh(e,2+(s?1:0),3),Qh(e,Eh,Th)):(Vh(e,4+(s?1:0),3),((e,t,r,s)=>{let n;for(Vh(e,t-257,5),Vh(e,r-1,5),Vh(e,s-4,4),n=0;n<s;n++)Vh(e,e.bl_tree[2*Mh[n]+1],3);tc(e,e.dyn_ltree,t-1),tc(e,e.dyn_dtree,r-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Qh(e,e.dyn_ltree,e.dyn_dtree)),Jh(e),s&&Xh(e)},oc={_tr_init:nc,_tr_stored_block:sc,_tr_flush_block:ic,_tr_tally:(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Dh[r]+Ch+1)]++,e.dyn_dtree[2*jh(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Vh(e,2,3),Gh(e,256,Eh),(e=>{16===e.bi_valid?(Wh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var ac=(e,t,r,s)=>{let n=65535&e,i=e>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{n=n+t[s++]|0,i=i+n|0}while(--o);n%=65521,i%=65521}return n|i<<16};const lc=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var hc=(e,t,r,s)=>{const n=lc,i=s+r;e^=-1;for(let r=s;r<i;r++)e=e>>>8^n[255&(e^t[r])];return-1^e},cc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},uc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:dc,_tr_stored_block:pc,_tr_flush_block:fc,_tr_tally:mc,_tr_align:gc}=oc,{Z_NO_FLUSH:yc,Z_PARTIAL_FLUSH:wc,Z_FULL_FLUSH:bc,Z_FINISH:vc,Z_BLOCK:Sc,Z_OK:_c,Z_STREAM_END:Cc,Z_STREAM_ERROR:kc,Z_DATA_ERROR:xc,Z_BUF_ERROR:Ic,Z_DEFAULT_COMPRESSION:Oc,Z_FILTERED:Ac,Z_HUFFMAN_ONLY:Rc,Z_RLE:Mc,Z_FIXED:Ec,Z_DEFAULT_STRATEGY:Tc,Z_UNKNOWN:Nc,Z_DEFLATED:Dc}=uc,Lc=258,zc=262,Fc=42,Pc=113,Uc=666,Bc=(e,t)=>(e.msg=cc[t],t),Zc=e=>2*e-(e>4?9:0),jc=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Wc=e=>{let t,r,s,n=e.w_size;t=e.hash_size,s=t;do{r=e.head[--s],e.head[s]=r>=n?r-n:0}while(--t);t=n,s=t;do{r=e.prev[--s],e.prev[s]=r>=n?r-n:0}while(--t)};let Vc=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const Gc=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},Yc=(e,t)=>{fc(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Gc(e.strm)},Hc=(e,t)=>{e.pending_buf[e.pending++]=t},Jc=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Xc=(e,t,r,s)=>{let n=e.avail_in;return n>s&&(n=s),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),r),1===e.state.wrap?e.adler=ac(e.adler,t,n,r):2===e.state.wrap&&(e.adler=hc(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)},Kc=(e,t)=>{let r,s,n=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-zc?e.strstart-(e.w_size-zc):0,h=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Lc;let p=h[i+o-1],f=h[i+o];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,h[r+o]===f&&h[r+o-1]===p&&h[r]===h[i]&&h[++r]===h[i+1]){i+=2,r++;do{}while(h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&i<d);if(s=Lc-(d-i),i=d-Lc,s>o){if(e.match_start=t,o=s,s>=a)break;p=h[i+o-1],f=h[i+o]}}}while((t=u[t&c])>l&&0!==--n);return o<=e.lookahead?o:e.lookahead},$c=e=>{const t=e.w_size;let r,s,n;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-zc)&&(e.window.set(e.window.subarray(t,t+t-s),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Wc(e),s+=t),0===e.strm.avail_in)break;if(r=Xc(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=3)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=Vc(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=Vc(e,e.ins_h,e.window[n+3-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<zc&&0!==e.strm.avail_in)},Qc=(e,t)=>{let r,s,n,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(r=65535,n=e.bi_valid+42>>3,e.strm.avail_out<n)break;if(n=e.strm.avail_out-n,s=e.strstart-e.block_start,r>s+e.strm.avail_in&&(r=s+e.strm.avail_in),r>n&&(r=n),r<i&&(0===r&&t!==vc||t===yc||r!==s+e.strm.avail_in))break;o=t===vc&&r===s+e.strm.avail_in?1:0,pc(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Gc(e.strm),s&&(s>r&&(s=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+s),e.strm.next_out),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s,e.block_start+=s,r-=s),r&&(Xc(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==yc&&t!==vc&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(n=e.window_size-e.strstart,e.strm.avail_in>n&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,n+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),n>e.strm.avail_in&&(n=e.strm.avail_in),n&&(Xc(e.strm,e.window,e.strstart,n),e.strstart+=n,e.insert+=n>e.w_size-e.insert?e.w_size-e.insert:n),e.high_water<e.strstart&&(e.high_water=e.strstart),n=e.bi_valid+42>>3,n=e.pending_buf_size-n>65535?65535:e.pending_buf_size-n,i=n>e.w_size?e.w_size:n,s=e.strstart-e.block_start,(s>=i||(s||t===vc)&&t!==yc&&0===e.strm.avail_in&&s<=n)&&(r=s>n?n:s,o=t===vc&&0===e.strm.avail_in&&r===s?1:0,pc(e,e.block_start,r,o),e.block_start+=r,Gc(e.strm)),o?3:1)},qc=(e,t)=>{let r,s;for(;;){if(e.lookahead<zc){if($c(e),e.lookahead<zc&&t===yc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Vc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-zc&&(e.match_length=Kc(e,r)),e.match_length>=3)if(s=mc(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Vc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Vc(e,e.ins_h,e.window[e.strstart+1]);else s=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(s&&(Yc(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===vc?(Yc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Yc(e,!1),0===e.strm.avail_out)?1:2},eu=(e,t)=>{let r,s,n;for(;;){if(e.lookahead<zc){if($c(e),e.lookahead<zc&&t===yc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Vc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-zc&&(e.match_length=Kc(e,r),e.match_length<=5&&(e.strategy===Ac||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,s=mc(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=Vc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,s&&(Yc(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(s=mc(e,0,e.window[e.strstart-1]),s&&Yc(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(s=mc(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===vc?(Yc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Yc(e,!1),0===e.strm.avail_out)?1:2};function tu(e,t,r,s,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=s,this.func=n}const ru=[new tu(0,0,0,0,Qc),new tu(4,4,8,4,qc),new tu(4,5,16,8,qc),new tu(4,6,32,32,qc),new tu(4,4,16,16,eu),new tu(8,16,32,32,eu),new tu(8,16,128,128,eu),new tu(8,32,128,256,eu),new tu(32,128,258,1024,eu),new tu(32,258,258,4096,eu)];function su(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Dc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),jc(this.dyn_ltree),jc(this.dyn_dtree),jc(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),jc(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),jc(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const nu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Fc&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Pc&&t.status!==Uc?1:0},iu=e=>{if(nu(e))return Bc(e,kc);e.total_in=e.total_out=0,e.data_type=Nc;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Fc:Pc,e.adler=2===t.wrap?0:1,t.last_flush=-2,dc(t),_c},ou=e=>{const t=iu(e);var r;return t===_c&&((r=e.state).window_size=2*r.w_size,jc(r.head),r.max_lazy_match=ru[r.level].max_lazy,r.good_match=ru[r.level].good_length,r.nice_match=ru[r.level].nice_length,r.max_chain_length=ru[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},au=(e,t,r,s,n,i)=>{if(!e)return kc;let o=1;if(t===Oc&&(t=6),s<0?(o=0,s=-s):s>15&&(o=2,s-=16),n<1||n>9||r!==Dc||s<8||s>15||t<0||t>9||i<0||i>Ec||8===s&&1!==o)return Bc(e,kc);8===s&&(s=9);const a=new su;return e.state=a,a.strm=e,a.status=Fc,a.wrap=o,a.gzhead=null,a.w_bits=s,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=i,a.method=r,ou(e)};var lu=(e,t)=>{let r=t.length;if(nu(e))return kc;const s=e.state,n=s.wrap;if(2===n||1===n&&s.status!==Fc||s.lookahead)return kc;if(1===n&&(e.adler=ac(e.adler,t,r,0)),s.wrap=0,r>=s.w_size){0===n&&(jc(s.head),s.strstart=0,s.block_start=0,s.insert=0);let e=new Uint8Array(s.w_size);e.set(t.subarray(r-s.w_size,r),0),t=e,r=s.w_size}const i=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,$c(s);s.lookahead>=3;){let e=s.strstart,t=s.lookahead-2;do{s.ins_h=Vc(s,s.ins_h,s.window[e+3-1]),s.prev[e&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=e,e++}while(--t);s.strstart=e,s.lookahead=2,$c(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=2,s.match_available=0,e.next_in=o,e.input=a,e.avail_in=i,s.wrap=n,_c},hu={deflateInit:(e,t)=>au(e,t,Dc,15,8,Tc),deflateInit2:au,deflateReset:ou,deflateResetKeep:iu,deflateSetHeader:(e,t)=>nu(e)||2!==e.state.wrap?kc:(e.state.gzhead=t,_c),deflate:(e,t)=>{if(nu(e)||t>Sc||t<0)return e?Bc(e,kc):kc;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Uc&&t!==vc)return Bc(e,0===e.avail_out?Ic:kc);const s=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Gc(e),0===e.avail_out)return r.last_flush=-1,_c}else if(0===e.avail_in&&Zc(t)<=Zc(s)&&t!==vc)return Bc(e,Ic);if(r.status===Uc&&0!==e.avail_in)return Bc(e,Ic);if(r.status===Fc&&0===r.wrap&&(r.status=Pc),r.status===Fc){let t=Dc+(r.w_bits-8<<4)<<8,s=-1;if(s=r.strategy>=Rc||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=s<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Jc(r,t),0!==r.strstart&&(Jc(r,e.adler>>>16),Jc(r,65535&e.adler)),e.adler=1,r.status=Pc,Gc(e),0!==r.pending)return r.last_flush=-1,_c}if(57===r.status)if(e.adler=0,Hc(r,31),Hc(r,139),Hc(r,8),r.gzhead)Hc(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Hc(r,255&r.gzhead.time),Hc(r,r.gzhead.time>>8&255),Hc(r,r.gzhead.time>>16&255),Hc(r,r.gzhead.time>>24&255),Hc(r,9===r.level?2:r.strategy>=Rc||r.level<2?4:0),Hc(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Hc(r,255&r.gzhead.extra.length),Hc(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=hc(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Hc(r,0),Hc(r,0),Hc(r,0),Hc(r,0),Hc(r,0),Hc(r,9===r.level?2:r.strategy>=Rc||r.level<2?4:0),Hc(r,3),r.status=Pc,Gc(e),0!==r.pending)return r.last_flush=-1,_c;if(69===r.status){if(r.gzhead.extra){let t=r.pending,s=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+s>r.pending_buf_size;){let n=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=hc(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=n,Gc(e),0!==r.pending)return r.last_flush=-1,_c;t=0,s-=n}let n=new Uint8Array(r.gzhead.extra);r.pending_buf.set(n.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending+=s,r.gzhead.hcrc&&r.pending>t&&(e.adler=hc(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,s=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>s&&(e.adler=hc(e.adler,r.pending_buf,r.pending-s,s)),Gc(e),0!==r.pending)return r.last_flush=-1,_c;s=0}t=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Hc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>s&&(e.adler=hc(e.adler,r.pending_buf,r.pending-s,s)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,s=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>s&&(e.adler=hc(e.adler,r.pending_buf,r.pending-s,s)),Gc(e),0!==r.pending)return r.last_flush=-1,_c;s=0}t=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Hc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>s&&(e.adler=hc(e.adler,r.pending_buf,r.pending-s,s))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Gc(e),0!==r.pending))return r.last_flush=-1,_c;Hc(r,255&e.adler),Hc(r,e.adler>>8&255),e.adler=0}if(r.status=Pc,Gc(e),0!==r.pending)return r.last_flush=-1,_c}if(0!==e.avail_in||0!==r.lookahead||t!==yc&&r.status!==Uc){let s=0===r.level?Qc(r,t):r.strategy===Rc?((e,t)=>{let r;for(;;){if(0===e.lookahead&&($c(e),0===e.lookahead)){if(t===yc)return 1;break}if(e.match_length=0,r=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Yc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===vc?(Yc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Yc(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===Mc?((e,t)=>{let r,s,n,i;const o=e.window;for(;;){if(e.lookahead<=Lc){if($c(e),e.lookahead<=Lc&&t===yc)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=e.strstart-1,s=o[n],s===o[++n]&&s===o[++n]&&s===o[++n])){i=e.strstart+Lc;do{}while(s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&n<i);e.match_length=Lc-(i-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=mc(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Yc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===vc?(Yc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Yc(e,!1),0===e.strm.avail_out)?1:2})(r,t):ru[r.level].func(r,t);if(3!==s&&4!==s||(r.status=Uc),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),_c;if(2===s&&(t===wc?gc(r):t!==Sc&&(pc(r,0,0,!1),t===bc&&(jc(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Gc(e),0===e.avail_out))return r.last_flush=-1,_c}return t!==vc?_c:r.wrap<=0?Cc:(2===r.wrap?(Hc(r,255&e.adler),Hc(r,e.adler>>8&255),Hc(r,e.adler>>16&255),Hc(r,e.adler>>24&255),Hc(r,255&e.total_in),Hc(r,e.total_in>>8&255),Hc(r,e.total_in>>16&255),Hc(r,e.total_in>>24&255)):(Jc(r,e.adler>>>16),Jc(r,65535&e.adler)),Gc(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?_c:Cc)},deflateEnd:e=>{if(nu(e))return kc;const t=e.state.status;return e.state=null,t===Pc?Bc(e,xc):_c},deflateSetDictionary:lu,deflateInfo:"pako deflate (from Nodeca project)"};const cu=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var uu=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)cu(r,t)&&(e[t]=r[t])}}return e},du=e=>{let t=0;for(let r=0,s=e.length;r<s;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,s=0,n=e.length;t<n;t++){let n=e[t];r.set(n,s),s+=n.length}return r};let pu=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){pu=!1}const fu=new Uint8Array(256);for(let e=0;e<256;e++)fu[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;fu[254]=fu[254]=1;var mu=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,s,n,i,o=e.length,a=0;for(n=0;n<o;n++)r=e.charCodeAt(n),55296==(64512&r)&&n+1<o&&(s=e.charCodeAt(n+1),56320==(64512&s)&&(r=65536+(r-55296<<10)+(s-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(a),i=0,n=0;i<a;n++)r=e.charCodeAt(n),55296==(64512&r)&&n+1<o&&(s=e.charCodeAt(n+1),56320==(64512&s)&&(r=65536+(r-55296<<10)+(s-56320),n++)),r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},gu=(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let s,n;const i=new Array(2*r);for(n=0,s=0;s<r;){let t=e[s++];if(t<128){i[n++]=t;continue}let o=fu[t];if(o>4)i[n++]=65533,s+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&s<r;)t=t<<6|63&e[s++],o--;o>1?i[n++]=65533:t<65536?i[n++]=t:(t-=65536,i[n++]=55296|t>>10&1023,i[n++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&pu)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r})(i,n)},yu=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+fu[e[r]]>t?r:t};var wu=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const bu=Object.prototype.toString,{Z_NO_FLUSH:vu,Z_SYNC_FLUSH:Su,Z_FULL_FLUSH:_u,Z_FINISH:Cu,Z_OK:ku,Z_STREAM_END:xu,Z_DEFAULT_COMPRESSION:Iu,Z_DEFAULT_STRATEGY:Ou,Z_DEFLATED:Au}=uc;function Ru(e){this.options=uu({level:Iu,method:Au,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ou},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new wu,this.strm.avail_out=0;let r=hu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ku)throw new Error(cc[r]);if(t.header&&hu.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?mu(t.dictionary):"[object ArrayBuffer]"===bu.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=hu.deflateSetDictionary(this.strm,e),r!==ku)throw new Error(cc[r]);this._dict_set=!0}}function Mu(e,t){const r=new Ru(t);if(r.push(e,!0),r.err)throw r.msg||cc[r.err];return r.result}Ru.prototype.push=function(e,t){const r=this.strm,s=this.options.chunkSize;let n,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Cu:vu,"string"==typeof e?r.input=mu(e):"[object ArrayBuffer]"===bu.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(i===Su||i===_u)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(n=hu.deflate(r,i),n===xu)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=hu.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ku;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Ru.prototype.onData=function(e){this.chunks.push(e)},Ru.prototype.onEnd=function(e){e===ku&&(this.result=du(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Eu=function(e,t){return(t=t||{}).raw=!0,Mu(e,t)},Tu=function(e,t){return(t=t||{}).gzip=!0,Mu(e,t)},Nu={Deflate:Ru,deflate:Mu,deflateRaw:Eu,gzip:Tu};const Du=16209;var Lu=function(e,t){let r,s,n,i,o,a,l,h,c,u,d,p,f,m,g,y,w,b,v,S,_,C,k,x;const I=e.state;r=e.next_in,k=e.input,s=r+(e.avail_in-5),n=e.next_out,x=e.output,i=n-(t-e.avail_out),o=n+(e.avail_out-257),a=I.dmax,l=I.wsize,h=I.whave,c=I.wnext,u=I.window,d=I.hold,p=I.bits,f=I.lencode,m=I.distcode,g=(1<<I.lenbits)-1,y=(1<<I.distbits)-1;e:do{p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),w=f[d&g];t:for(;;){if(b=w>>>24,d>>>=b,p-=b,b=w>>>16&255,0===b)x[n++]=65535&w;else{if(!(16&b)){if(64&b){if(32&b){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=Du;break e}w=f[(65535&w)+(d&(1<<b)-1)];continue t}for(v=65535&w,b&=15,b&&(p<b&&(d+=k[r++]<<p,p+=8),v+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),w=m[d&y];;){if(b=w>>>24,d>>>=b,p-=b,b=w>>>16&255,16&b){if(S=65535&w,b&=15,p<b&&(d+=k[r++]<<p,p+=8,p<b&&(d+=k[r++]<<p,p+=8)),S+=d&(1<<b)-1,S>a){e.msg="invalid distance too far back",I.mode=Du;break e}if(d>>>=b,p-=b,b=n-i,S>b){if(b=S-b,b>h&&I.sane){e.msg="invalid distance too far back",I.mode=Du;break e}if(_=0,C=u,0===c){if(_+=l-b,b<v){v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}}else if(c<b){if(_+=l+c-b,b-=c,b<v){v-=b;do{x[n++]=u[_++]}while(--b);if(_=0,c<v){b=c,v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}}}else if(_+=c-b,b<v){v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}for(;v>2;)x[n++]=C[_++],x[n++]=C[_++],x[n++]=C[_++],v-=3;v&&(x[n++]=C[_++],v>1&&(x[n++]=C[_++]))}else{_=n-S;do{x[n++]=x[_++],x[n++]=x[_++],x[n++]=x[_++],v-=3}while(v>2);v&&(x[n++]=x[_++],v>1&&(x[n++]=x[_++]))}break}if(64&b){e.msg="invalid distance code",I.mode=Du;break e}w=m[(65535&w)+(d&(1<<b)-1)]}}break}}while(r<s&&n<o);v=p>>3,r-=v,p-=v<<3,d&=(1<<p)-1,e.next_in=r,e.next_out=n,e.avail_in=r<s?s-r+5:5-(r-s),e.avail_out=n<o?o-n+257:257-(n-o),I.hold=d,I.bits=p};const zu=15,Fu=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Pu=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Uu=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Bu=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Zu=(e,t,r,s,n,i,o,a)=>{const l=a.bits;let h,c,u,d,p,f,m=0,g=0,y=0,w=0,b=0,v=0,S=0,_=0,C=0,k=0,x=null;const I=new Uint16Array(16),O=new Uint16Array(16);let A,R,M,E=null;for(m=0;m<=zu;m++)I[m]=0;for(g=0;g<s;g++)I[t[r+g]]++;for(b=l,w=zu;w>=1&&0===I[w];w--);if(b>w&&(b=w),0===w)return n[i++]=20971520,n[i++]=20971520,a.bits=1,0;for(y=1;y<w&&0===I[y];y++);for(b<y&&(b=y),_=1,m=1;m<=zu;m++)if(_<<=1,_-=I[m],_<0)return-1;if(_>0&&(0===e||1!==w))return-1;for(O[1]=0,m=1;m<zu;m++)O[m+1]=O[m]+I[m];for(g=0;g<s;g++)0!==t[r+g]&&(o[O[t[r+g]]++]=g);if(0===e?(x=E=o,f=20):1===e?(x=Fu,E=Pu,f=257):(x=Uu,E=Bu,f=0),k=0,g=0,m=y,p=i,v=b,S=0,u=-1,C=1<<b,d=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){A=m-S,o[g]+1<f?(R=0,M=o[g]):o[g]>=f?(R=E[o[g]-f],M=x[o[g]-f]):(R=96,M=0),h=1<<m-S,c=1<<v,y=c;do{c-=h,n[p+(k>>S)+c]=A<<24|R<<16|M}while(0!==c);for(h=1<<m-1;k&h;)h>>=1;if(0!==h?(k&=h-1,k+=h):k=0,g++,0===--I[m]){if(m===w)break;m=t[r+o[g]]}if(m>b&&(k&d)!==u){for(0===S&&(S=b),p+=y,v=m-S,_=1<<v;v+S<w&&(_-=I[v+S],!(_<=0));)v++,_<<=1;if(C+=1<<v,1===e&&C>852||2===e&&C>592)return 1;u=k&d,n[u]=b<<24|v<<16|p-i}}return 0!==k&&(n[p+k]=m-S<<24|64<<16),a.bits=b,0};const{Z_FINISH:ju,Z_BLOCK:Wu,Z_TREES:Vu,Z_OK:Gu,Z_STREAM_END:Yu,Z_NEED_DICT:Hu,Z_STREAM_ERROR:Ju,Z_DATA_ERROR:Xu,Z_MEM_ERROR:Ku,Z_BUF_ERROR:$u,Z_DEFLATED:Qu}=uc,qu=16180,ed=16190,td=16191,rd=16192,sd=16194,nd=16199,id=16200,od=16206,ad=16209,ld=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function hd(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const cd=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<qu||t.mode>16211?1:0},ud=e=>{if(cd(e))return Ju;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=qu,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Gu},dd=e=>{if(cd(e))return Ju;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ud(e)},pd=(e,t)=>{let r;if(cd(e))return Ju;const s=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ju:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=r,s.wbits=t,dd(e))},fd=(e,t)=>{if(!e)return Ju;const r=new hd;e.state=r,r.strm=e,r.window=null,r.mode=qu;const s=pd(e,t);return s!==Gu&&(e.state=null),s};let md,gd,yd=!0;const wd=e=>{if(yd){md=new Int32Array(512),gd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Zu(1,e.lens,0,288,md,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zu(2,e.lens,0,32,gd,0,e.work,{bits:5}),yd=!1}e.lencode=md,e.lenbits=9,e.distcode=gd,e.distbits=5},bd=(e,t,r,s)=>{let n;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),s>=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>s&&(n=s),i.window.set(t.subarray(r-s,r-s+n),i.wnext),(s-=n)?(i.window.set(t.subarray(r-s,r),0),i.wnext=s,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=n))),0};var vd=(e,t)=>{let r,s,n,i,o,a,l,h,c,u,d,p,f,m,g,y,w,b,v,S,_,C,k=0;const x=new Uint8Array(4);let I,O;const A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(cd(e)||!e.output||!e.input&&0!==e.avail_in)return Ju;r=e.state,r.mode===td&&(r.mode=rd),o=e.next_out,n=e.output,l=e.avail_out,i=e.next_in,s=e.input,a=e.avail_in,h=r.hold,c=r.bits,u=a,d=l,C=Gu;e:for(;;)switch(r.mode){case qu:if(0===r.wrap){r.mode=rd;break}for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(2&r.wrap&&35615===h){0===r.wbits&&(r.wbits=15),r.check=0,x[0]=255&h,x[1]=h>>>8&255,r.check=hc(r.check,x,2,0),h=0,c=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=ad;break}if((15&h)!==Qu){e.msg="unknown compression method",r.mode=ad;break}if(h>>>=4,c-=4,_=8+(15&h),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){e.msg="invalid window size",r.mode=ad;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&h?16189:td,h=0,c=0;break;case 16181:for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(r.flags=h,(255&r.flags)!==Qu){e.msg="unknown compression method",r.mode=ad;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=ad;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=hc(r.check,x,2,0)),h=0,c=0,r.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.head&&(r.head.time=h),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,x[2]=h>>>16&255,x[3]=h>>>24&255,r.check=hc(r.check,x,4,0)),h=0,c=0,r.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=hc(r.check,x,2,0)),h=0,c=0,r.mode=16184;case 16184:if(1024&r.flags){for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=hc(r.check,x,2,0)),h=0,c=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>a&&(p=a),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(s.subarray(i,i+p),_)),512&r.flags&&4&r.wrap&&(r.check=hc(r.check,s,p,i)),a-=p,i+=p,r.length-=p),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break e;p=0;do{_=s[i+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p<a);if(512&r.flags&&4&r.wrap&&(r.check=hc(r.check,s,p,i)),a-=p,i+=p,_)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===a)break e;p=0;do{_=s[i+p++],r.head&&_&&r.length<65536&&(r.head.comment+=String.fromCharCode(_))}while(_&&p<a);if(512&r.flags&&4&r.wrap&&(r.check=hc(r.check,s,p,i)),a-=p,i+=p,_)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(4&r.wrap&&h!==(65535&r.check)){e.msg="header crc mismatch",r.mode=ad;break}h=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=td;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}e.adler=r.check=ld(h),h=0,c=0,r.mode=ed;case ed:if(0===r.havedict)return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,Hu;e.adler=r.check=1,r.mode=td;case td:if(t===Wu||t===Vu)break e;case rd:if(r.last){h>>>=7&c,c-=7&c,r.mode=od;break}for(;c<3;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}switch(r.last=1&h,h>>>=1,c-=1,3&h){case 0:r.mode=16193;break;case 1:if(wd(r),r.mode=nd,t===Vu){h>>>=2,c-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=ad}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",r.mode=ad;break}if(r.length=65535&h,h=0,c=0,r.mode=sd,t===Vu)break e;case sd:r.mode=16195;case 16195:if(p=r.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;n.set(s.subarray(i,i+p),o),a-=p,i+=p,l-=p,o+=p,r.length-=p;break}r.mode=td;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(r.nlen=257+(31&h),h>>>=5,c-=5,r.ndist=1+(31&h),h>>>=5,c-=5,r.ncode=4+(15&h),h>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ad;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;c<3;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.lens[A[r.have++]]=7&h,h>>>=3,c-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},C=Zu(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,C){e.msg="invalid code lengths set",r.mode=ad;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;k=r.lencode[h&(1<<r.lenbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(w<16)h>>>=g,c-=g,r.lens[r.have++]=w;else{if(16===w){for(O=g+2;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(h>>>=g,c-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=ad;break}_=r.lens[r.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===w){for(O=g+3;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=g,c-=g,_=0,p=3+(7&h),h>>>=3,c-=3}else{for(O=g+7;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=g,c-=g,_=0,p=11+(127&h),h>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ad;break}for(;p--;)r.lens[r.have++]=_}}if(r.mode===ad)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=ad;break}if(r.lenbits=9,I={bits:r.lenbits},C=Zu(1,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,C){e.msg="invalid literal/lengths set",r.mode=ad;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},C=Zu(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,C){e.msg="invalid distances set",r.mode=ad;break}if(r.mode=nd,t===Vu)break e;case nd:r.mode=id;case id:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,Lu(e,d),o=e.next_out,n=e.output,l=e.avail_out,i=e.next_in,s=e.input,a=e.avail_in,h=r.hold,c=r.bits,r.mode===td&&(r.back=-1);break}for(r.back=0;k=r.lencode[h&(1<<r.lenbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(y&&!(240&y)){for(b=g,v=y,S=w;k=r.lencode[S+((h&(1<<b+v)-1)>>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=b,c-=b,r.back+=b}if(h>>>=g,c-=g,r.back+=g,r.length=w,0===y){r.mode=16205;break}if(32&y){r.back=-1,r.mode=td;break}if(64&y){e.msg="invalid literal/length code",r.mode=ad;break}r.extra=15&y,r.mode=16201;case 16201:if(r.extra){for(O=r.extra;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;k=r.distcode[h&(1<<r.distbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(!(240&y)){for(b=g,v=y,S=w;k=r.distcode[S+((h&(1<<b+v)-1)>>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=b,c-=b,r.back+=b}if(h>>>=g,c-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=ad;break}r.offset=w,r.extra=15&y,r.mode=16203;case 16203:if(r.extra){for(O=r.extra;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ad;break}r.mode=16204;case 16204:if(0===l)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ad;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=n,f=o-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{n[o++]=m[f++]}while(--p);0===r.length&&(r.mode=id);break;case 16205:if(0===l)break e;n[o++]=r.length,l--,r.mode=id;break;case od:if(r.wrap){for(;c<32;){if(0===a)break e;a--,h|=s[i++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?hc(r.check,n,d,o-d):ac(r.check,n,d,o-d)),d=l,4&r.wrap&&(r.flags?h:ld(h))!==r.check){e.msg="incorrect data check",r.mode=ad;break}h=0,c=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(4&r.wrap&&h!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=ad;break}h=0,c=0}r.mode=16208;case 16208:C=Yu;break e;case ad:C=Xu;break e;case 16210:return Ku;default:return Ju}return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<ad&&(r.mode<od||t!==ju))&&bd(e,e.output,e.next_out,d-e.avail_out),u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?hc(r.check,n,d,e.next_out-d):ac(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===td?128:0)+(r.mode===nd||r.mode===sd?256:0),(0===u&&0===d||t===ju)&&C===Gu&&(C=$u),C},Sd={inflateReset:dd,inflateReset2:pd,inflateResetKeep:ud,inflateInit:e=>fd(e,15),inflateInit2:fd,inflate:vd,inflateEnd:e=>{if(cd(e))return Ju;let t=e.state;return t.window&&(t.window=null),e.state=null,Gu},inflateGetHeader:(e,t)=>{if(cd(e))return Ju;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,Gu):Ju},inflateSetDictionary:(e,t)=>{const r=t.length;let s,n,i;return cd(e)?Ju:(s=e.state,0!==s.wrap&&s.mode!==ed?Ju:s.mode===ed&&(n=1,n=ac(n,t,r,0),n!==s.check)?Xu:(i=bd(e,t,r,r),i?(s.mode=16210,Ku):(s.havedict=1,Gu)))},inflateInfo:"pako inflate (from Nodeca project)"};var _d=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Cd=Object.prototype.toString,{Z_NO_FLUSH:kd,Z_FINISH:xd,Z_OK:Id,Z_STREAM_END:Od,Z_NEED_DICT:Ad,Z_STREAM_ERROR:Rd,Z_DATA_ERROR:Md,Z_MEM_ERROR:Ed}=uc;function Td(e){this.options=uu({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new wu,this.strm.avail_out=0;let r=Sd.inflateInit2(this.strm,t.windowBits);if(r!==Id)throw new Error(cc[r]);if(this.header=new _d,Sd.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=mu(t.dictionary):"[object ArrayBuffer]"===Cd.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Sd.inflateSetDictionary(this.strm,t.dictionary),r!==Id)))throw new Error(cc[r])}function Nd(e,t){const r=new Td(t);if(r.push(e),r.err)throw r.msg||cc[r.err];return r.result}Td.prototype.push=function(e,t){const r=this.strm,s=this.options.chunkSize,n=this.options.dictionary;let i,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?xd:kd,"[object ArrayBuffer]"===Cd.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),i=Sd.inflate(r,o),i===Ad&&n&&(i=Sd.inflateSetDictionary(r,n),i===Id?i=Sd.inflate(r,o):i===Md&&(i=Ad));r.avail_in>0&&i===Od&&r.state.wrap>0&&0!==e[r.next_in];)Sd.inflateReset(r),i=Sd.inflate(r,o);switch(i){case Rd:case Md:case Ad:case Ed:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||i===Od))if("string"===this.options.to){let e=yu(r.output,r.next_out),t=r.next_out-e,n=gu(r.output,e);r.next_out=t,r.avail_out=s-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==Id||0!==a){if(i===Od)return i=Sd.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Td.prototype.onData=function(e){this.chunks.push(e)},Td.prototype.onEnd=function(e){e===Id&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=du(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Dd=function(e,t){return(t=t||{}).raw=!0,Nd(e,t)},Ld={Inflate:Td,inflate:Nd,inflateRaw:Dd,ungzip:Nd};const{Deflate:zd,deflate:Fd,deflateRaw:Pd,gzip:Ud}=Nu,{Inflate:Bd,inflate:Zd,inflateRaw:jd,ungzip:Wd}=Ld;var Vd={Deflate:zd,deflate:Fd,deflateRaw:Pd,gzip:Ud,Inflate:Bd,inflate:Zd,inflateRaw:jd,ungzip:Wd,constants:uc};function Gd(e){if(!e)return"";const t=JSON.stringify(e),r=Vd.gzip(t);return btoa(String.fromCharCode(...r))}var Yd=Object.defineProperty,Hd=(e,t,r)=>((e,t,r)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Jd extends r{constructor(e={durationMs:a.screenRecordDurationMs,eventTypes:a.screenRecordEventTypes}){super(t.ScreenRecord),Hd(this,"durationMs",a.screenRecordDurationMs),Hd(this,"eventTypes",a.screenRecordEventTypes);const{durationMs:r=a.screenRecordDurationMs,eventTypes:s=a.screenRecordEventTypes}=e;this.durationMs=r,this.eventTypes=s}init(){n.options.enableScreenRecord=!0,n.options.screenRecordEventTypes=this.eventTypes,n.options.screenRecordDurationMs=this.durationMs,function(r){const o=new s;bh({emit(s,a){if(a)if(n.shouldRecordScreen){const o={id:crypto.randomUUID(),name:"ScreenRecord",message:"",...i(),type:t.ScreenRecord,status:e.OK,event:Gd(s)};r.send(o),n.shouldRecordScreen=!1}else o.clear();o.push(s)},recordCanvas:!0,checkoutEveryNms:n.options.screenRecordDurationMs})}(o)}}export{Jd as default};
|
|
2
|
+
//# sourceMappingURL=index.min.js.map
|