userlens-analytics-sdk 0.1.81 → 0.1.83
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/main.cjs.js +3 -3
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.esm.js +3 -3
- package/dist/main.esm.js.map +1 -1
- package/dist/react.cjs.js +1 -1
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.esm.js +1 -1
- package/dist/react.esm.js.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/userlens.umd.js +3 -3
- package/dist/userlens.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";function e(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)}function t(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError;var r,s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),i=Object.defineProperty,o=(e,t,r)=>((e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),a=(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))(a||{});const l={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},h={};function u(e){if(h[e])return h[e];const t=globalThis[e],r=t.prototype,s=e in l?l[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 c?c[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 h[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?h[e]=i:r}catch{return r}}const p={};function d(e,t,r){var s;const n=`${e}.${String(r)}`;if(p[n])return p[n].call(t);const i=u(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(p[n]=o,o.call(t)):t[r]}const f={};function m(e,t,r){const s=`${e}.${String(r)}`;if(f[s])return f[s].bind(t);const n=u(e)[r];return"function"!=typeof n?t[r]:(f[s]=n,n.bind(t))}const g={childNodes:function(e){return d("Node",e,"childNodes")},parentNode:function(e){return d("Node",e,"parentNode")},parentElement:function(e){return d("Node",e,"parentElement")},textContent:function(e){return d("Node",e,"textContent")},contains:function(e,t){return m("Node",e,"contains")(t)},getRootNode:function(e){return m("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?d("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?d("Element",e,"shadowRoot"):null},querySelector:function(e,t){return d("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return d("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return u("MutationObserver").constructor}};function y(e){return e.nodeType===e.ELEMENT_NODE}function w(e){const t=e&&"host"in e&&"mode"in e&&g.host(e)||null;return Boolean(t&&"shadowRoot"in t&&g.shadowRoot(t)===e)}function b(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function v(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=>S(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 S(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=v(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?T(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?T(r,t):r}}let C=class{constructor(){o(this,"idNodeMap",new Map),o(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 I({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";const a=s&&x(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function x(e){return e.toLowerCase()}const k="__rrweb_original__";function O(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?x(t):null}function M(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 A=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,R=/^www\..*/i,N=/^(data:)([^,]*),(.*)/i;function T(e,t){return(e||"").replace(A,(e,r,s,n,i,o)=>{const a=s||i||o,l=r||n||"";if(!a)return e;if(E.test(a)||R.test(a))return`url(${l}${a}${l})`;if(N.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 c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function P(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function F(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=P(e);for(let n=1;n<r.length;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const i=P(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(P(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 D=1;const L=new RegExp("[^a-z0-9-_:]");function B(){return D++}let _,U;const j=/^[^ \t\n\r\u000c]+/,z=/^[, \t\n\r\u000c]+/;const W=new WeakMap;function V(e,t){return t&&""!==t.trim()?Z(e,t):t}function G(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Z(e,t){let r=W.get(e);if(r||(r=e.createElement("a"),W.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Y(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?V(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(z),!(r>=t.length);){let i=s(j);if(","===i.slice(-1))i=V(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=V(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?T(s,Z(e)):"object"===t&&"data"===r?V(e,s):s:V(e,s):s}function J(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function $(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&$(g.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&$(g.parentNode(e),t,r)}function X(e,t,r,s){let n;if(y(e)){if(n=e,!g.childNodes(n).length)return!1}else{if(null===g.parentElement(e))return!1;n=g.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($(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 H(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:h,maskInputFn:u,dataURLOptions:p={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:w=!1}=t,b=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:a.Document,childNodes:[],compatMode:e.compatMode}:{type:a.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:a.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:c={},inlineImages:h,recordCanvas:u,keepIframeSrcFn:p,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=x(e.tagName);return L.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];J(g,s.name,s.value)||(y[s.name]=Y(r,g,x(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=v(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=v(e.sheet);t&&(e.childNodes.length>1&&(t=F(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=I({element:e,type:O(e),tagName:g,value:t,maskInputOptions:o,maskInputFn:l}):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&&u)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=k in n?n[k]: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(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===g&&h){_||(_=r.createElement("canvas"),U=_.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{_.width=t.naturalWidth,_.height=t.naturalHeight,U.drawImage(t,0,0),y.rr_dataURL=_.toDataURL(c.type,c.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||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:a.Element,tagName:g,attributes:y,childNodes:[],isSVG:G(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,o=g.parentNode(e),l=o&&o.tagName;let c="";const h="STYLE"===l||void 0,u="SCRIPT"===l||void 0;u?c="SCRIPT_PLACEHOLDER":i||(c=g.textContent(e),h&&c&&(c=T(c,Z(t.doc))));!h&&!u&&c&&r&&(c=s?s(c,g.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:a.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:h,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:a.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:a.Comment,textContent:g.textContent(e)||"",rootId:b};default:return!1}}function K(e){return null==e?"":e.toLowerCase()}function Q(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:S=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:E=!1,cssCaptured:R=!1}=t;let{needsMask:N}=t,{preserveWhiteSpace:T=!0}=t;if(!N){N=X(e,o,l,void 0===N)}const P=H(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,dataURLOptions:m,inlineImages:v,recordCanvas:S,keepIframeSrcFn:A,newlyAddedElement:E,cssCaptured:R});if(!P)return console.warn(e,"not serialized"),null;let F;F=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===a.Comment)return!0;if(e.type===a.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"===M(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}(P,f)||!T&&P.type===a.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?-2:B();const D=Object.assign(P,{id:F});if(s.add(e,D),-2===F)return null;C&&C(e);let L=!c;if(D.type===a.Element){L=L&&!D.needBlock,delete D.needBlock;const t=g.shadowRoot(e);t&&b(t)&&(D.isShadowHost=!0)}if((D.type===a.Document||D.type===a.Element)&&L){f.headWhitespace&&D.type===a.Element&&"head"===D.tagName&&(T=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:c,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A,cssCaptured:!1};if(D.type===a.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else{D.type===a.Element&&void 0!==D.attributes._cssText&&"string"==typeof D.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(g.childNodes(e))){const e=Q(r,t);e&&D.childNodes.push(e)}}let w=null;if(y(e)&&(w=g.shadowRoot(e)))for(const e of Array.from(g.childNodes(w))){const r=Q(e,t);r&&(b(w)&&(r.isShadow=!0),D.childNodes.push(r))}}const _=g.parentNode(e);return _&&w(_)&&b(_)&&(D.isShadow=!0),D.type===a.Element&&"iframe"===D.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&&I){const r=Q(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A});r&&I(e,r)}},x),D.type===a.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===M(D.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(k){const t=Q(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A});t&&k(e,t)}},O),D}function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ee(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 te={exports:{}},re=String,se=function(){return{isColorSupported:!1,reset:re,bold:re,dim:re,italic:re,underline:re,inverse:re,hidden:re,strikethrough:re,black:re,red:re,green:re,yellow:re,blue:re,magenta:re,cyan:re,white:re,gray:re,bgBlack:re,bgRed:re,bgGreen:re,bgYellow:re,bgBlue:re,bgMagenta:re,bgCyan:re,bgWhite:re}};te.exports=se(),te.exports.createColors=se;var ne=te.exports;const ie=ee(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let oe=ne,ae=ie,le=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=oe.isColorSupported),ae&&e&&(t=ae(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}=oe.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 ce=le;le.default=le;var he={};he.isClean=Symbol("isClean"),he.my=Symbol("my");const ue={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let pe=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 ue[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=ue[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 de=pe;pe.default=pe;let fe=de;function me(e,t){new fe(t).stringify(e)}var ge=me;me.default=me;let{isClean:ye,my:we}=he,be=ce,ve=de,Se=ge;function Ce(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=>Ce(e,r)):("object"===i&&null!==n&&(n=Ce(n)),r[s]=n)}return r}let Ie=class{constructor(e={}){this.raws={},this[ye]=!1,this[we]=!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=Ce(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 be(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[ye]){this[ye]=!1;let e=this;for(;e=e.parent;)e[ye]=!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 ve).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=Se){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 xe=Ie;Ie.default=Ie;let ke=xe,Oe=class extends ke{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 Me=Oe;Oe.default=Oe;var Ae={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ee,SourceMapGenerator:Re}=ie,{existsSync:Ne,readFileSync:Te}=ie,{dirname:Pe,join:Fe}=ie;let De=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=Pe(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ee(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=Pe(e),Ne(e))return this.mapFile=e,Te(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 Ee)return Re.fromSourceMap(t).toString();if(t instanceof Re)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=Fe(Pe(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 Le=De;De.default=De;let{SourceMapConsumer:Be,SourceMapGenerator:_e}=ie,{fileURLToPath:Ue,pathToFileURL:je}=ie,{isAbsolute:ze,resolve:We}=ie,{nanoid:Ve}=Ae,Ge=ie,Ze=ce,Ye=Le,Je=Symbol("fromOffsetCache"),$e=Boolean(Be&&_e),Xe=Boolean(We&&ze),He=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&&(!Xe||/^\w+:\/\//.test(t.from)||ze(t.from)?this.file=t.from:this.file=We(t.from)),Xe&&$e){let e=new Ye(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 "+Ve(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 Ze(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 Ze(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&&(je&&(n.input.url=je(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Je])r=this[Je];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[Je]=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:We(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=ze(a.source)?je(a.source):new URL(a.source,this.map.consumer().sourceRoot||je(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(!Ue)throw new Error("file: protocol is not available in this PostCSS build");l.file=Ue(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Ke=He;He.default=He,Ge&&Ge.registerInput&&Ge.registerInput(He);let{SourceMapConsumer:Qe,SourceMapGenerator:qe}=ie,{dirname:et,relative:tt,resolve:rt,sep:st}=ie,{pathToFileURL:nt}=ie,it=Ke,ot=Boolean(Qe&&qe),at=Boolean(et&&rt&&tt&&st);var lt=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||et(e.file);!1===this.mapOpts.sourcesContent?(t=new Qe(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(),at&&ot&&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=qe.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new qe({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 qe({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?et(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=et(rt(r,this.mapOpts.annotation)));let s=tt(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 it(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(nt){let t=nt(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;"\\"===st&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ct=xe,ht=class extends ct{constructor(e){super(e),this.type="comment"}};var ut=ht;ht.default=ht;let pt,dt,ft,mt,{isClean:gt,my:yt}=he,wt=Me,bt=ut,vt=xe;function St(e){return e.map(e=>(e.nodes&&(e.nodes=St(e.nodes)),delete e.source,e))}function Ct(e){if(e[gt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ct(t)}let It=class e extends vt{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=St(pt(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 wt(t)]}else if(t.selector)t=[new dt(t)];else if(t.name)t=[new ft(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new bt(t)]}return t.map(t=>(t[yt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[gt]&&Ct(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]}};It.registerParse=e=>{pt=e},It.registerRule=e=>{dt=e},It.registerAtRule=e=>{ft=e},It.registerRoot=e=>{mt=e};var xt=It;It.default=It,It.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ft.prototype):"rule"===e.type?Object.setPrototypeOf(e,dt.prototype):"decl"===e.type?Object.setPrototypeOf(e,wt.prototype):"comment"===e.type?Object.setPrototypeOf(e,bt.prototype):"root"===e.type&&Object.setPrototypeOf(e,mt.prototype),e[yt]=!0,e.nodes&&e.nodes.forEach(e=>{It.rebuild(e)})};let kt,Ot,Mt=xt,At=class extends Mt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new kt(new Ot,this,e).stringify()}};At.registerLazyResult=e=>{kt=e},At.registerProcessor=e=>{Ot=e};var Et=At;At.default=At;let Rt={};var Nt=function(e){Rt[e]||(Rt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Tt=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 Pt=Tt;Tt.default=Tt;let Ft=Pt,Dt=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 Ft(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Lt=Dt;Dt.default=Dt;const Bt="'".charCodeAt(0),_t='"'.charCodeAt(0),Ut="\\".charCodeAt(0),jt="/".charCodeAt(0),zt="\n".charCodeAt(0),Wt=" ".charCodeAt(0),Vt="\f".charCodeAt(0),Gt="\t".charCodeAt(0),Zt="\r".charCodeAt(0),Yt="[".charCodeAt(0),Jt="]".charCodeAt(0),$t="(".charCodeAt(0),Xt=")".charCodeAt(0),Ht="{".charCodeAt(0),Kt="}".charCodeAt(0),Qt=";".charCodeAt(0),qt="*".charCodeAt(0),er=":".charCodeAt(0),tr="@".charCodeAt(0),rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,nr=/.[\r\n"'(/\\]/,ir=/[\da-f]/i;let or=xt,ar=class extends or{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 lr=ar;ar.default=ar,or.registerAtRule(ar);let cr,hr,ur=xt,pr=class extends ur{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 cr(new hr,this,e).stringify()}};pr.registerLazyResult=e=>{cr=e},pr.registerProcessor=e=>{hr=e};var dr=pr;pr.default=pr,ur.registerRoot(pr);let fr={comma:e=>fr.split(e,[","],!0),space:e=>fr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 mr=fr;fr.default=fr;let gr=xt,yr=mr,wr=class extends gr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yr.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 br=wr;wr.default=wr,gr.registerRule(wr);let vr=Me,Sr=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case zt:case Wt:case Gt:case Zt:case Vt:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Wt||r===zt||r===Gt||r===Zt||r===Vt);u=["space",p.slice(m,s)],m=s-1;break;case Yt:case Jt:case Ht:case Kt:case er:case Qt:case Xt:{let e=String.fromCharCode(r);u=[e,e,m];break}case $t:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Bt&&h!==_t&&h!==Wt&&h!==zt&&h!==Gt&&h!==Vt&&h!==Zt){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Ut;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||nr.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Bt:case _t:n=r===Bt?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Ut;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case tr:rr.lastIndex=m+1,rr.test(p),s=0===rr.lastIndex?p.length-1:rr.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ut:for(s=m,o=!0;p.charCodeAt(s+1)===Ut;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==jt&&r!==Wt&&r!==zt&&r!==Gt&&r!==Zt&&r!==Vt&&(s+=1,ir.test(p.charAt(s)))){for(;ir.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Wt&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===jt&&p.charCodeAt(m+1)===qt?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(sr.lastIndex=m+1,sr.test(p),s=0===sr.lastIndex?p.length-1:sr.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Cr=ut,Ir=lr,xr=dr,kr=br;const Or={empty:!0,space:!0};let Mr=xt,Ar=class{constructor(e){this.input=e,this.root=new xr,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 Ir;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 Cr;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=Sr(this.input)}decl(e,t){let r=new vr;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 kr;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,c="",h=!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",Or[a]||Or[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new kr;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})}},Er=Ke;function Rr(e,t){let r=new Er(e,t),s=new Ar(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 Nr=Rr;Rr.default=Rr,Mr.registerParse(Rr);let{isClean:Tr,my:Pr}=he,Fr=lt,Dr=ge,Lr=xt,Br=Et,_r=Nt,Ur=Lt,jr=Nr,zr=dr;const Wr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Vr={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},Gr={Once:!0,postcssPlugin:!0,prepare:!0};function Zr(e){return"object"==typeof e&&"function"==typeof e.then}function Yr(e){let t=!1,r=Wr[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 Jr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Yr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function $r(e){return e[Tr]=!1,e.nodes&&e.nodes.forEach(e=>$r(e)),e}let Xr={},Hr=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 Ur)n=$r(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=jr;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[Pr]&&Lr.rebuild(n)}else n=$r(r);this.result=new Ur(t,n,s),this.helpers={...Xr,postcss:Xr,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(!Vr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gr[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(Zr(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Tr];){e[Tr]=!0;let t=[Jr(e)];for(;t.length>0;){let e=this.visitTick(t);if(Zr(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 Zr(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=Dr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fr(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(Zr(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Tr];)e[Tr]=!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||_r("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(Zr(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[Tr])return s[Tr]=!0,void e.push(Jr(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[Tr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Tr]=!0;let t=Yr(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Tr]||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"}};Hr.registerPostcss=e=>{Xr=e};var Kr=Hr;Hr.default=Hr,zr.registerLazyResult(Hr),Br.registerLazyResult(Hr);let Qr=lt,qr=ge,es=Nt,ts=Nr;const rs=Lt;let ss=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=qr;this.result=new rs(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Qr(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||es("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=ts;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 ns=ss;ss.default=ss;let is=ns,os=Kr,as=Et,ls=dr,cs=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 os(this,e,t):new is(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var hs=cs;cs.default=cs,ls.registerProcessor(cs),as.registerProcessor(cs);let us=Me,ps=Le,ds=ut,fs=lr,ms=Ke,gs=dr,ys=br;function ws(e,t){if(Array.isArray(e))return e.map(e=>ws(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ms.prototype};r.map&&(r.map={...r.map,__proto__:ps.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ws(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 gs(s);if("decl"===s.type)return new us(s);if("rule"===s.type)return new ys(s);if("comment"===s.type)return new ds(s);if("atrule"===s.type)return new fs(s);throw new Error("Unknown node type: "+e.type)}var bs=ws;ws.default=ws;let vs=ce,Ss=Me,Cs=Kr,Is=xt,xs=hs,ks=ge,Os=bs,Ms=Et,As=Pt,Es=ut,Rs=lr,Ns=Lt,Ts=Ke,Ps=Nr,Fs=mr,Ds=br,Ls=dr,Bs=xe;function _s(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new xs(e)}_s.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 xs).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return _s([n(r)]).process(e,t)},n},_s.stringify=ks,_s.parse=Ps,_s.fromJSON=Os,_s.list=Fs,_s.comment=e=>new Es(e),_s.atRule=e=>new Rs(e),_s.decl=e=>new Ss(e),_s.rule=e=>new Ds(e),_s.root=e=>new Ls(e),_s.document=e=>new Ms(e),_s.CssSyntaxError=vs,_s.Declaration=Ss,_s.Container=Is,_s.Processor=xs,_s.Document=Ms,_s.Comment=Es,_s.Warning=As,_s.AtRule=Rs,_s.Result=Ns,_s.Input=Ts,_s.Rule=Ds,_s.Root=Ls,_s.Node=Bs,Cs.registerPostcss(_s);var Us=_s;_s.default=_s;const js=q(Us);js.stringify,js.fromJSON,js.plugin,js.parse,js.list,js.document,js.comment,js.atRule,js.rule,js.decl,js.root,js.CssSyntaxError,js.Declaration,js.Container,js.Processor,js.Document,js.Comment,js.Warning,js.AtRule,js.Result,js.Input,js.Rule,js.Root,js.Node;var zs=Object.defineProperty,Ws=(e,t,r)=>((e,t,r)=>t in e?zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Vs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gs(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 Zs={exports:{}},Ys=String,Js=function(){return{isColorSupported:!1,reset:Ys,bold:Ys,dim:Ys,italic:Ys,underline:Ys,inverse:Ys,hidden:Ys,strikethrough:Ys,black:Ys,red:Ys,green:Ys,yellow:Ys,blue:Ys,magenta:Ys,cyan:Ys,white:Ys,gray:Ys,bgBlack:Ys,bgRed:Ys,bgGreen:Ys,bgYellow:Ys,bgBlue:Ys,bgMagenta:Ys,bgCyan:Ys,bgWhite:Ys}};Zs.exports=Js(),Zs.exports.createColors=Js;var $s=Zs.exports;const Xs=Gs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Hs=$s,Ks=Xs,Qs=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=Hs.isColorSupported),Ks&&e&&(t=Ks(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}=Hs.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 qs=Qs;Qs.default=Qs;var en={};en.isClean=Symbol("isClean"),en.my=Symbol("my");const tn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let rn=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 tn[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=tn[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 sn=rn;rn.default=rn;let nn=sn;function on(e,t){new nn(t).stringify(e)}var an=on;on.default=on;let{isClean:ln,my:cn}=en,hn=qs,un=sn,pn=an;function dn(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=>dn(e,r)):("object"===i&&null!==n&&(n=dn(n)),r[s]=n)}return r}let fn=class{constructor(e={}){this.raws={},this[ln]=!1,this[cn]=!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=dn(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 hn(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[ln]){this[ln]=!1;let e=this;for(;e=e.parent;)e[ln]=!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 un).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=pn){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 mn=fn;fn.default=fn;let gn=mn,yn=class extends gn{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 wn=yn;yn.default=yn;var bn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:vn,SourceMapGenerator:Sn}=Xs,{existsSync:Cn,readFileSync:In}=Xs,{dirname:xn,join:kn}=Xs;let On=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=xn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new vn(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=xn(e),Cn(e))return this.mapFile=e,In(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 vn)return Sn.fromSourceMap(t).toString();if(t instanceof Sn)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=kn(xn(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 Mn=On;On.default=On;let{SourceMapConsumer:An,SourceMapGenerator:En}=Xs,{fileURLToPath:Rn,pathToFileURL:Nn}=Xs,{isAbsolute:Tn,resolve:Pn}=Xs,{nanoid:Fn}=bn,Dn=Xs,Ln=qs,Bn=Mn,_n=Symbol("fromOffsetCache"),Un=Boolean(An&&En),jn=Boolean(Pn&&Tn),zn=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&&(!jn||/^\w+:\/\//.test(t.from)||Tn(t.from)?this.file=t.from:this.file=Pn(t.from)),jn&&Un){let e=new Bn(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 "+Fn(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 Ln(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 Ln(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&&(Nn&&(n.input.url=Nn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[_n])r=this[_n];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[_n]=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:Pn(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=Tn(a.source)?Nn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Nn(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(!Rn)throw new Error("file: protocol is not available in this PostCSS build");l.file=Rn(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Wn=zn;zn.default=zn,Dn&&Dn.registerInput&&Dn.registerInput(zn);let{SourceMapConsumer:Vn,SourceMapGenerator:Gn}=Xs,{dirname:Zn,relative:Yn,resolve:Jn,sep:$n}=Xs,{pathToFileURL:Xn}=Xs,Hn=Wn,Kn=Boolean(Vn&&Gn),Qn=Boolean(Zn&&Jn&&Yn&&$n);var qn=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||Zn(e.file);!1===this.mapOpts.sourcesContent?(t=new Vn(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(),Qn&&Kn&&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=Gn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Gn({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 Gn({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?Zn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Zn(Jn(r,this.mapOpts.annotation)));let s=Yn(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 Hn(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(Xn){let t=Xn(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;"\\"===$n&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ei=mn,ti=class extends ei{constructor(e){super(e),this.type="comment"}};var ri=ti;ti.default=ti;let si,ni,ii,oi,{isClean:ai,my:li}=en,ci=wn,hi=ri,ui=mn;function pi(e){return e.map(e=>(e.nodes&&(e.nodes=pi(e.nodes)),delete e.source,e))}function di(e){if(e[ai]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)di(t)}let fi=class e extends ui{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=pi(si(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 ci(t)]}else if(t.selector)t=[new ni(t)];else if(t.name)t=[new ii(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new hi(t)]}return t.map(t=>(t[li]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[ai]&&di(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]}};fi.registerParse=e=>{si=e},fi.registerRule=e=>{ni=e},fi.registerAtRule=e=>{ii=e},fi.registerRoot=e=>{oi=e};var mi=fi;fi.default=fi,fi.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ii.prototype):"rule"===e.type?Object.setPrototypeOf(e,ni.prototype):"decl"===e.type?Object.setPrototypeOf(e,ci.prototype):"comment"===e.type?Object.setPrototypeOf(e,hi.prototype):"root"===e.type&&Object.setPrototypeOf(e,oi.prototype),e[li]=!0,e.nodes&&e.nodes.forEach(e=>{fi.rebuild(e)})};let gi,yi,wi=mi,bi=class extends wi{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new gi(new yi,this,e).stringify()}};bi.registerLazyResult=e=>{gi=e},bi.registerProcessor=e=>{yi=e};var vi=bi;bi.default=bi;let Si={};var Ci=function(e){Si[e]||(Si[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Ii=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 xi=Ii;Ii.default=Ii;let ki=xi,Oi=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 ki(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Mi=Oi;Oi.default=Oi;const Ai="'".charCodeAt(0),Ei='"'.charCodeAt(0),Ri="\\".charCodeAt(0),Ni="/".charCodeAt(0),Ti="\n".charCodeAt(0),Pi=" ".charCodeAt(0),Fi="\f".charCodeAt(0),Di="\t".charCodeAt(0),Li="\r".charCodeAt(0),Bi="[".charCodeAt(0),_i="]".charCodeAt(0),Ui="(".charCodeAt(0),ji=")".charCodeAt(0),zi="{".charCodeAt(0),Wi="}".charCodeAt(0),Vi=";".charCodeAt(0),Gi="*".charCodeAt(0),Zi=":".charCodeAt(0),Yi="@".charCodeAt(0),Ji=/[\t\n\f\r "#'()/;[\\\]{}]/g,$i=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xi=/.[\r\n"'(/\\]/,Hi=/[\da-f]/i;let Ki=mi,Qi=class extends Ki{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 qi=Qi;Qi.default=Qi,Ki.registerAtRule(Qi);let eo,to,ro=mi,so=class extends ro{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 eo(new to,this,e).stringify()}};so.registerLazyResult=e=>{eo=e},so.registerProcessor=e=>{to=e};var no=so;so.default=so,ro.registerRoot(so);let io={comma:e=>io.split(e,[","],!0),space:e=>io.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 oo=io;io.default=io;let ao=mi,lo=oo,co=class extends ao{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return lo.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 ho=co;co.default=co,ao.registerRule(co);let uo=wn,po=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case Ti:case Pi:case Di:case Li:case Fi:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Pi||r===Ti||r===Di||r===Li||r===Fi);u=["space",p.slice(m,s)],m=s-1;break;case Bi:case _i:case zi:case Wi:case Zi:case Vi:case ji:{let e=String.fromCharCode(r);u=[e,e,m];break}case Ui:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Ai&&h!==Ei&&h!==Pi&&h!==Ti&&h!==Di&&h!==Fi&&h!==Li){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Ri;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||Xi.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Ai:case Ei:n=r===Ai?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Ri;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Yi:Ji.lastIndex=m+1,Ji.test(p),s=0===Ji.lastIndex?p.length-1:Ji.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ri:for(s=m,o=!0;p.charCodeAt(s+1)===Ri;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==Ni&&r!==Pi&&r!==Ti&&r!==Di&&r!==Li&&r!==Fi&&(s+=1,Hi.test(p.charAt(s)))){for(;Hi.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Pi&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Ni&&p.charCodeAt(m+1)===Gi?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):($i.lastIndex=m+1,$i.test(p),s=0===$i.lastIndex?p.length-1:$i.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},fo=ri,mo=qi,go=no,yo=ho;const wo={empty:!0,space:!0};let bo=mi,vo=class{constructor(e){this.input=e,this.root=new go,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 mo;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 fo;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=po(this.input)}decl(e,t){let r=new uo;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 yo;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,c="",h=!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",wo[a]||wo[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new yo;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})}},So=Wn;function Co(e,t){let r=new So(e,t),s=new vo(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 Io=Co;Co.default=Co,bo.registerParse(Co);let{isClean:xo,my:ko}=en,Oo=qn,Mo=an,Ao=mi,Eo=vi,Ro=Ci,No=Mi,To=Io,Po=no;const Fo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Do={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},Lo={Once:!0,postcssPlugin:!0,prepare:!0};function Bo(e){return"object"==typeof e&&"function"==typeof e.then}function _o(e){let t=!1,r=Fo[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 Uo(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:_o(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function jo(e){return e[xo]=!1,e.nodes&&e.nodes.forEach(e=>jo(e)),e}let zo={},Wo=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 No)n=jo(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=To;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[ko]&&Ao.rebuild(n)}else n=jo(r);this.result=new No(t,n,s),this.helpers={...zo,postcss:zo,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(!Do[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lo[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(Bo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xo];){e[xo]=!0;let t=[Uo(e)];for(;t.length>0;){let e=this.visitTick(t);if(Bo(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 Bo(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=Mo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Oo(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(Bo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xo];)e[xo]=!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||Ro("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(Bo(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[xo])return s[xo]=!0,void e.push(Uo(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[xo]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[xo]=!0;let t=_o(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[xo]||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"}};Wo.registerPostcss=e=>{zo=e};var Vo=Wo;Wo.default=Wo,Po.registerLazyResult(Wo),Eo.registerLazyResult(Wo);let Go=qn,Zo=an,Yo=Ci,Jo=Io;const $o=Mi;let Xo=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=Zo;this.result=new $o(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Go(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||Yo("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=Jo;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 Ho=Xo;Xo.default=Xo;let Ko=Ho,Qo=Vo,qo=vi,ea=no,ta=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 Qo(this,e,t):new Ko(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ra=ta;ta.default=ta,ea.registerProcessor(ta),qo.registerProcessor(ta);let sa=wn,na=Mn,ia=ri,oa=qi,aa=Wn,la=no,ca=ho;function ha(e,t){if(Array.isArray(e))return e.map(e=>ha(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:aa.prototype};r.map&&(r.map={...r.map,__proto__:na.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ha(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 la(s);if("decl"===s.type)return new sa(s);if("rule"===s.type)return new ca(s);if("comment"===s.type)return new ia(s);if("atrule"===s.type)return new oa(s);throw new Error("Unknown node type: "+e.type)}var ua=ha;ha.default=ha;let pa=qs,da=wn,fa=Vo,ma=mi,ga=ra,ya=an,wa=ua,ba=vi,va=xi,Sa=ri,Ca=qi,Ia=Mi,xa=Wn,ka=Io,Oa=oo,Ma=ho,Aa=no,Ea=mn;function Ra(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ga(e)}Ra.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 ga).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ra([n(r)]).process(e,t)},n},Ra.stringify=ya,Ra.parse=ka,Ra.fromJSON=wa,Ra.list=Oa,Ra.comment=e=>new Sa(e),Ra.atRule=e=>new Ca(e),Ra.decl=e=>new da(e),Ra.rule=e=>new Ma(e),Ra.root=e=>new Aa(e),Ra.document=e=>new ba(e),Ra.CssSyntaxError=pa,Ra.Declaration=da,Ra.Container=ma,Ra.Processor=ga,Ra.Document=ba,Ra.Comment=Sa,Ra.Warning=va,Ra.AtRule=Ca,Ra.Result=Ia,Ra.Input=xa,Ra.Rule=Ma,Ra.Root=Aa,Ra.Node=Ea,fa.registerPostcss(Ra);var Na=Ra;Ra.default=Ra;const Ta=Vs(Na);Ta.stringify,Ta.fromJSON,Ta.plugin,Ta.parse,Ta.list,Ta.document,Ta.comment,Ta.atRule,Ta.rule,Ta.decl,Ta.root,Ta.CssSyntaxError,Ta.Declaration,Ta.Container,Ta.Processor,Ta.Document,Ta.Comment,Ta.Warning,Ta.AtRule,Ta.Result,Ta.Input,Ta.Rule,Ta.Root,Ta.Node;let Pa=class e{constructor(...e){Ws(this,"parentElement",null),Ws(this,"parentNode",null),Ws(this,"ownerDocument"),Ws(this,"firstChild",null),Ws(this,"lastChild",null),Ws(this,"previousSibling",null),Ws(this,"nextSibling",null),Ws(this,"ELEMENT_NODE",1),Ws(this,"TEXT_NODE",3),Ws(this,"nodeType"),Ws(this,"nodeName"),Ws(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(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 Fa={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Da={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},La={};function Ba(e){if(La[e])return La[e];const t=globalThis[e],r=t.prototype,s=e in Fa?Fa[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 Da?Da[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 La[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?La[e]=i:r}catch{return r}}const _a={};function Ua(e,t,r){var s;const n=`${e}.${String(r)}`;if(_a[n])return _a[n].call(t);const i=Ba(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(_a[n]=o,o.call(t)):t[r]}const ja={};function za(e,t,r){const s=`${e}.${String(r)}`;if(ja[s])return ja[s].bind(t);const n=Ba(e)[r];return"function"!=typeof n?t[r]:(ja[s]=n,n.bind(t))}function Wa(){return Ba("MutationObserver").constructor}const Va={childNodes:function(e){return Ua("Node",e,"childNodes")},parentNode:function(e){return Ua("Node",e,"parentNode")},parentElement:function(e){return Ua("Node",e,"parentElement")},textContent:function(e){return Ua("Node",e,"textContent")},contains:function(e,t){return za("Node",e,"contains")(t)},getRootNode:function(e){return za("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ua("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ua("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ua("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ua("Element",e,"querySelectorAll")(t)},mutationObserver:Wa};function Ga(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Za="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 Ya={map:{},getId:()=>(console.error(Za),-1),getNode:()=>(console.error(Za),null),removeNodeFromMap(){console.error(Za)},has:()=>(console.error(Za),!1),reset(){console.error(Za)}};function Ja(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 $a(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)}}),()=>$a(e,t,i||{},!0)}function Xa(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&&(Ya=new Proxy(Ya,{get:(e,t,r)=>("map"===t&&console.error(Za),Reflect.get(e,t,r))}));let Ha=Date.now;function Ka(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=Va.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=Va.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Qa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function el(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Va.parentElement(e)}function tl(e,t,r,s){if(!e)return!1;const n=el(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($(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 rl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function sl(e,t){if(w(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Va.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||sl(s,t))}function nl(e){return Boolean(e.changedTouches)}function il(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ol(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function al(e){return!!e&&(e instanceof Pa&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Va.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ha=()=>(new Date).getTime());let ll=class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(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 cl(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Va.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Va.host(Va.getRootNode(e))&&(r=Va.host(Va.getRootNode(e))),r}function hl(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=cl(r);)r=t;return r}(e);return Va.contains(t,r)}function ul(e){const t=e.ownerDocument;return!!t&&(Va.contains(t,e)||hl(e))}var pl=(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))(pl||{}),dl=(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))(dl||{}),fl=(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))(fl||{}),ml=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ml||{}),gl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(gl||{}),yl=(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))(yl||{}),wl=(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))(wl||{});function bl(e){return"__ln"in e}class vl{constructor(){n(this,"length",0),n(this,"head",null),n(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&&bl(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&&bl(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 Sl=(e,t)=>`${e}@${t}`;class Cl{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"removesSubTreeCache",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),n(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new vl,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=Va.parentNode(n);if(!i||!ul(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=w(i)?this.mirror.getId(cl(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=Q(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=>{il(e,this.mirror)&&this.iframeManager.addIframe(e),ol(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),al(n)&&this.shadowDomManager.addShadowRoot(Va.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});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)xl(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Va.parentNode(e))||n(e);for(const e of this.addedSet)kl(this.droppedSet,e)||xl(this.removesSubTreeCache,e,this.mirror)?kl(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(Va.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(Va.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Va.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Va.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=Va.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))}),n(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(Va.childNodes(e),e=>Va.textContent(e)||"").join("")}),n(this,"processMutation",e=>{if(!rl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Va.textContent(e.target);tl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:X(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,el(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=O(t);s=I({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(tl(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"),!J(t.tagName,r))if(n.attributes[r]=Y(this.doc,x(t.tagName),x(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(tl(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=w(e.target)?this.mirror.getId(Va.host(e.target)):this.mirror.getId(e.target);tl(e.target,this.blockClass,this.blockSelector,!1)||rl(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Il(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||sl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Sl(r,s)]?Il(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!w(e.target)||!b(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Va.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),n(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(rl(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[Sl(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);tl(e,this.blockClass,this.blockSelector,!1)||(Va.childNodes(e).forEach(e=>this.genAdds(e)),al(e)&&Va.childNodes(Va.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 Il(e,t){e.delete(t),Va.childNodes(t).forEach(t=>Il(e,t))}function xl(e,t,r){return 0!==e.size&&function(e,t){const r=Va.parentNode(t);return!!r&&e.has(r)}(e,t)}function kl(e,t){return 0!==e.size&&Ol(e,t)}function Ol(e,t){const r=Va.parentNode(t);return!!r&&(!!e.has(r)||Ol(e,r))}let Ml;const Al=e=>{if(!Ml)return e;return(...t)=>{try{return e(...t)}catch(e){if(Ml&&!0===Ml(e))return;throw e}}},El=[];function Rl(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 Nl(e,t){const r=new Cl;El.push(r),r.init(e);const s=new(Wa())(Al(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Tl({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(fl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=x(i);const c=(t=>i=>{const o=Rl(i);if(tl(o,s,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=ml.Mouse;break;case"touch":a=ml.Touch;break;case"pen":a=ml.Pen}a===ml.Touch?fl[t]===fl.MouseDown?c="TouchStart":fl[t]===fl.MouseUp&&(c="TouchEnd"):ml.Pen}else nl(i)&&(a=ml.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===ml.Touch||c.startsWith("Mouse")&&a===ml.Mouse)&&(a=null)):fl[t]===fl.Click&&(a=l,l=null);const h=nl(i)?i.changedTouches[0]:i;if(!h)return;const u=r.getId(o),{clientX:p,clientY:d}=h;Al(e)({type:fl[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(fl[i]){case fl.MouseDown:case fl.MouseUp:o=o.replace("mouse","pointer");break;case fl.TouchStart:case fl.TouchEnd:return}a.push(Ga(o,c,t))}),Al(()=>{a.forEach(e=>e())})}function Pl({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return Ga("scroll",Al(Ja(Al(i=>{const o=Rl(i);if(!o||tl(o,s,n,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=Ka(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 Fl=["INPUT","TEXTAREA","SELECT"],Dl=new WeakMap;function Ll(e){return function(e,t){if(jl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||jl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||jl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||jl("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 Bl(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function _l({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(Va.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}}),Al(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function Ul(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:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,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),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Nl(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=Ja(Al(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),c=Al(Ja(Al(e=>{const t=Rl(e),{clientX:r,clientY:n}=nl(e)?e.changedTouches[0]:e;o||(o=Ha()),a.push({x:r,y:n,id:s.getId(t),timeOffset:Ha()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?dl.Drag:e instanceof MouseEvent?dl.MouseMove:dl.TouchMove)}),n,{trailing:!1})),h=[Ga("mousemove",c,r),Ga("touchmove",c,r),Ga("drag",c,r)];return Al(()=>{h.forEach(e=>e())})}(e),i=Tl(e),o=Pl(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Ga("resize",Al(Ja(Al(()=>{const t=Qa(),n=qa();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:c,userTriggeredOnInput:h}){function u(e){let r=Rl(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=Va.parentElement(r)),!r||!u||Fl.indexOf(u)<0||tl(r,s,n,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let d=r.value,f=!1;const m=O(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(d=I({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(r,h?{text:d,isChecked:f,userTriggered:c}:{text:d,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;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){const n=Dl.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Dl.set(t,s);const n=r.getId(t);Al(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Ga(e,Al(u),t)),f=t.defaultView;if(!f)return()=>{d.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&&d.push(...g.map(e=>$a(e[0],e[1],{set(){Al(u)({target:this,isTrusted:!1})}},!1,f))),Al(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){const o=Al(i=>Ja(Al(n=>{const o=Rl(n);if(!o||tl(o,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Ga("play",o(yl.Play),i),Ga("pause",o(yl.Pause),i),Ga("seeked",o(yl.Seeked),i),Ga("volumechange",o(yl.VolumeChange),i),Ga("ratechange",o(yl.RateChange),i)];return Al(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=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:Al((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=Bl(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));const l={};zl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(zl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),zl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),zl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:Al((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=Bl(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...Ll(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Ll(n),o]}]}),s.apply(n,i)})})}),Al(()=>{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=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=_l(e,e.doc),p=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:Al((n,o,a)=>{var l;const[c,h,u]=a;if(r.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=Bl(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:Ll(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Al((n,i,a)=>{var l;const[c]=a;if(r.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=Bl(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:Ll(i.parentRule)}),n.apply(i,a)})}),Al(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(d=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=Xa(t.fonts,"add",function(t){return function(r){return setTimeout(Al(()=>{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),Al(()=>{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=Al(()=>{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:c,endOffset:h}=i;tl(o,s,n,!0)||tl(c,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(c),endOffset:h})}i({ranges:a})});return a(),Ga("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Xa(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 Al(()=>{El.forEach(e=>e.reset()),null==s||s.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function jl(e){return void 0!==window[e]}function zl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Wl{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(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 Vl{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new Wl(B)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wl(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 pl.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:pl.IncrementalSnapshot,data:{source:dl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case pl.Meta:case pl.Load:case pl.DomContentLoaded:return!1;case pl.Plugin:return t;case pl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case pl.IncrementalSnapshot:switch(t.data.source){case dl.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 dl.Drag:case dl.TouchMove:case dl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case dl.ViewportResize:return!1;case dl.MediaInteraction:case dl.MouseInteraction:case dl.Scroll:case dl.CanvasMutation:case dl.Input:return this.replaceIds(t.data,e,["id"]),t;case dl.StyleSheetRule:case dl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case dl.Font:return t;case dl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case dl.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===wl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Gl{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(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(!b(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Nl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Pl({...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(Va.host(e))),this.restoreHandlers.push(_l({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(Xa(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),i=Va.shadowRoot(this);return i&&ul(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Jl=0;Jl<64;Jl++)Yl[Zl.charCodeAt(Jl)]=Jl;const $l=new Map;const Xl=(e,t,r)=>{if(!e||!Ql(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=$l.get(e);return r||(r=new Map,$l.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 Hl(e,t,r){if(e instanceof Array)return e.map(e=>Hl(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+=Zl[r[t]>>2],n+=Zl[(3&r[t])<<4|r[t+1]>>4],n+=Zl[(15&r[t+1])<<2|r[t+2]>>6],n+=Zl[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:[Hl(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:[Hl(e.data,t,r),e.width,e.height]}}if(Ql(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Xl(e,t,r)}}return e}const Kl=(e,t,r)=>e.map(e=>Hl(e,t,r)),Ql=(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 ql(e,t,r,s){const n=[];try{const i=Xa(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!tl(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 ec(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=Xa(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Xl(a,i,this),"tagName"in this.canvas&&!tl(this.canvas,s,n,!0)){const e=Kl(o,i,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});o.push(a)}catch{const s=$a(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const tc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",rc="undefined"!=typeof window&&window.Blob&&new Blob([(sc=tc,Uint8Array.from(atob(sc),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var sc;function nc(e){let t;try{if(t=rc&&(window.URL||window.webkitURL).createObjectURL(rc),!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,"+tc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ic{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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:i,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const i=ql(t,r,s,!0),o=new Map,a=new nc;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:gl["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 c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{tl(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])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=ql(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=Xa(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return tl(this.canvas,r,s,!0)||setTimeout(()=>{const r=Kl(i,t,this);e(this.canvas,{type:gl["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{const r=$a(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:gl["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(...ec(t.WebGLRenderingContext.prototype,gl.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...ec(t.WebGL2RenderingContext.prototype,gl.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 oc{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new ll),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:S(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 ac{constructor(){n(this,"nodeMap",new WeakMap),n(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 lc,cc,hc,uc=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(r=e.contentWindow)?void 0:r.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const pc=new C;function dc(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:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:x=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:T}=e;Ml=T;const P=!x||window.parent===window;let F=!1;if(!P)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!F)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),pc.reset();const D=!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!==p?p:{password:!0},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let B;!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 _=0;const U=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!F&&(e=y(e)),e};lc=(e,n)=>{var i;const o=e;if(o.timestamp=Ha(),!(null==(i=El[0])?void 0:i.isFrozen())||o.type===pl.FullSnapshot||o.type===pl.IncrementalSnapshot&&o.data.source===dl.Mutation||El.forEach(e=>e.unfreeze()),P)null==t||t(U(o),n);else if(F){const e={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===pl.FullSnapshot)B=o,_=0;else if(o.type===pl.IncrementalSnapshot){if(o.data.source===dl.Mutation&&o.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&o.timestamp-B.timestamp>r;(e||t)&&cc(!0)}};const j=e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.Mutation,...e}})},z=e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Scroll,...e}}),W=e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.CanvasMutation,...e}}),V=new oc({mutationCb:j,adoptedStyleSheetCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.AdoptedStyleSheet,...e}})}),G=new Vl({mirror:pc,mutationCb:j,stylesheetManager:V,recordCrossOriginIframes:x,wrappedEmit:lc});for(const e of E||[])e.getMirror&&e.getMirror({nodeMirror:pc,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Z=new ac;hc=new ic({recordCanvas:I,mutationCb:W,win:window,blockClass:n,blockSelector:i,mirror:pc,sampling:w.canvas,dataURLOptions:b});const Y=new Gl({mutationCb:j,scrollCb:z,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:D,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:I,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:G,stylesheetManager:V,canvasManager:hc,keepIframeSrcFn:R,processedNodeManager:Z},mirror:pc});cc=(e=!1)=>{if(!S)return;lc({type:pl.Meta,data:{href:window.location.href,width:qa(),height:Qa()}},e),V.reset(),Y.init(),El.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new C,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return Q(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{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===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:pc,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:I,inlineImages:A,onSerialize:e=>{il(e,pc)&&G.addIframe(e),ol(e,pc)&&V.trackLinkElement(e),al(e)&&Y.addShadowRoot(Va.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");lc({type:pl.FullSnapshot,data:{node:t,initialOffset:Ka(window)}},e),El.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,pc.getId(document))};try{const e=[],t=e=>{var t;return Al(Ul)({mutationCb:j,mousemoveCb:(e,t)=>lc({type:pl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.MouseInteraction,...e}}),scrollCb:z,viewportResizeCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.ViewportResize,...e}}),inputCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Input,...e}}),mediaInteractionCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.MediaInteraction,...e}}),styleSheetRuleCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.StyleSheetRule,...e}}),styleDeclarationCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Font,...e}}),selectionCb:e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.Selection,...e}})},customElementCb:e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:I,inlineImages:A,userTriggeredOnInput:O,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:pc,iframeManager:G,stylesheetManager:V,shadowDomManager:Y,processedNodeManager:Z,canvasManager:hc,ignoreCSSAttributes:N,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>lc({type:pl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{cc(),e.push(t(document)),uc=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Ga("DOMContentLoaded",()=>{lc({type:pl.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&r()})),e.push(Ga("load",()=>{lc({type:pl.Load,data:{}}),"load"===k&&r()},window))),()=>{e.forEach(e=>e()),Z.destroy(),uc=!1,Ml=void 0}}catch(e){console.warn(e)}}var fc,mc;dc.addCustomEvent=(e,t)=>{if(!uc)throw new Error("please add custom event after start recording");lc({type:pl.Custom,data:{tag:e,payload:t}})},dc.freezePage=()=>{El.forEach(e=>e.freeze())},dc.takeFullSnapshot=e=>{if(!uc)throw new Error("please take full snapshot after start recording");cc(e)},dc.mirror=pc,(mc=fc||(fc={}))[mc.NotStarted=0]="NotStarted",mc[mc.Running=1]="Running",mc[mc.Stopped=2]="Stopped";const{takeFullSnapshot:gc}=dc;var yc,wc=Object.defineProperty,bc=(e,t,r)=>((e,t,r)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),vc=Object.defineProperty,Sc=(e,t,r)=>((e,t,r)=>t in e?vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Cc=Object.defineProperty,Ic=(e,t,r)=>((e,t,r)=>t in e?Cc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const xc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Oc={};function Mc(e){if(Oc[e])return Oc[e];const t=globalThis[e],r=t.prototype,s=e in xc?xc[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 kc?kc[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 Oc[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?Oc[e]=i:r}catch{return r}}const Ac={};function Ec(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ac[n])return Ac[n].call(t);const i=Mc(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(Ac[n]=o,o.call(t)):t[r]}const Rc={};function Nc(e,t,r){const s=`${e}.${String(r)}`;if(Rc[s])return Rc[s].bind(t);const n=Mc(e)[r];return"function"!=typeof n?t[r]:(Rc[s]=n,n.bind(t))}const Tc={childNodes:function(e){return Ec("Node",e,"childNodes")},parentNode:function(e){return Ec("Node",e,"parentNode")},parentElement:function(e){return Ec("Node",e,"parentElement")},textContent:function(e){return Ec("Node",e,"textContent")},contains:function(e,t){return Nc("Node",e,"contains")(t)},getRootNode:function(e){return Nc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ec("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ec("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ec("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ec("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Mc("MutationObserver").constructor}};class Pc{constructor(){Ic(this,"idNodeMap",new Map),Ic(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 Fc(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Fc(Tc.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Fc(Tc.parentNode(e),t,r)}function Dc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lc(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 Bc={exports:{}},_c=String,Uc=function(){return{isColorSupported:!1,reset:_c,bold:_c,dim:_c,italic:_c,underline:_c,inverse:_c,hidden:_c,strikethrough:_c,black:_c,red:_c,green:_c,yellow:_c,blue:_c,magenta:_c,cyan:_c,white:_c,gray:_c,bgBlack:_c,bgRed:_c,bgGreen:_c,bgYellow:_c,bgBlue:_c,bgMagenta:_c,bgCyan:_c,bgWhite:_c}};Bc.exports=Uc(),Bc.exports.createColors=Uc;var jc=Bc.exports;const zc=Lc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Wc=jc,Vc=zc,Gc=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=Wc.isColorSupported),Vc&&e&&(t=Vc(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}=Wc.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 Zc=Gc;Gc.default=Gc;var Yc={};Yc.isClean=Symbol("isClean"),Yc.my=Symbol("my");const Jc={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let $c=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 Jc[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=Jc[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 Xc=$c;$c.default=$c;let Hc=Xc;function Kc(e,t){new Hc(t).stringify(e)}var Qc=Kc;Kc.default=Kc;let{isClean:qc,my:eh}=Yc,th=Zc,rh=Xc,sh=Qc;function nh(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=>nh(e,r)):("object"===i&&null!==n&&(n=nh(n)),r[s]=n)}return r}let ih=class{constructor(e={}){this.raws={},this[qc]=!1,this[eh]=!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=nh(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 th(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[qc]){this[qc]=!1;let e=this;for(;e=e.parent;)e[qc]=!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 rh).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=sh){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 oh=ih;ih.default=ih;let ah=oh,lh=class extends ah{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 ch=lh;lh.default=lh;var hh={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:uh,SourceMapGenerator:ph}=zc,{existsSync:dh,readFileSync:fh}=zc,{dirname:mh,join:gh}=zc;let yh=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=mh(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new uh(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=mh(e),dh(e))return this.mapFile=e,fh(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 uh)return ph.fromSourceMap(t).toString();if(t instanceof ph)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=gh(mh(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 wh=yh;yh.default=yh;let{SourceMapConsumer:bh,SourceMapGenerator:vh}=zc,{fileURLToPath:Sh,pathToFileURL:Ch}=zc,{isAbsolute:Ih,resolve:xh}=zc,{nanoid:kh}=hh,Oh=zc,Mh=Zc,Ah=wh,Eh=Symbol("fromOffsetCache"),Rh=Boolean(bh&&vh),Nh=Boolean(xh&&Ih),Th=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&&(!Nh||/^\w+:\/\//.test(t.from)||Ih(t.from)?this.file=t.from:this.file=xh(t.from)),Nh&&Rh){let e=new Ah(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 "+kh(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 Mh(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 Mh(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&&(Ch&&(n.input.url=Ch(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Eh])r=this[Eh];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[Eh]=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:xh(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=Ih(a.source)?Ch(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ch(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(!Sh)throw new Error("file: protocol is not available in this PostCSS build");l.file=Sh(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Ph=Th;Th.default=Th,Oh&&Oh.registerInput&&Oh.registerInput(Th);let{SourceMapConsumer:Fh,SourceMapGenerator:Dh}=zc,{dirname:Lh,relative:Bh,resolve:_h,sep:Uh}=zc,{pathToFileURL:jh}=zc,zh=Ph,Wh=Boolean(Fh&&Dh),Vh=Boolean(Lh&&_h&&Bh&&Uh);var Gh=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||Lh(e.file);!1===this.mapOpts.sourcesContent?(t=new Fh(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(),Vh&&Wh&&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=Dh.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Dh({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 Dh({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?Lh(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Lh(_h(r,this.mapOpts.annotation)));let s=Bh(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 zh(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(jh){let t=jh(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;"\\"===Uh&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Zh=oh,Yh=class extends Zh{constructor(e){super(e),this.type="comment"}};var Jh=Yh;Yh.default=Yh;let $h,Xh,Hh,Kh,{isClean:Qh,my:qh}=Yc,eu=ch,tu=Jh,ru=oh;function su(e){return e.map(e=>(e.nodes&&(e.nodes=su(e.nodes)),delete e.source,e))}function nu(e){if(e[Qh]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)nu(t)}let iu=class e extends ru{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=su($h(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 eu(t)]}else if(t.selector)t=[new Xh(t)];else if(t.name)t=[new Hh(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new tu(t)]}return t.map(t=>(t[qh]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Qh]&&nu(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]}};iu.registerParse=e=>{$h=e},iu.registerRule=e=>{Xh=e},iu.registerAtRule=e=>{Hh=e},iu.registerRoot=e=>{Kh=e};var ou=iu;iu.default=iu,iu.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Hh.prototype):"rule"===e.type?Object.setPrototypeOf(e,Xh.prototype):"decl"===e.type?Object.setPrototypeOf(e,eu.prototype):"comment"===e.type?Object.setPrototypeOf(e,tu.prototype):"root"===e.type&&Object.setPrototypeOf(e,Kh.prototype),e[qh]=!0,e.nodes&&e.nodes.forEach(e=>{iu.rebuild(e)})};let au,lu,cu=ou,hu=class extends cu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new au(new lu,this,e).stringify()}};hu.registerLazyResult=e=>{au=e},hu.registerProcessor=e=>{lu=e};var uu=hu;hu.default=hu;let pu={};var du=function(e){pu[e]||(pu[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let fu=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 mu=fu;fu.default=fu;let gu=mu,yu=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 gu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var wu=yu;yu.default=yu;const bu="'".charCodeAt(0),vu='"'.charCodeAt(0),Su="\\".charCodeAt(0),Cu="/".charCodeAt(0),Iu="\n".charCodeAt(0),xu=" ".charCodeAt(0),ku="\f".charCodeAt(0),Ou="\t".charCodeAt(0),Mu="\r".charCodeAt(0),Au="[".charCodeAt(0),Eu="]".charCodeAt(0),Ru="(".charCodeAt(0),Nu=")".charCodeAt(0),Tu="{".charCodeAt(0),Pu="}".charCodeAt(0),Fu=";".charCodeAt(0),Du="*".charCodeAt(0),Lu=":".charCodeAt(0),Bu="@".charCodeAt(0),_u=/[\t\n\f\r "#'()/;[\\\]{}]/g,Uu=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ju=/.[\r\n"'(/\\]/,zu=/[\da-f]/i;let Wu=ou,Vu=class extends Wu{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 Gu=Vu;Vu.default=Vu,Wu.registerAtRule(Vu);let Zu,Yu,Ju=ou,$u=class extends Ju{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 Zu(new Yu,this,e).stringify()}};$u.registerLazyResult=e=>{Zu=e},$u.registerProcessor=e=>{Yu=e};var Xu=$u;$u.default=$u,Ju.registerRoot($u);let Hu={comma:e=>Hu.split(e,[","],!0),space:e=>Hu.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 Ku=Hu;Hu.default=Hu;let Qu=ou,qu=Ku,ep=class extends Qu{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return qu.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 tp=ep;ep.default=ep,Qu.registerRule(ep);let rp=ch,sp=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case Iu:case xu:case Ou:case Mu:case ku:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===xu||r===Iu||r===Ou||r===Mu||r===ku);u=["space",p.slice(m,s)],m=s-1;break;case Au:case Eu:case Tu:case Pu:case Lu:case Fu:case Nu:{let e=String.fromCharCode(r);u=[e,e,m];break}case Ru:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==bu&&h!==vu&&h!==xu&&h!==Iu&&h!==Ou&&h!==ku&&h!==Mu){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Su;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||ju.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case bu:case vu:n=r===bu?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Su;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Bu:_u.lastIndex=m+1,_u.test(p),s=0===_u.lastIndex?p.length-1:_u.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Su:for(s=m,o=!0;p.charCodeAt(s+1)===Su;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==Cu&&r!==xu&&r!==Iu&&r!==Ou&&r!==Mu&&r!==ku&&(s+=1,zu.test(p.charAt(s)))){for(;zu.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===xu&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Cu&&p.charCodeAt(m+1)===Du?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Uu.lastIndex=m+1,Uu.test(p),s=0===Uu.lastIndex?p.length-1:Uu.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},np=Jh,ip=Gu,op=Xu,ap=tp;const lp={empty:!0,space:!0};let cp=ou,hp=class{constructor(e){this.input=e,this.root=new op,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 ip;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 np;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=sp(this.input)}decl(e,t){let r=new rp;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 ap;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,c="",h=!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",lp[a]||lp[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new ap;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})}},up=Ph;function pp(e,t){let r=new up(e,t),s=new hp(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 dp=pp;pp.default=pp,cp.registerParse(pp);let{isClean:fp,my:mp}=Yc,gp=Gh,yp=Qc,wp=ou,bp=uu,vp=du,Sp=wu,Cp=dp,Ip=Xu;const xp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kp={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},Op={Once:!0,postcssPlugin:!0,prepare:!0};function Mp(e){return"object"==typeof e&&"function"==typeof e.then}function Ap(e){let t=!1,r=xp[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 Ep(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ap(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Rp(e){return e[fp]=!1,e.nodes&&e.nodes.forEach(e=>Rp(e)),e}let Np={},Tp=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 Sp)n=Rp(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=Cp;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[mp]&&wp.rebuild(n)}else n=Rp(r);this.result=new Sp(t,n,s),this.helpers={...Np,postcss:Np,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(!kp[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Op[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(Mp(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fp];){e[fp]=!0;let t=[Ep(e)];for(;t.length>0;){let e=this.visitTick(t);if(Mp(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 Mp(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=yp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new gp(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(Mp(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fp];)e[fp]=!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||vp("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(Mp(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[fp])return s[fp]=!0,void e.push(Ep(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[fp]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[fp]=!0;let t=Ap(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[fp]||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"}};Tp.registerPostcss=e=>{Np=e};var Pp=Tp;Tp.default=Tp,Ip.registerLazyResult(Tp),bp.registerLazyResult(Tp);let Fp=Gh,Dp=Qc,Lp=du,Bp=dp;const _p=wu;let Up=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=Dp;this.result=new _p(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Fp(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||Lp("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=Bp;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 jp=Up;Up.default=Up;let zp=jp,Wp=Pp,Vp=uu,Gp=Xu,Zp=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 Wp(this,e,t):new zp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yp=Zp;Zp.default=Zp,Gp.registerProcessor(Zp),Vp.registerProcessor(Zp);let Jp=ch,$p=wh,Xp=Jh,Hp=Gu,Kp=Ph,Qp=Xu,qp=tp;function ed(e,t){if(Array.isArray(e))return e.map(e=>ed(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Kp.prototype};r.map&&(r.map={...r.map,__proto__:$p.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ed(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 Qp(s);if("decl"===s.type)return new Jp(s);if("rule"===s.type)return new qp(s);if("comment"===s.type)return new Xp(s);if("atrule"===s.type)return new Hp(s);throw new Error("Unknown node type: "+e.type)}var td=ed;ed.default=ed;let rd=Zc,sd=ch,nd=Pp,id=ou,od=Yp,ad=Qc,ld=td,cd=uu,hd=mu,ud=Jh,pd=Gu,dd=wu,fd=Ph,md=dp,gd=Ku,yd=tp,wd=Xu,bd=oh;function vd(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new od(e)}vd.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 od).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return vd([n(r)]).process(e,t)},n},vd.stringify=ad,vd.parse=md,vd.fromJSON=ld,vd.list=gd,vd.comment=e=>new ud(e),vd.atRule=e=>new pd(e),vd.decl=e=>new sd(e),vd.rule=e=>new yd(e),vd.root=e=>new wd(e),vd.document=e=>new cd(e),vd.CssSyntaxError=rd,vd.Declaration=sd,vd.Container=id,vd.Processor=od,vd.Document=cd,vd.Comment=ud,vd.Warning=hd,vd.AtRule=pd,vd.Result=dd,vd.Input=fd,vd.Rule=yd,vd.Root=wd,vd.Node=bd,nd.registerPostcss(vd);var Sd=vd;vd.default=vd;const Cd=Dc(Sd);Cd.stringify,Cd.fromJSON,Cd.plugin,Cd.parse,Cd.list,Cd.document,Cd.comment,Cd.atRule,Cd.rule,Cd.decl,Cd.root,Cd.CssSyntaxError,Cd.Declaration,Cd.Container,Cd.Processor,Cd.Document,Cd.Comment,Cd.Warning,Cd.AtRule,Cd.Result,Cd.Input,Cd.Rule,Cd.Root,Cd.Node;var Id=Object.defineProperty,xd=(e,t,r)=>((e,t,r)=>t in e?Id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function kd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Od(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 Md={exports:{}},Ad=String,Ed=function(){return{isColorSupported:!1,reset:Ad,bold:Ad,dim:Ad,italic:Ad,underline:Ad,inverse:Ad,hidden:Ad,strikethrough:Ad,black:Ad,red:Ad,green:Ad,yellow:Ad,blue:Ad,magenta:Ad,cyan:Ad,white:Ad,gray:Ad,bgBlack:Ad,bgRed:Ad,bgGreen:Ad,bgYellow:Ad,bgBlue:Ad,bgMagenta:Ad,bgCyan:Ad,bgWhite:Ad}};Md.exports=Ed(),Md.exports.createColors=Ed;var Rd=Md.exports;const Nd=Od(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Td=Rd,Pd=Nd,Fd=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=Td.isColorSupported),Pd&&e&&(t=Pd(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}=Td.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 Dd=Fd;Fd.default=Fd;var Ld={};Ld.isClean=Symbol("isClean"),Ld.my=Symbol("my");const Bd={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _d=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 Bd[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=Bd[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 Ud=_d;_d.default=_d;let jd=Ud;function zd(e,t){new jd(t).stringify(e)}var Wd=zd;zd.default=zd;let{isClean:Vd,my:Gd}=Ld,Zd=Dd,Yd=Ud,Jd=Wd;function $d(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=>$d(e,r)):("object"===i&&null!==n&&(n=$d(n)),r[s]=n)}return r}let Xd=class{constructor(e={}){this.raws={},this[Vd]=!1,this[Gd]=!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=$d(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 Zd(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[Vd]){this[Vd]=!1;let e=this;for(;e=e.parent;)e[Vd]=!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 Yd).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=Jd){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 Hd=Xd;Xd.default=Xd;let Kd=Hd,Qd=class extends Kd{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 qd=Qd;Qd.default=Qd;var ef={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:tf,SourceMapGenerator:rf}=Nd,{existsSync:sf,readFileSync:nf}=Nd,{dirname:of,join:af}=Nd;let lf=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=of(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new tf(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=of(e),sf(e))return this.mapFile=e,nf(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 tf)return rf.fromSourceMap(t).toString();if(t instanceof rf)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=af(of(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 cf=lf;lf.default=lf;let{SourceMapConsumer:hf,SourceMapGenerator:uf}=Nd,{fileURLToPath:pf,pathToFileURL:df}=Nd,{isAbsolute:ff,resolve:mf}=Nd,{nanoid:gf}=ef,yf=Nd,wf=Dd,bf=cf,vf=Symbol("fromOffsetCache"),Sf=Boolean(hf&&uf),Cf=Boolean(mf&&ff),If=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&&(!Cf||/^\w+:\/\//.test(t.from)||ff(t.from)?this.file=t.from:this.file=mf(t.from)),Cf&&Sf){let e=new bf(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 "+gf(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 wf(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 wf(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&&(df&&(n.input.url=df(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[vf])r=this[vf];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[vf]=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:mf(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=ff(a.source)?df(a.source):new URL(a.source,this.map.consumer().sourceRoot||df(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(!pf)throw new Error("file: protocol is not available in this PostCSS build");l.file=pf(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 xf=If;If.default=If,yf&&yf.registerInput&&yf.registerInput(If);let{SourceMapConsumer:kf,SourceMapGenerator:Of}=Nd,{dirname:Mf,relative:Af,resolve:Ef,sep:Rf}=Nd,{pathToFileURL:Nf}=Nd,Tf=xf,Pf=Boolean(kf&&Of),Ff=Boolean(Mf&&Ef&&Af&&Rf);var Df=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||Mf(e.file);!1===this.mapOpts.sourcesContent?(t=new kf(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(),Ff&&Pf&&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=Of.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Of({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 Of({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?Mf(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Mf(Ef(r,this.mapOpts.annotation)));let s=Af(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 Tf(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(Nf){let t=Nf(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;"\\"===Rf&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Lf=Hd,Bf=class extends Lf{constructor(e){super(e),this.type="comment"}};var _f=Bf;Bf.default=Bf;let Uf,jf,zf,Wf,{isClean:Vf,my:Gf}=Ld,Zf=qd,Yf=_f,Jf=Hd;function $f(e){return e.map(e=>(e.nodes&&(e.nodes=$f(e.nodes)),delete e.source,e))}function Xf(e){if(e[Vf]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Xf(t)}let Hf=class e extends Jf{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=$f(Uf(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 Zf(t)]}else if(t.selector)t=[new jf(t)];else if(t.name)t=[new zf(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Yf(t)]}return t.map(t=>(t[Gf]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Vf]&&Xf(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]}};Hf.registerParse=e=>{Uf=e},Hf.registerRule=e=>{jf=e},Hf.registerAtRule=e=>{zf=e},Hf.registerRoot=e=>{Wf=e};var Kf=Hf;Hf.default=Hf,Hf.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,zf.prototype):"rule"===e.type?Object.setPrototypeOf(e,jf.prototype):"decl"===e.type?Object.setPrototypeOf(e,Zf.prototype):"comment"===e.type?Object.setPrototypeOf(e,Yf.prototype):"root"===e.type&&Object.setPrototypeOf(e,Wf.prototype),e[Gf]=!0,e.nodes&&e.nodes.forEach(e=>{Hf.rebuild(e)})};let Qf,qf,em=Kf,tm=class extends em{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Qf(new qf,this,e).stringify()}};tm.registerLazyResult=e=>{Qf=e},tm.registerProcessor=e=>{qf=e};var rm=tm;tm.default=tm;let sm={};var nm=function(e){sm[e]||(sm[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let im=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 om=im;im.default=im;let am=om,lm=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 am(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var cm=lm;lm.default=lm;const hm="'".charCodeAt(0),um='"'.charCodeAt(0),pm="\\".charCodeAt(0),dm="/".charCodeAt(0),fm="\n".charCodeAt(0),mm=" ".charCodeAt(0),gm="\f".charCodeAt(0),ym="\t".charCodeAt(0),wm="\r".charCodeAt(0),bm="[".charCodeAt(0),vm="]".charCodeAt(0),Sm="(".charCodeAt(0),Cm=")".charCodeAt(0),Im="{".charCodeAt(0),xm="}".charCodeAt(0),km=";".charCodeAt(0),Om="*".charCodeAt(0),Mm=":".charCodeAt(0),Am="@".charCodeAt(0),Em=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Nm=/.[\r\n"'(/\\]/,Tm=/[\da-f]/i;let Pm=Kf,Fm=class extends Pm{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 Dm=Fm;Fm.default=Fm,Pm.registerAtRule(Fm);let Lm,Bm,_m=Kf,Um=class extends _m{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 Lm(new Bm,this,e).stringify()}};Um.registerLazyResult=e=>{Lm=e},Um.registerProcessor=e=>{Bm=e};var jm=Um;Um.default=Um,_m.registerRoot(Um);let zm={comma:e=>zm.split(e,[","],!0),space:e=>zm.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 Wm=zm;zm.default=zm;let Vm=Kf,Gm=Wm,Zm=class extends Vm{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Gm.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 Ym=Zm;Zm.default=Zm,Vm.registerRule(Zm);let Jm=qd,$m=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case fm:case mm:case ym:case wm:case gm:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===mm||r===fm||r===ym||r===wm||r===gm);u=["space",p.slice(m,s)],m=s-1;break;case bm:case vm:case Im:case xm:case Mm:case km:case Cm:{let e=String.fromCharCode(r);u=[e,e,m];break}case Sm:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==hm&&h!==um&&h!==mm&&h!==fm&&h!==ym&&h!==gm&&h!==wm){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===pm;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||Nm.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case hm:case um:n=r===hm?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===pm;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Am:Em.lastIndex=m+1,Em.test(p),s=0===Em.lastIndex?p.length-1:Em.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case pm:for(s=m,o=!0;p.charCodeAt(s+1)===pm;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==dm&&r!==mm&&r!==fm&&r!==ym&&r!==wm&&r!==gm&&(s+=1,Tm.test(p.charAt(s)))){for(;Tm.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===mm&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===dm&&p.charCodeAt(m+1)===Om?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Rm.lastIndex=m+1,Rm.test(p),s=0===Rm.lastIndex?p.length-1:Rm.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Xm=_f,Hm=Dm,Km=jm,Qm=Ym;const qm={empty:!0,space:!0};let eg=Kf,tg=class{constructor(e){this.input=e,this.root=new Km,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 Hm;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 Xm;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=$m(this.input)}decl(e,t){let r=new Jm;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 Qm;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,c="",h=!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",qm[a]||qm[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Qm;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})}},rg=xf;function sg(e,t){let r=new rg(e,t),s=new tg(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 ng=sg;sg.default=sg,eg.registerParse(sg);let{isClean:ig,my:og}=Ld,ag=Df,lg=Wd,cg=Kf,hg=rm,ug=nm,pg=cm,dg=ng,fg=jm;const mg={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gg={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},yg={Once:!0,postcssPlugin:!0,prepare:!0};function wg(e){return"object"==typeof e&&"function"==typeof e.then}function bg(e){let t=!1,r=mg[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 vg(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:bg(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Sg(e){return e[ig]=!1,e.nodes&&e.nodes.forEach(e=>Sg(e)),e}let Cg={},Ig=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 pg)n=Sg(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=dg;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[og]&&cg.rebuild(n)}else n=Sg(r);this.result=new pg(t,n,s),this.helpers={...Cg,postcss:Cg,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(!gg[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yg[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(wg(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ig];){e[ig]=!0;let t=[vg(e)];for(;t.length>0;){let e=this.visitTick(t);if(wg(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 wg(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=lg;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ag(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(wg(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ig];)e[ig]=!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||ug("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(wg(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[ig])return s[ig]=!0,void e.push(vg(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[ig]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ig]=!0;let t=bg(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[ig]||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"}};Ig.registerPostcss=e=>{Cg=e};var xg=Ig;Ig.default=Ig,fg.registerLazyResult(Ig),hg.registerLazyResult(Ig);let kg=Df,Og=Wd,Mg=nm,Ag=ng;const Eg=cm;let Rg=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=Og;this.result=new Eg(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new kg(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||Mg("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=Ag;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 Ng=Rg;Rg.default=Rg;let Tg=Ng,Pg=xg,Fg=rm,Dg=jm,Lg=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 Pg(this,e,t):new Tg(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Bg=Lg;Lg.default=Lg,Dg.registerProcessor(Lg),Fg.registerProcessor(Lg);let _g=qd,Ug=cf,jg=_f,zg=Dm,Wg=xf,Vg=jm,Gg=Ym;function Zg(e,t){if(Array.isArray(e))return e.map(e=>Zg(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Wg.prototype};r.map&&(r.map={...r.map,__proto__:Ug.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>Zg(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 Vg(s);if("decl"===s.type)return new _g(s);if("rule"===s.type)return new Gg(s);if("comment"===s.type)return new jg(s);if("atrule"===s.type)return new zg(s);throw new Error("Unknown node type: "+e.type)}var Yg=Zg;Zg.default=Zg;let Jg=Dd,$g=qd,Xg=xg,Hg=Kf,Kg=Bg,Qg=Wd,qg=Yg,ey=rm,ty=om,ry=_f,sy=Dm,ny=cm,iy=xf,oy=ng,ay=Wm,ly=Ym,cy=jm,hy=Hd;function uy(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Kg(e)}uy.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 Kg).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return uy([n(r)]).process(e,t)},n},uy.stringify=Qg,uy.parse=oy,uy.fromJSON=qg,uy.list=ay,uy.comment=e=>new ry(e),uy.atRule=e=>new sy(e),uy.decl=e=>new $g(e),uy.rule=e=>new ly(e),uy.root=e=>new cy(e),uy.document=e=>new ey(e),uy.CssSyntaxError=Jg,uy.Declaration=$g,uy.Container=Hg,uy.Processor=Kg,uy.Document=ey,uy.Comment=ry,uy.Warning=ty,uy.AtRule=sy,uy.Result=ny,uy.Input=iy,uy.Rule=ly,uy.Root=cy,uy.Node=hy,Xg.registerPostcss(uy);var py=uy;uy.default=uy;const dy=kd(py);dy.stringify,dy.fromJSON,dy.plugin,dy.parse,dy.list,dy.document,dy.comment,dy.atRule,dy.rule,dy.decl,dy.root,dy.CssSyntaxError,dy.Declaration,dy.Container,dy.Processor,dy.Document,dy.Comment,dy.Warning,dy.AtRule,dy.Result,dy.Input,dy.Rule,dy.Root,dy.Node;class fy{constructor(...e){xd(this,"parentElement",null),xd(this,"parentNode",null),xd(this,"ownerDocument"),xd(this,"firstChild",null),xd(this,"lastChild",null),xd(this,"previousSibling",null),xd(this,"nextSibling",null),xd(this,"ELEMENT_NODE",1),xd(this,"TEXT_NODE",3),xd(this,"nodeType"),xd(this,"nodeName"),xd(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 fy))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 my={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yy={};function wy(e){if(yy[e])return yy[e];const t=globalThis[e],r=t.prototype,s=e in my?my[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 gy?gy[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 yy[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?yy[e]=i:r}catch{return r}}const by={};function vy(e,t,r){var s;const n=`${e}.${String(r)}`;if(by[n])return by[n].call(t);const i=wy(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(by[n]=o,o.call(t)):t[r]}const Sy={};function Cy(e,t,r){const s=`${e}.${String(r)}`;if(Sy[s])return Sy[s].bind(t);const n=wy(e)[r];return"function"!=typeof n?t[r]:(Sy[s]=n,n.bind(t))}const Iy={childNodes:function(e){return vy("Node",e,"childNodes")},parentNode:function(e){return vy("Node",e,"parentNode")},parentElement:function(e){return vy("Node",e,"parentElement")},textContent:function(e){return vy("Node",e,"textContent")},contains:function(e,t){return Cy("Node",e,"contains")(t)},getRootNode:function(e){return Cy("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?vy("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?vy("Element",e,"shadowRoot"):null},querySelector:function(e,t){return vy("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return vy("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return wy("MutationObserver").constructor}};const xy="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 ky={map:{},getId:()=>(console.error(xy),-1),getNode:()=>(console.error(xy),null),removeNodeFromMap(){console.error(xy)},has:()=>(console.error(xy),!1),reset(){console.error(xy)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ky=new Proxy(ky,{get:(e,t,r)=>("map"===t&&console.error(xy),Reflect.get(e,t,r))}));let Oy=Date.now;function My(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Iy.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oy=()=>(new Date).getTime());function Ay(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Iy.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Iy.host(Iy.getRootNode(e))&&(r=Iy.host(Iy.getRootNode(e))),r}function Ey(e){let t,r=e;for(;t=Ay(r);)r=t;return r}function Ry(e){const t=e.ownerDocument;if(!t)return!1;const r=Ey(e);return Iy.contains(t,r)}const Ny=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Sc(this,"id",1),Sc(this,"styleIDMap",new WeakMap),Sc(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++}},get _mirror(){return ky},closestElementOfNode:My,getBaseDimension:function e(t,r){var s,n;const i=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!i||i===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,r),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Ey,getShadowHost:Ay,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(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=Iy.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=Iy.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof fy&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Iy.shadowRoot(e)))},hookSetter:function e(t,r,s,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,r);return i.Object.defineProperty(t,r,n?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(Iy.contains(t,e)||Ry(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Tc.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Tc.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=Iy.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=My(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(Fc(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},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Oy},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(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()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,r(n,i.parent))}else{const e=s.indexOf(i);s.splice(e,0,r(n,null))}continue}if(i in t){const e=t[i];e.children.push(r(n,e));continue}s.push(r(n,null))}return s},shadowHostInDom:Ry,throttle:function(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))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var Ty="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Py="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Fy=0;Fy<64;Fy++)Py[Ty.charCodeAt(Fy)]=Fy;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(yc=e.contentWindow)?void 0:yc.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Dy;new Pc,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Dy||(Dy={}));class Ly{constructor(e){bc(this,"fileName"),bc(this,"functionName"),bc(this,"lineNumber"),bc(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const By=/(^|@)\S+:\d+/,_y=/^\s*at .*(\S+:\d+|\(native\))/m,Uy=/^(eval@)?(\[native code])?$/,jy={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(_y)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(_y)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),i=s.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Ly({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Uy)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Ly({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Ly({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Ly({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Ly({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(By)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ly({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function zy(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function Wy(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vy(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(Wy(e[s])&&Vy(e[s],t-1))return!0;return!1}function Gy(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Wy(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wy(e)&&Vy(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=zy(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Zy={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Yy(e,t,r){const s=r?Object.assign({},Zy,r):Zy,n=s.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,i=jy.parse(n).map(e=>e.toString()),o=[Gy(r,s.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",r),l.push(()=>{t.removeEventListener("error",r)});const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[Gy(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[Gy("Uncaught (in promise)",s.stringifyOptions),Gy(t.reason,s.stringifyOptions)]);const i=jy.parse(r).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const e of s.level)l.push(c(i,e));return()=>{l.forEach(e=>e())};function c(t,r){return t[r]?Ny.patch(t,r,t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=jy.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===r?n.slice(1):n).map(e=>Gy(e,s.stringifyOptions));o++,o<s.lengthThreshold?e({level:r,trace:t,payload:i}):o===s.lengthThreshold&&e({level:"warn",trace:[],payload:[Gy("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}}):()=>{}}}const Jy="https://events.userlens.io",$y=()=>window.localStorage.getItem("$ul_WRITE_CODE"),Xy=async e=>{if(!(null==e?void 0:e.userId))return;const t={type:"identify",userId:e.userId,source:"userlens-js-analytics-sdk",traits:null==e?void 0:e.traits};if(!(await fetch(`${Jy}/event`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(t)})).ok)throw new Error("Userlens HTTP error: failed to identify");return"ok"},Hy=async e=>{const t={events:e};if(!(await fetch("https://raw.userlens.io/raw/event",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(t)})).ok)throw new Error("Userlens HTTP error: failed to track");return"ok"};function Ky(e){window.localStorage.setItem("$ul_WRITE_CODE",btoa(`${e}:`))}var Qy,qy,ew,tw,rw,sw,nw,iw,ow,aw,lw,cw;qy=new WeakMap,nw=new WeakMap,Qy=new WeakSet,ew=function(){this.rrwebStop||(e(this,Qy,"m",sw).call(this),setTimeout(()=>{var t;this.rrwebStop=dc({emit:t=>{e(this,Qy,"m",tw).call(this,t)},maskAllInputs:this.maskingOptions.includes("all"),maskInputOptions:{password:this.maskingOptions.includes("passwords")},plugins:[{name:"rrweb/console@1",observer:Yy,options:t}]})},100),e(this,Qy,"m",iw).call(this))},tw=function(t){const r=Date.now(),s=Number(localStorage.getItem("userlensSessionLastActive"));s&&r-s>this.TIMEOUT&&e(this,Qy,"m",rw).call(this),localStorage.setItem("userlensSessionLastActive",r.toString()),this.sessionEvents.push(t),this.sessionEvents.length>=this.BUFFER_SIZE&&e(this,qy,"f").call(this)},rw=function(){e(this,Qy,"m",cw).call(this),e(this,Qy,"m",sw).call(this)},sw=function(){const e=Number(localStorage.getItem("userlensSessionLastActive")),t=localStorage.getItem("userlensSessionUuid"),r=Date.now(),s=!e||r-e>this.TIMEOUT;!t||s?(this.sessionUuid="10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(Number(e)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Number(e)/4).toString(16)),localStorage.setItem("userlensSessionUuid",this.sessionUuid)):this.sessionUuid=t,localStorage.setItem("userlensSessionLastActive",r.toString())},iw=function(){window.addEventListener("visibilitychange",e(this,nw,"f"))},ow=function(e,t){let r=0;return(...s)=>{const n=Date.now();n-r>=t&&(r=n,e.apply(this,s))}},aw=async function(){var t;const r=null===(t=this.sessionEvents[this.sessionEvents.length-1])||void 0===t?void 0:t.timestamp,s=[...this.sessionEvents];e(this,Qy,"m",lw).call(this);try{await(async(e,t,r,s)=>{const n={userId:e,chunk_timestamp:s,payload:r};if(!(await fetch(`https://sessions.userlens.io/session/${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(n)})).ok)throw new Error("Userlens HTTP error: failed to track");return"ok"})(this.userId,this.sessionUuid,s,r)}catch(t){e(this,Qy,"m",rw).call(this)}},lw=function(){this.sessionEvents=[]},cw=function(){localStorage.removeItem("userlensSessionUuid"),localStorage.removeItem("userlensSessionLastActive")};const hw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},uw={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},pw={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dw={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},fw={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class mw{static getFirstMatch(e,t){const r=t.match(e);return r&&r.length>0&&r[1]||""}static getSecondMatch(e,t){const r=t.match(e);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(e,t,r){if(e.test(t))return r}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,r=!1){const s=mw.getVersionPrecision(e),n=mw.getVersionPrecision(t);let i=Math.max(s,n),o=0;const a=mw.map([e,t],e=>{const t=i-mw.getVersionPrecision(e),r=e+new Array(t+1).join(".0");return mw.map(r.split("."),e=>new Array(20-e.length).join("0")+e).reverse()});for(r&&(o=i-Math.min(s,n)),i-=1;i>=o;){if(a[0][i]>a[1][i])return 1;if(a[0][i]===a[1][i]){if(i===o)return 0;i-=1}else if(a[0][i]<a[1][i])return-1}}static map(e,t){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(s=0;s<e.length;s+=1)r.push(t(e[s]));return r}static find(e,t){let r,s;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,s=e.length;r<s;r+=1){const s=e[r];if(t(s,r))return s}}static assign(e,...t){const r=e;let s,n;if(Object.assign)return Object.assign(e,...t);for(s=0,n=t.length;s<n;s+=1){const e=t[s];if("object"==typeof e&&null!==e){Object.keys(e).forEach(t=>{r[t]=e[t]})}}return e}static getBrowserAlias(e){return hw[e]}static getBrowserTypeByAlias(e){return uw[e]||""}}const gw=/version\/(\d+(\.?_?\d+)+)/i,yw=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},r=mw.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},r=mw.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},r=mw.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},r=mw.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},r=mw.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},r=mw.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},r=mw.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},r=mw.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=mw.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},r=mw.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},r=mw.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},r=mw.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},r=mw.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},r=mw.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},r=mw.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},r=mw.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},r=mw.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},r=mw.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},r=mw.getFirstMatch(gw,e)||mw.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},r=mw.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},r=mw.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},r=mw.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},r=mw.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},r=mw.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},r=mw.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},r=mw.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},r=mw.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},r=mw.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t={name:"Android Browser"},r=mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},r=mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},r=mw.getFirstMatch(gw,e);return r&&(t.version=r),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:mw.getFirstMatch(t,e),version:mw.getSecondMatch(t,e)}}}];var ww=[{test:[/Roku\/DVP/],describe(e){const t=mw.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:dw.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=mw.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:dw.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=mw.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=mw.getWindowsVersionName(t);return{name:dw.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:dw.iOS},r=mw.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe(e){const t=mw.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=mw.getMacOSVersionName(t),s={name:dw.MacOS,version:t};return r&&(s.versionName=r),s}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=mw.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:dw.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t=mw.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=mw.getAndroidVersionName(t),s={name:dw.Android,version:t};return r&&(s.versionName=r),s}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=mw.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:dw.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=mw.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||mw.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||mw.getFirstMatch(/\bbb(\d+)/i,e);return{name:dw.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=mw.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:dw.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=mw.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:dw.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:dw.Linux})},{test:[/CrOS/],describe:()=>({name:dw.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=mw.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:dw.PlayStation4,version:t}}}],bw=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=mw.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:pw.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:pw.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:pw.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:pw.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:pw.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:pw.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:pw.tablet})},{test(e){const t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe(e){const t=mw.getFirstMatch(/(ipod|iphone)/i,e);return{type:pw.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:pw.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:pw.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:pw.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:pw.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:pw.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:pw.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:pw.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:pw.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:pw.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:pw.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:pw.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:pw.tv})}],vw=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:fw.Blink};const t=mw.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:fw.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:fw.Trident},r=mw.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:fw.Presto},r=mw.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe(e){const t={name:fw.Gecko},r=mw.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:fw.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:fw.WebKit},r=mw.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];class Sw{constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=mw.find(yw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=mw.find(ww,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=mw.find(bw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=mw.find(vw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return mw.assign({},this.parsedResult)}satisfies(e){const t={};let r=0;const s={};let n=0;if(Object.keys(e).forEach(i=>{const o=e[i];"string"==typeof o?(s[i]=o,n+=1):"object"==typeof o&&(t[i]=o,r+=1)}),r>0){const e=Object.keys(t),r=mw.find(e,e=>this.isOS(e));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}const s=mw.find(e,e=>this.isPlatform(e));if(s){const e=this.satisfies(t[s]);if(void 0!==e)return e}}if(n>0){const e=Object.keys(s),t=mw.find(e,e=>this.isBrowser(e,!0));if(void 0!==t)return this.compareVersion(s[t])}}isBrowser(e,t=!1){const r=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const n=mw.getBrowserTypeByAlias(s);return t&&n&&(s=n.toLowerCase()),s===r}compareVersion(e){let t=[0],r=e,s=!1;const n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(s=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(s=!0,r=e.substr(1)),t.indexOf(mw.compareVersions(n,r,s))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}}
|
|
1
|
+
"use strict";function e(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)}function t(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError;var r,s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),i=Object.defineProperty,o=(e,t,r)=>((e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),a=(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))(a||{});const l={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},h={};function u(e){if(h[e])return h[e];const t=globalThis[e],r=t.prototype,s=e in l?l[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 c?c[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 h[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?h[e]=i:r}catch{return r}}const p={};function d(e,t,r){var s;const n=`${e}.${String(r)}`;if(p[n])return p[n].call(t);const i=u(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(p[n]=o,o.call(t)):t[r]}const f={};function m(e,t,r){const s=`${e}.${String(r)}`;if(f[s])return f[s].bind(t);const n=u(e)[r];return"function"!=typeof n?t[r]:(f[s]=n,n.bind(t))}const g={childNodes:function(e){return d("Node",e,"childNodes")},parentNode:function(e){return d("Node",e,"parentNode")},parentElement:function(e){return d("Node",e,"parentElement")},textContent:function(e){return d("Node",e,"textContent")},contains:function(e,t){return m("Node",e,"contains")(t)},getRootNode:function(e){return m("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?d("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?d("Element",e,"shadowRoot"):null},querySelector:function(e,t){return d("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return d("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return u("MutationObserver").constructor}};function y(e){return e.nodeType===e.ELEMENT_NODE}function w(e){const t=e&&"host"in e&&"mode"in e&&g.host(e)||null;return Boolean(t&&"shadowRoot"in t&&g.shadowRoot(t)===e)}function b(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function v(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=>S(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 S(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=v(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?T(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?T(r,t):r}}let C=class{constructor(){o(this,"idNodeMap",new Map),o(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 I({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";const a=s&&x(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function x(e){return e.toLowerCase()}const k="__rrweb_original__";function O(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?x(t):null}function M(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 A=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,R=/^www\..*/i,N=/^(data:)([^,]*),(.*)/i;function T(e,t){return(e||"").replace(A,(e,r,s,n,i,o)=>{const a=s||i||o,l=r||n||"";if(!a)return e;if(E.test(a)||R.test(a))return`url(${l}${a}${l})`;if(N.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 c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function P(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function F(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=P(e);for(let n=1;n<r.length;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const i=P(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(P(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 D=1;const L=new RegExp("[^a-z0-9-_:]");function B(){return D++}let _,U;const j=/^[^ \t\n\r\u000c]+/,z=/^[, \t\n\r\u000c]+/;const W=new WeakMap;function V(e,t){return t&&""!==t.trim()?Z(e,t):t}function G(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Z(e,t){let r=W.get(e);if(r||(r=e.createElement("a"),W.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Y(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?V(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(z),!(r>=t.length);){let i=s(j);if(","===i.slice(-1))i=V(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=V(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?T(s,Z(e)):"object"===t&&"data"===r?V(e,s):s:V(e,s):s}function J(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function $(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&$(g.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&$(g.parentNode(e),t,r)}function X(e,t,r,s){let n;if(y(e)){if(n=e,!g.childNodes(n).length)return!1}else{if(null===g.parentElement(e))return!1;n=g.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($(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 H(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:h,maskInputFn:u,dataURLOptions:p={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:w=!1}=t,b=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:a.Document,childNodes:[],compatMode:e.compatMode}:{type:a.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:a.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:c={},inlineImages:h,recordCanvas:u,keepIframeSrcFn:p,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=x(e.tagName);return L.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];J(g,s.name,s.value)||(y[s.name]=Y(r,g,x(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=v(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=v(e.sheet);t&&(e.childNodes.length>1&&(t=F(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=I({element:e,type:O(e),tagName:g,value:t,maskInputOptions:o,maskInputFn:l}):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&&u)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=k in n?n[k]: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(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===g&&h){_||(_=r.createElement("canvas"),U=_.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{_.width=t.naturalWidth,_.height=t.naturalHeight,U.drawImage(t,0,0),y.rr_dataURL=_.toDataURL(c.type,c.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||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:a.Element,tagName:g,attributes:y,childNodes:[],isSVG:G(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,o=g.parentNode(e),l=o&&o.tagName;let c="";const h="STYLE"===l||void 0,u="SCRIPT"===l||void 0;u?c="SCRIPT_PLACEHOLDER":i||(c=g.textContent(e),h&&c&&(c=T(c,Z(t.doc))));!h&&!u&&c&&r&&(c=s?s(c,g.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:a.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:h,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:a.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:a.Comment,textContent:g.textContent(e)||"",rootId:b};default:return!1}}function K(e){return null==e?"":e.toLowerCase()}function Q(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:S=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:E=!1,cssCaptured:R=!1}=t;let{needsMask:N}=t,{preserveWhiteSpace:T=!0}=t;if(!N){N=X(e,o,l,void 0===N)}const P=H(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,dataURLOptions:m,inlineImages:v,recordCanvas:S,keepIframeSrcFn:A,newlyAddedElement:E,cssCaptured:R});if(!P)return console.warn(e,"not serialized"),null;let F;F=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===a.Comment)return!0;if(e.type===a.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"===M(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}(P,f)||!T&&P.type===a.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?-2:B();const D=Object.assign(P,{id:F});if(s.add(e,D),-2===F)return null;C&&C(e);let L=!c;if(D.type===a.Element){L=L&&!D.needBlock,delete D.needBlock;const t=g.shadowRoot(e);t&&b(t)&&(D.isShadowHost=!0)}if((D.type===a.Document||D.type===a.Element)&&L){f.headWhitespace&&D.type===a.Element&&"head"===D.tagName&&(T=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:c,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A,cssCaptured:!1};if(D.type===a.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else{D.type===a.Element&&void 0!==D.attributes._cssText&&"string"==typeof D.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(g.childNodes(e))){const e=Q(r,t);e&&D.childNodes.push(e)}}let w=null;if(y(e)&&(w=g.shadowRoot(e)))for(const e of Array.from(g.childNodes(w))){const r=Q(e,t);r&&(b(w)&&(r.isShadow=!0),D.childNodes.push(r))}}const _=g.parentNode(e);return _&&w(_)&&b(_)&&(D.isShadow=!0),D.type===a.Element&&"iframe"===D.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&&I){const r=Q(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A});r&&I(e,r)}},x),D.type===a.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===M(D.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(k){const t=Q(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:A});t&&k(e,t)}},O),D}function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ee(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 te={exports:{}},re=String,se=function(){return{isColorSupported:!1,reset:re,bold:re,dim:re,italic:re,underline:re,inverse:re,hidden:re,strikethrough:re,black:re,red:re,green:re,yellow:re,blue:re,magenta:re,cyan:re,white:re,gray:re,bgBlack:re,bgRed:re,bgGreen:re,bgYellow:re,bgBlue:re,bgMagenta:re,bgCyan:re,bgWhite:re}};te.exports=se(),te.exports.createColors=se;var ne=te.exports;const ie=ee(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let oe=ne,ae=ie,le=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=oe.isColorSupported),ae&&e&&(t=ae(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}=oe.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 ce=le;le.default=le;var he={};he.isClean=Symbol("isClean"),he.my=Symbol("my");const ue={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let pe=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 ue[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=ue[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 de=pe;pe.default=pe;let fe=de;function me(e,t){new fe(t).stringify(e)}var ge=me;me.default=me;let{isClean:ye,my:we}=he,be=ce,ve=de,Se=ge;function Ce(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=>Ce(e,r)):("object"===i&&null!==n&&(n=Ce(n)),r[s]=n)}return r}let Ie=class{constructor(e={}){this.raws={},this[ye]=!1,this[we]=!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=Ce(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 be(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[ye]){this[ye]=!1;let e=this;for(;e=e.parent;)e[ye]=!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 ve).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=Se){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 xe=Ie;Ie.default=Ie;let ke=xe,Oe=class extends ke{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 Me=Oe;Oe.default=Oe;var Ae={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ee,SourceMapGenerator:Re}=ie,{existsSync:Ne,readFileSync:Te}=ie,{dirname:Pe,join:Fe}=ie;let De=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=Pe(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ee(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=Pe(e),Ne(e))return this.mapFile=e,Te(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 Ee)return Re.fromSourceMap(t).toString();if(t instanceof Re)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=Fe(Pe(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 Le=De;De.default=De;let{SourceMapConsumer:Be,SourceMapGenerator:_e}=ie,{fileURLToPath:Ue,pathToFileURL:je}=ie,{isAbsolute:ze,resolve:We}=ie,{nanoid:Ve}=Ae,Ge=ie,Ze=ce,Ye=Le,Je=Symbol("fromOffsetCache"),$e=Boolean(Be&&_e),Xe=Boolean(We&&ze),He=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&&(!Xe||/^\w+:\/\//.test(t.from)||ze(t.from)?this.file=t.from:this.file=We(t.from)),Xe&&$e){let e=new Ye(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 "+Ve(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 Ze(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 Ze(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&&(je&&(n.input.url=je(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Je])r=this[Je];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[Je]=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:We(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=ze(a.source)?je(a.source):new URL(a.source,this.map.consumer().sourceRoot||je(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(!Ue)throw new Error("file: protocol is not available in this PostCSS build");l.file=Ue(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Ke=He;He.default=He,Ge&&Ge.registerInput&&Ge.registerInput(He);let{SourceMapConsumer:Qe,SourceMapGenerator:qe}=ie,{dirname:et,relative:tt,resolve:rt,sep:st}=ie,{pathToFileURL:nt}=ie,it=Ke,ot=Boolean(Qe&&qe),at=Boolean(et&&rt&&tt&&st);var lt=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||et(e.file);!1===this.mapOpts.sourcesContent?(t=new Qe(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(),at&&ot&&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=qe.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new qe({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 qe({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?et(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=et(rt(r,this.mapOpts.annotation)));let s=tt(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 it(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(nt){let t=nt(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;"\\"===st&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ct=xe,ht=class extends ct{constructor(e){super(e),this.type="comment"}};var ut=ht;ht.default=ht;let pt,dt,ft,mt,{isClean:gt,my:yt}=he,wt=Me,bt=ut,vt=xe;function St(e){return e.map(e=>(e.nodes&&(e.nodes=St(e.nodes)),delete e.source,e))}function Ct(e){if(e[gt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ct(t)}let It=class e extends vt{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=St(pt(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 wt(t)]}else if(t.selector)t=[new dt(t)];else if(t.name)t=[new ft(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new bt(t)]}return t.map(t=>(t[yt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[gt]&&Ct(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]}};It.registerParse=e=>{pt=e},It.registerRule=e=>{dt=e},It.registerAtRule=e=>{ft=e},It.registerRoot=e=>{mt=e};var xt=It;It.default=It,It.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ft.prototype):"rule"===e.type?Object.setPrototypeOf(e,dt.prototype):"decl"===e.type?Object.setPrototypeOf(e,wt.prototype):"comment"===e.type?Object.setPrototypeOf(e,bt.prototype):"root"===e.type&&Object.setPrototypeOf(e,mt.prototype),e[yt]=!0,e.nodes&&e.nodes.forEach(e=>{It.rebuild(e)})};let kt,Ot,Mt=xt,At=class extends Mt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new kt(new Ot,this,e).stringify()}};At.registerLazyResult=e=>{kt=e},At.registerProcessor=e=>{Ot=e};var Et=At;At.default=At;let Rt={};var Nt=function(e){Rt[e]||(Rt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Tt=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 Pt=Tt;Tt.default=Tt;let Ft=Pt,Dt=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 Ft(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Lt=Dt;Dt.default=Dt;const Bt="'".charCodeAt(0),_t='"'.charCodeAt(0),Ut="\\".charCodeAt(0),jt="/".charCodeAt(0),zt="\n".charCodeAt(0),Wt=" ".charCodeAt(0),Vt="\f".charCodeAt(0),Gt="\t".charCodeAt(0),Zt="\r".charCodeAt(0),Yt="[".charCodeAt(0),Jt="]".charCodeAt(0),$t="(".charCodeAt(0),Xt=")".charCodeAt(0),Ht="{".charCodeAt(0),Kt="}".charCodeAt(0),Qt=";".charCodeAt(0),qt="*".charCodeAt(0),er=":".charCodeAt(0),tr="@".charCodeAt(0),rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,nr=/.[\r\n"'(/\\]/,ir=/[\da-f]/i;let or=xt,ar=class extends or{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 lr=ar;ar.default=ar,or.registerAtRule(ar);let cr,hr,ur=xt,pr=class extends ur{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 cr(new hr,this,e).stringify()}};pr.registerLazyResult=e=>{cr=e},pr.registerProcessor=e=>{hr=e};var dr=pr;pr.default=pr,ur.registerRoot(pr);let fr={comma:e=>fr.split(e,[","],!0),space:e=>fr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 mr=fr;fr.default=fr;let gr=xt,yr=mr,wr=class extends gr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yr.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 br=wr;wr.default=wr,gr.registerRule(wr);let vr=Me,Sr=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case zt:case Wt:case Gt:case Zt:case Vt:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Wt||r===zt||r===Gt||r===Zt||r===Vt);u=["space",p.slice(m,s)],m=s-1;break;case Yt:case Jt:case Ht:case Kt:case er:case Qt:case Xt:{let e=String.fromCharCode(r);u=[e,e,m];break}case $t:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Bt&&h!==_t&&h!==Wt&&h!==zt&&h!==Gt&&h!==Vt&&h!==Zt){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Ut;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||nr.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Bt:case _t:n=r===Bt?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Ut;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case tr:rr.lastIndex=m+1,rr.test(p),s=0===rr.lastIndex?p.length-1:rr.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ut:for(s=m,o=!0;p.charCodeAt(s+1)===Ut;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==jt&&r!==Wt&&r!==zt&&r!==Gt&&r!==Zt&&r!==Vt&&(s+=1,ir.test(p.charAt(s)))){for(;ir.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Wt&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===jt&&p.charCodeAt(m+1)===qt?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(sr.lastIndex=m+1,sr.test(p),s=0===sr.lastIndex?p.length-1:sr.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Cr=ut,Ir=lr,xr=dr,kr=br;const Or={empty:!0,space:!0};let Mr=xt,Ar=class{constructor(e){this.input=e,this.root=new xr,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 Ir;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 Cr;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=Sr(this.input)}decl(e,t){let r=new vr;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 kr;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,c="",h=!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",Or[a]||Or[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new kr;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})}},Er=Ke;function Rr(e,t){let r=new Er(e,t),s=new Ar(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 Nr=Rr;Rr.default=Rr,Mr.registerParse(Rr);let{isClean:Tr,my:Pr}=he,Fr=lt,Dr=ge,Lr=xt,Br=Et,_r=Nt,Ur=Lt,jr=Nr,zr=dr;const Wr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Vr={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},Gr={Once:!0,postcssPlugin:!0,prepare:!0};function Zr(e){return"object"==typeof e&&"function"==typeof e.then}function Yr(e){let t=!1,r=Wr[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 Jr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Yr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function $r(e){return e[Tr]=!1,e.nodes&&e.nodes.forEach(e=>$r(e)),e}let Xr={},Hr=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 Ur)n=$r(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=jr;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[Pr]&&Lr.rebuild(n)}else n=$r(r);this.result=new Ur(t,n,s),this.helpers={...Xr,postcss:Xr,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(!Vr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gr[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(Zr(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Tr];){e[Tr]=!0;let t=[Jr(e)];for(;t.length>0;){let e=this.visitTick(t);if(Zr(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 Zr(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=Dr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fr(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(Zr(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Tr];)e[Tr]=!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||_r("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(Zr(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[Tr])return s[Tr]=!0,void e.push(Jr(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[Tr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Tr]=!0;let t=Yr(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Tr]||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"}};Hr.registerPostcss=e=>{Xr=e};var Kr=Hr;Hr.default=Hr,zr.registerLazyResult(Hr),Br.registerLazyResult(Hr);let Qr=lt,qr=ge,es=Nt,ts=Nr;const rs=Lt;let ss=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=qr;this.result=new rs(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Qr(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||es("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=ts;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 ns=ss;ss.default=ss;let is=ns,os=Kr,as=Et,ls=dr,cs=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 os(this,e,t):new is(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var hs=cs;cs.default=cs,ls.registerProcessor(cs),as.registerProcessor(cs);let us=Me,ps=Le,ds=ut,fs=lr,ms=Ke,gs=dr,ys=br;function ws(e,t){if(Array.isArray(e))return e.map(e=>ws(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ms.prototype};r.map&&(r.map={...r.map,__proto__:ps.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ws(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 gs(s);if("decl"===s.type)return new us(s);if("rule"===s.type)return new ys(s);if("comment"===s.type)return new ds(s);if("atrule"===s.type)return new fs(s);throw new Error("Unknown node type: "+e.type)}var bs=ws;ws.default=ws;let vs=ce,Ss=Me,Cs=Kr,Is=xt,xs=hs,ks=ge,Os=bs,Ms=Et,As=Pt,Es=ut,Rs=lr,Ns=Lt,Ts=Ke,Ps=Nr,Fs=mr,Ds=br,Ls=dr,Bs=xe;function _s(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new xs(e)}_s.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 xs).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return _s([n(r)]).process(e,t)},n},_s.stringify=ks,_s.parse=Ps,_s.fromJSON=Os,_s.list=Fs,_s.comment=e=>new Es(e),_s.atRule=e=>new Rs(e),_s.decl=e=>new Ss(e),_s.rule=e=>new Ds(e),_s.root=e=>new Ls(e),_s.document=e=>new Ms(e),_s.CssSyntaxError=vs,_s.Declaration=Ss,_s.Container=Is,_s.Processor=xs,_s.Document=Ms,_s.Comment=Es,_s.Warning=As,_s.AtRule=Rs,_s.Result=Ns,_s.Input=Ts,_s.Rule=Ds,_s.Root=Ls,_s.Node=Bs,Cs.registerPostcss(_s);var Us=_s;_s.default=_s;const js=q(Us);js.stringify,js.fromJSON,js.plugin,js.parse,js.list,js.document,js.comment,js.atRule,js.rule,js.decl,js.root,js.CssSyntaxError,js.Declaration,js.Container,js.Processor,js.Document,js.Comment,js.Warning,js.AtRule,js.Result,js.Input,js.Rule,js.Root,js.Node;var zs=Object.defineProperty,Ws=(e,t,r)=>((e,t,r)=>t in e?zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Vs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gs(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 Zs={exports:{}},Ys=String,Js=function(){return{isColorSupported:!1,reset:Ys,bold:Ys,dim:Ys,italic:Ys,underline:Ys,inverse:Ys,hidden:Ys,strikethrough:Ys,black:Ys,red:Ys,green:Ys,yellow:Ys,blue:Ys,magenta:Ys,cyan:Ys,white:Ys,gray:Ys,bgBlack:Ys,bgRed:Ys,bgGreen:Ys,bgYellow:Ys,bgBlue:Ys,bgMagenta:Ys,bgCyan:Ys,bgWhite:Ys}};Zs.exports=Js(),Zs.exports.createColors=Js;var $s=Zs.exports;const Xs=Gs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Hs=$s,Ks=Xs,Qs=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=Hs.isColorSupported),Ks&&e&&(t=Ks(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}=Hs.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 qs=Qs;Qs.default=Qs;var en={};en.isClean=Symbol("isClean"),en.my=Symbol("my");const tn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let rn=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 tn[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=tn[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 sn=rn;rn.default=rn;let nn=sn;function on(e,t){new nn(t).stringify(e)}var an=on;on.default=on;let{isClean:ln,my:cn}=en,hn=qs,un=sn,pn=an;function dn(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=>dn(e,r)):("object"===i&&null!==n&&(n=dn(n)),r[s]=n)}return r}let fn=class{constructor(e={}){this.raws={},this[ln]=!1,this[cn]=!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=dn(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 hn(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[ln]){this[ln]=!1;let e=this;for(;e=e.parent;)e[ln]=!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 un).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=pn){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 mn=fn;fn.default=fn;let gn=mn,yn=class extends gn{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 wn=yn;yn.default=yn;var bn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:vn,SourceMapGenerator:Sn}=Xs,{existsSync:Cn,readFileSync:In}=Xs,{dirname:xn,join:kn}=Xs;let On=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=xn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new vn(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=xn(e),Cn(e))return this.mapFile=e,In(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 vn)return Sn.fromSourceMap(t).toString();if(t instanceof Sn)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=kn(xn(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 Mn=On;On.default=On;let{SourceMapConsumer:An,SourceMapGenerator:En}=Xs,{fileURLToPath:Rn,pathToFileURL:Nn}=Xs,{isAbsolute:Tn,resolve:Pn}=Xs,{nanoid:Fn}=bn,Dn=Xs,Ln=qs,Bn=Mn,_n=Symbol("fromOffsetCache"),Un=Boolean(An&&En),jn=Boolean(Pn&&Tn),zn=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&&(!jn||/^\w+:\/\//.test(t.from)||Tn(t.from)?this.file=t.from:this.file=Pn(t.from)),jn&&Un){let e=new Bn(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 "+Fn(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 Ln(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 Ln(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&&(Nn&&(n.input.url=Nn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[_n])r=this[_n];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[_n]=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:Pn(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=Tn(a.source)?Nn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Nn(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(!Rn)throw new Error("file: protocol is not available in this PostCSS build");l.file=Rn(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Wn=zn;zn.default=zn,Dn&&Dn.registerInput&&Dn.registerInput(zn);let{SourceMapConsumer:Vn,SourceMapGenerator:Gn}=Xs,{dirname:Zn,relative:Yn,resolve:Jn,sep:$n}=Xs,{pathToFileURL:Xn}=Xs,Hn=Wn,Kn=Boolean(Vn&&Gn),Qn=Boolean(Zn&&Jn&&Yn&&$n);var qn=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||Zn(e.file);!1===this.mapOpts.sourcesContent?(t=new Vn(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(),Qn&&Kn&&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=Gn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Gn({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 Gn({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?Zn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Zn(Jn(r,this.mapOpts.annotation)));let s=Yn(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 Hn(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(Xn){let t=Xn(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;"\\"===$n&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ei=mn,ti=class extends ei{constructor(e){super(e),this.type="comment"}};var ri=ti;ti.default=ti;let si,ni,ii,oi,{isClean:ai,my:li}=en,ci=wn,hi=ri,ui=mn;function pi(e){return e.map(e=>(e.nodes&&(e.nodes=pi(e.nodes)),delete e.source,e))}function di(e){if(e[ai]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)di(t)}let fi=class e extends ui{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=pi(si(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 ci(t)]}else if(t.selector)t=[new ni(t)];else if(t.name)t=[new ii(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new hi(t)]}return t.map(t=>(t[li]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[ai]&&di(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]}};fi.registerParse=e=>{si=e},fi.registerRule=e=>{ni=e},fi.registerAtRule=e=>{ii=e},fi.registerRoot=e=>{oi=e};var mi=fi;fi.default=fi,fi.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ii.prototype):"rule"===e.type?Object.setPrototypeOf(e,ni.prototype):"decl"===e.type?Object.setPrototypeOf(e,ci.prototype):"comment"===e.type?Object.setPrototypeOf(e,hi.prototype):"root"===e.type&&Object.setPrototypeOf(e,oi.prototype),e[li]=!0,e.nodes&&e.nodes.forEach(e=>{fi.rebuild(e)})};let gi,yi,wi=mi,bi=class extends wi{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new gi(new yi,this,e).stringify()}};bi.registerLazyResult=e=>{gi=e},bi.registerProcessor=e=>{yi=e};var vi=bi;bi.default=bi;let Si={};var Ci=function(e){Si[e]||(Si[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Ii=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 xi=Ii;Ii.default=Ii;let ki=xi,Oi=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 ki(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Mi=Oi;Oi.default=Oi;const Ai="'".charCodeAt(0),Ei='"'.charCodeAt(0),Ri="\\".charCodeAt(0),Ni="/".charCodeAt(0),Ti="\n".charCodeAt(0),Pi=" ".charCodeAt(0),Fi="\f".charCodeAt(0),Di="\t".charCodeAt(0),Li="\r".charCodeAt(0),Bi="[".charCodeAt(0),_i="]".charCodeAt(0),Ui="(".charCodeAt(0),ji=")".charCodeAt(0),zi="{".charCodeAt(0),Wi="}".charCodeAt(0),Vi=";".charCodeAt(0),Gi="*".charCodeAt(0),Zi=":".charCodeAt(0),Yi="@".charCodeAt(0),Ji=/[\t\n\f\r "#'()/;[\\\]{}]/g,$i=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xi=/.[\r\n"'(/\\]/,Hi=/[\da-f]/i;let Ki=mi,Qi=class extends Ki{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 qi=Qi;Qi.default=Qi,Ki.registerAtRule(Qi);let eo,to,ro=mi,so=class extends ro{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 eo(new to,this,e).stringify()}};so.registerLazyResult=e=>{eo=e},so.registerProcessor=e=>{to=e};var no=so;so.default=so,ro.registerRoot(so);let io={comma:e=>io.split(e,[","],!0),space:e=>io.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 oo=io;io.default=io;let ao=mi,lo=oo,co=class extends ao{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return lo.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 ho=co;co.default=co,ao.registerRule(co);let uo=wn,po=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case Ti:case Pi:case Di:case Li:case Fi:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Pi||r===Ti||r===Di||r===Li||r===Fi);u=["space",p.slice(m,s)],m=s-1;break;case Bi:case _i:case zi:case Wi:case Zi:case Vi:case ji:{let e=String.fromCharCode(r);u=[e,e,m];break}case Ui:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Ai&&h!==Ei&&h!==Pi&&h!==Ti&&h!==Di&&h!==Fi&&h!==Li){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Ri;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||Xi.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Ai:case Ei:n=r===Ai?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Ri;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Yi:Ji.lastIndex=m+1,Ji.test(p),s=0===Ji.lastIndex?p.length-1:Ji.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ri:for(s=m,o=!0;p.charCodeAt(s+1)===Ri;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==Ni&&r!==Pi&&r!==Ti&&r!==Di&&r!==Li&&r!==Fi&&(s+=1,Hi.test(p.charAt(s)))){for(;Hi.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Pi&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Ni&&p.charCodeAt(m+1)===Gi?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):($i.lastIndex=m+1,$i.test(p),s=0===$i.lastIndex?p.length-1:$i.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},fo=ri,mo=qi,go=no,yo=ho;const wo={empty:!0,space:!0};let bo=mi,vo=class{constructor(e){this.input=e,this.root=new go,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 mo;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 fo;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=po(this.input)}decl(e,t){let r=new uo;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 yo;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,c="",h=!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",wo[a]||wo[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new yo;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})}},So=Wn;function Co(e,t){let r=new So(e,t),s=new vo(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 Io=Co;Co.default=Co,bo.registerParse(Co);let{isClean:xo,my:ko}=en,Oo=qn,Mo=an,Ao=mi,Eo=vi,Ro=Ci,No=Mi,To=Io,Po=no;const Fo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Do={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},Lo={Once:!0,postcssPlugin:!0,prepare:!0};function Bo(e){return"object"==typeof e&&"function"==typeof e.then}function _o(e){let t=!1,r=Fo[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 Uo(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:_o(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function jo(e){return e[xo]=!1,e.nodes&&e.nodes.forEach(e=>jo(e)),e}let zo={},Wo=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 No)n=jo(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=To;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[ko]&&Ao.rebuild(n)}else n=jo(r);this.result=new No(t,n,s),this.helpers={...zo,postcss:zo,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(!Do[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lo[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(Bo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xo];){e[xo]=!0;let t=[Uo(e)];for(;t.length>0;){let e=this.visitTick(t);if(Bo(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 Bo(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=Mo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Oo(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(Bo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xo];)e[xo]=!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||Ro("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(Bo(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[xo])return s[xo]=!0,void e.push(Uo(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[xo]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[xo]=!0;let t=_o(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[xo]||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"}};Wo.registerPostcss=e=>{zo=e};var Vo=Wo;Wo.default=Wo,Po.registerLazyResult(Wo),Eo.registerLazyResult(Wo);let Go=qn,Zo=an,Yo=Ci,Jo=Io;const $o=Mi;let Xo=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=Zo;this.result=new $o(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Go(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||Yo("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=Jo;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 Ho=Xo;Xo.default=Xo;let Ko=Ho,Qo=Vo,qo=vi,ea=no,ta=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 Qo(this,e,t):new Ko(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ra=ta;ta.default=ta,ea.registerProcessor(ta),qo.registerProcessor(ta);let sa=wn,na=Mn,ia=ri,oa=qi,aa=Wn,la=no,ca=ho;function ha(e,t){if(Array.isArray(e))return e.map(e=>ha(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:aa.prototype};r.map&&(r.map={...r.map,__proto__:na.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ha(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 la(s);if("decl"===s.type)return new sa(s);if("rule"===s.type)return new ca(s);if("comment"===s.type)return new ia(s);if("atrule"===s.type)return new oa(s);throw new Error("Unknown node type: "+e.type)}var ua=ha;ha.default=ha;let pa=qs,da=wn,fa=Vo,ma=mi,ga=ra,ya=an,wa=ua,ba=vi,va=xi,Sa=ri,Ca=qi,Ia=Mi,xa=Wn,ka=Io,Oa=oo,Ma=ho,Aa=no,Ea=mn;function Ra(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ga(e)}Ra.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 ga).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ra([n(r)]).process(e,t)},n},Ra.stringify=ya,Ra.parse=ka,Ra.fromJSON=wa,Ra.list=Oa,Ra.comment=e=>new Sa(e),Ra.atRule=e=>new Ca(e),Ra.decl=e=>new da(e),Ra.rule=e=>new Ma(e),Ra.root=e=>new Aa(e),Ra.document=e=>new ba(e),Ra.CssSyntaxError=pa,Ra.Declaration=da,Ra.Container=ma,Ra.Processor=ga,Ra.Document=ba,Ra.Comment=Sa,Ra.Warning=va,Ra.AtRule=Ca,Ra.Result=Ia,Ra.Input=xa,Ra.Rule=Ma,Ra.Root=Aa,Ra.Node=Ea,fa.registerPostcss(Ra);var Na=Ra;Ra.default=Ra;const Ta=Vs(Na);Ta.stringify,Ta.fromJSON,Ta.plugin,Ta.parse,Ta.list,Ta.document,Ta.comment,Ta.atRule,Ta.rule,Ta.decl,Ta.root,Ta.CssSyntaxError,Ta.Declaration,Ta.Container,Ta.Processor,Ta.Document,Ta.Comment,Ta.Warning,Ta.AtRule,Ta.Result,Ta.Input,Ta.Rule,Ta.Root,Ta.Node;let Pa=class e{constructor(...e){Ws(this,"parentElement",null),Ws(this,"parentNode",null),Ws(this,"ownerDocument"),Ws(this,"firstChild",null),Ws(this,"lastChild",null),Ws(this,"previousSibling",null),Ws(this,"nextSibling",null),Ws(this,"ELEMENT_NODE",1),Ws(this,"TEXT_NODE",3),Ws(this,"nodeType"),Ws(this,"nodeName"),Ws(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(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 Fa={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Da={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},La={};function Ba(e){if(La[e])return La[e];const t=globalThis[e],r=t.prototype,s=e in Fa?Fa[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 Da?Da[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 La[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?La[e]=i:r}catch{return r}}const _a={};function Ua(e,t,r){var s;const n=`${e}.${String(r)}`;if(_a[n])return _a[n].call(t);const i=Ba(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(_a[n]=o,o.call(t)):t[r]}const ja={};function za(e,t,r){const s=`${e}.${String(r)}`;if(ja[s])return ja[s].bind(t);const n=Ba(e)[r];return"function"!=typeof n?t[r]:(ja[s]=n,n.bind(t))}function Wa(){return Ba("MutationObserver").constructor}const Va={childNodes:function(e){return Ua("Node",e,"childNodes")},parentNode:function(e){return Ua("Node",e,"parentNode")},parentElement:function(e){return Ua("Node",e,"parentElement")},textContent:function(e){return Ua("Node",e,"textContent")},contains:function(e,t){return za("Node",e,"contains")(t)},getRootNode:function(e){return za("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ua("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ua("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ua("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ua("Element",e,"querySelectorAll")(t)},mutationObserver:Wa};function Ga(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Za="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 Ya={map:{},getId:()=>(console.error(Za),-1),getNode:()=>(console.error(Za),null),removeNodeFromMap(){console.error(Za)},has:()=>(console.error(Za),!1),reset(){console.error(Za)}};function Ja(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 $a(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)}}),()=>$a(e,t,i||{},!0)}function Xa(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&&(Ya=new Proxy(Ya,{get:(e,t,r)=>("map"===t&&console.error(Za),Reflect.get(e,t,r))}));let Ha=Date.now;function Ka(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=Va.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=Va.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Qa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function el(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Va.parentElement(e)}function tl(e,t,r,s){if(!e)return!1;const n=el(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($(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 rl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function sl(e,t){if(w(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Va.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||sl(s,t))}function nl(e){return Boolean(e.changedTouches)}function il(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ol(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function al(e){return!!e&&(e instanceof Pa&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Va.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ha=()=>(new Date).getTime());let ll=class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(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 cl(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Va.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Va.host(Va.getRootNode(e))&&(r=Va.host(Va.getRootNode(e))),r}function hl(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=cl(r);)r=t;return r}(e);return Va.contains(t,r)}function ul(e){const t=e.ownerDocument;return!!t&&(Va.contains(t,e)||hl(e))}var pl=(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))(pl||{}),dl=(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))(dl||{}),fl=(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))(fl||{}),ml=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ml||{}),gl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(gl||{}),yl=(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))(yl||{}),wl=(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))(wl||{});function bl(e){return"__ln"in e}class vl{constructor(){n(this,"length",0),n(this,"head",null),n(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&&bl(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&&bl(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 Sl=(e,t)=>`${e}@${t}`;class Cl{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"removesSubTreeCache",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),n(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new vl,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=Va.parentNode(n);if(!i||!ul(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=w(i)?this.mirror.getId(cl(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=Q(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=>{il(e,this.mirror)&&this.iframeManager.addIframe(e),ol(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),al(n)&&this.shadowDomManager.addShadowRoot(Va.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});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)xl(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Va.parentNode(e))||n(e);for(const e of this.addedSet)kl(this.droppedSet,e)||xl(this.removesSubTreeCache,e,this.mirror)?kl(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(Va.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(Va.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Va.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Va.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=Va.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))}),n(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(Va.childNodes(e),e=>Va.textContent(e)||"").join("")}),n(this,"processMutation",e=>{if(!rl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Va.textContent(e.target);tl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:X(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,el(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=O(t);s=I({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(tl(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"),!J(t.tagName,r))if(n.attributes[r]=Y(this.doc,x(t.tagName),x(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(tl(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=w(e.target)?this.mirror.getId(Va.host(e.target)):this.mirror.getId(e.target);tl(e.target,this.blockClass,this.blockSelector,!1)||rl(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Il(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||sl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Sl(r,s)]?Il(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!w(e.target)||!b(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Va.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),n(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(rl(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[Sl(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);tl(e,this.blockClass,this.blockSelector,!1)||(Va.childNodes(e).forEach(e=>this.genAdds(e)),al(e)&&Va.childNodes(Va.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 Il(e,t){e.delete(t),Va.childNodes(t).forEach(t=>Il(e,t))}function xl(e,t,r){return 0!==e.size&&function(e,t){const r=Va.parentNode(t);return!!r&&e.has(r)}(e,t)}function kl(e,t){return 0!==e.size&&Ol(e,t)}function Ol(e,t){const r=Va.parentNode(t);return!!r&&(!!e.has(r)||Ol(e,r))}let Ml;const Al=e=>{if(!Ml)return e;return(...t)=>{try{return e(...t)}catch(e){if(Ml&&!0===Ml(e))return;throw e}}},El=[];function Rl(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 Nl(e,t){const r=new Cl;El.push(r),r.init(e);const s=new(Wa())(Al(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Tl({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(fl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=x(i);const c=(t=>i=>{const o=Rl(i);if(tl(o,s,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=ml.Mouse;break;case"touch":a=ml.Touch;break;case"pen":a=ml.Pen}a===ml.Touch?fl[t]===fl.MouseDown?c="TouchStart":fl[t]===fl.MouseUp&&(c="TouchEnd"):ml.Pen}else nl(i)&&(a=ml.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===ml.Touch||c.startsWith("Mouse")&&a===ml.Mouse)&&(a=null)):fl[t]===fl.Click&&(a=l,l=null);const h=nl(i)?i.changedTouches[0]:i;if(!h)return;const u=r.getId(o),{clientX:p,clientY:d}=h;Al(e)({type:fl[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(fl[i]){case fl.MouseDown:case fl.MouseUp:o=o.replace("mouse","pointer");break;case fl.TouchStart:case fl.TouchEnd:return}a.push(Ga(o,c,t))}),Al(()=>{a.forEach(e=>e())})}function Pl({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return Ga("scroll",Al(Ja(Al(i=>{const o=Rl(i);if(!o||tl(o,s,n,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=Ka(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 Fl=["INPUT","TEXTAREA","SELECT"],Dl=new WeakMap;function Ll(e){return function(e,t){if(jl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||jl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||jl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||jl("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 Bl(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function _l({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(Va.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}}),Al(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function Ul(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:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,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),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Nl(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=Ja(Al(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),c=Al(Ja(Al(e=>{const t=Rl(e),{clientX:r,clientY:n}=nl(e)?e.changedTouches[0]:e;o||(o=Ha()),a.push({x:r,y:n,id:s.getId(t),timeOffset:Ha()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?dl.Drag:e instanceof MouseEvent?dl.MouseMove:dl.TouchMove)}),n,{trailing:!1})),h=[Ga("mousemove",c,r),Ga("touchmove",c,r),Ga("drag",c,r)];return Al(()=>{h.forEach(e=>e())})}(e),i=Tl(e),o=Pl(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Ga("resize",Al(Ja(Al(()=>{const t=Qa(),n=qa();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:c,userTriggeredOnInput:h}){function u(e){let r=Rl(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=Va.parentElement(r)),!r||!u||Fl.indexOf(u)<0||tl(r,s,n,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let d=r.value,f=!1;const m=O(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(d=I({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(r,h?{text:d,isChecked:f,userTriggered:c}:{text:d,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;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){const n=Dl.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Dl.set(t,s);const n=r.getId(t);Al(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Ga(e,Al(u),t)),f=t.defaultView;if(!f)return()=>{d.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&&d.push(...g.map(e=>$a(e[0],e[1],{set(){Al(u)({target:this,isTrusted:!1})}},!1,f))),Al(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){const o=Al(i=>Ja(Al(n=>{const o=Rl(n);if(!o||tl(o,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Ga("play",o(yl.Play),i),Ga("pause",o(yl.Pause),i),Ga("seeked",o(yl.Seeked),i),Ga("volumechange",o(yl.VolumeChange),i),Ga("ratechange",o(yl.RateChange),i)];return Al(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=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:Al((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=Bl(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(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:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));const l={};zl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(zl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),zl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),zl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:Al((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=Bl(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...Ll(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:Al((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Bl(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Ll(n),o]}]}),s.apply(n,i)})})}),Al(()=>{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=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=_l(e,e.doc),p=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:Al((n,o,a)=>{var l;const[c,h,u]=a;if(r.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=Bl(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:Ll(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Al((n,i,a)=>{var l;const[c]=a;if(r.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=Bl(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:Ll(i.parentRule)}),n.apply(i,a)})}),Al(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(d=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=Xa(t.fonts,"add",function(t){return function(r){return setTimeout(Al(()=>{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),Al(()=>{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=Al(()=>{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:c,endOffset:h}=i;tl(o,s,n,!0)||tl(c,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(c),endOffset:h})}i({ranges:a})});return a(),Ga("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Xa(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 Al(()=>{El.forEach(e=>e.reset()),null==s||s.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function jl(e){return void 0!==window[e]}function zl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Wl{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(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 Vl{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new Wl(B)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wl(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 pl.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:pl.IncrementalSnapshot,data:{source:dl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case pl.Meta:case pl.Load:case pl.DomContentLoaded:return!1;case pl.Plugin:return t;case pl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case pl.IncrementalSnapshot:switch(t.data.source){case dl.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 dl.Drag:case dl.TouchMove:case dl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case dl.ViewportResize:return!1;case dl.MediaInteraction:case dl.MouseInteraction:case dl.Scroll:case dl.CanvasMutation:case dl.Input:return this.replaceIds(t.data,e,["id"]),t;case dl.StyleSheetRule:case dl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case dl.Font:return t;case dl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case dl.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===wl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Gl{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(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(!b(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Nl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Pl({...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(Va.host(e))),this.restoreHandlers.push(_l({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(Xa(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),i=Va.shadowRoot(this);return i&&ul(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Jl=0;Jl<64;Jl++)Yl[Zl.charCodeAt(Jl)]=Jl;const $l=new Map;const Xl=(e,t,r)=>{if(!e||!Ql(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=$l.get(e);return r||(r=new Map,$l.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 Hl(e,t,r){if(e instanceof Array)return e.map(e=>Hl(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+=Zl[r[t]>>2],n+=Zl[(3&r[t])<<4|r[t+1]>>4],n+=Zl[(15&r[t+1])<<2|r[t+2]>>6],n+=Zl[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:[Hl(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:[Hl(e.data,t,r),e.width,e.height]}}if(Ql(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Xl(e,t,r)}}return e}const Kl=(e,t,r)=>e.map(e=>Hl(e,t,r)),Ql=(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 ql(e,t,r,s){const n=[];try{const i=Xa(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!tl(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 ec(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=Xa(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Xl(a,i,this),"tagName"in this.canvas&&!tl(this.canvas,s,n,!0)){const e=Kl(o,i,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});o.push(a)}catch{const s=$a(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const tc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",rc="undefined"!=typeof window&&window.Blob&&new Blob([(sc=tc,Uint8Array.from(atob(sc),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var sc;function nc(e){let t;try{if(t=rc&&(window.URL||window.webkitURL).createObjectURL(rc),!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,"+tc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ic{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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:i,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const i=ql(t,r,s,!0),o=new Map,a=new nc;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:gl["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 c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{tl(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])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=ql(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=Xa(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return tl(this.canvas,r,s,!0)||setTimeout(()=>{const r=Kl(i,t,this);e(this.canvas,{type:gl["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{const r=$a(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:gl["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(...ec(t.WebGLRenderingContext.prototype,gl.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...ec(t.WebGL2RenderingContext.prototype,gl.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 oc{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new ll),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:S(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 ac{constructor(){n(this,"nodeMap",new WeakMap),n(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 lc,cc,hc,uc=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(r=e.contentWindow)?void 0:r.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const pc=new C;function dc(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:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:x=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:T}=e;Ml=T;const P=!x||window.parent===window;let F=!1;if(!P)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!F)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),pc.reset();const D=!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!==p?p:{password:!0},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let B;!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 _=0;const U=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!F&&(e=y(e)),e};lc=(e,n)=>{var i;const o=e;if(o.timestamp=Ha(),!(null==(i=El[0])?void 0:i.isFrozen())||o.type===pl.FullSnapshot||o.type===pl.IncrementalSnapshot&&o.data.source===dl.Mutation||El.forEach(e=>e.unfreeze()),P)null==t||t(U(o),n);else if(F){const e={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===pl.FullSnapshot)B=o,_=0;else if(o.type===pl.IncrementalSnapshot){if(o.data.source===dl.Mutation&&o.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&o.timestamp-B.timestamp>r;(e||t)&&cc(!0)}};const j=e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.Mutation,...e}})},z=e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Scroll,...e}}),W=e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.CanvasMutation,...e}}),V=new oc({mutationCb:j,adoptedStyleSheetCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.AdoptedStyleSheet,...e}})}),G=new Vl({mirror:pc,mutationCb:j,stylesheetManager:V,recordCrossOriginIframes:x,wrappedEmit:lc});for(const e of E||[])e.getMirror&&e.getMirror({nodeMirror:pc,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Z=new ac;hc=new ic({recordCanvas:I,mutationCb:W,win:window,blockClass:n,blockSelector:i,mirror:pc,sampling:w.canvas,dataURLOptions:b});const Y=new Gl({mutationCb:j,scrollCb:z,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:D,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:I,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:G,stylesheetManager:V,canvasManager:hc,keepIframeSrcFn:R,processedNodeManager:Z},mirror:pc});cc=(e=!1)=>{if(!S)return;lc({type:pl.Meta,data:{href:window.location.href,width:qa(),height:Qa()}},e),V.reset(),Y.init(),El.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new C,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return Q(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{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===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:pc,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:I,inlineImages:A,onSerialize:e=>{il(e,pc)&&G.addIframe(e),ol(e,pc)&&V.trackLinkElement(e),al(e)&&Y.addShadowRoot(Va.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");lc({type:pl.FullSnapshot,data:{node:t,initialOffset:Ka(window)}},e),El.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,pc.getId(document))};try{const e=[],t=e=>{var t;return Al(Ul)({mutationCb:j,mousemoveCb:(e,t)=>lc({type:pl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.MouseInteraction,...e}}),scrollCb:z,viewportResizeCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.ViewportResize,...e}}),inputCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Input,...e}}),mediaInteractionCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.MediaInteraction,...e}}),styleSheetRuleCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.StyleSheetRule,...e}}),styleDeclarationCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>lc({type:pl.IncrementalSnapshot,data:{source:dl.Font,...e}}),selectionCb:e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.Selection,...e}})},customElementCb:e=>{lc({type:pl.IncrementalSnapshot,data:{source:dl.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:I,inlineImages:A,userTriggeredOnInput:O,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:pc,iframeManager:G,stylesheetManager:V,shadowDomManager:Y,processedNodeManager:Z,canvasManager:hc,ignoreCSSAttributes:N,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>lc({type:pl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{cc(),e.push(t(document)),uc=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Ga("DOMContentLoaded",()=>{lc({type:pl.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&r()})),e.push(Ga("load",()=>{lc({type:pl.Load,data:{}}),"load"===k&&r()},window))),()=>{e.forEach(e=>e()),Z.destroy(),uc=!1,Ml=void 0}}catch(e){console.warn(e)}}var fc,mc;dc.addCustomEvent=(e,t)=>{if(!uc)throw new Error("please add custom event after start recording");lc({type:pl.Custom,data:{tag:e,payload:t}})},dc.freezePage=()=>{El.forEach(e=>e.freeze())},dc.takeFullSnapshot=e=>{if(!uc)throw new Error("please take full snapshot after start recording");cc(e)},dc.mirror=pc,(mc=fc||(fc={}))[mc.NotStarted=0]="NotStarted",mc[mc.Running=1]="Running",mc[mc.Stopped=2]="Stopped";const{takeFullSnapshot:gc}=dc;var yc,wc=Object.defineProperty,bc=(e,t,r)=>((e,t,r)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),vc=Object.defineProperty,Sc=(e,t,r)=>((e,t,r)=>t in e?vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Cc=Object.defineProperty,Ic=(e,t,r)=>((e,t,r)=>t in e?Cc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const xc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Oc={};function Mc(e){if(Oc[e])return Oc[e];const t=globalThis[e],r=t.prototype,s=e in xc?xc[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 kc?kc[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 Oc[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?Oc[e]=i:r}catch{return r}}const Ac={};function Ec(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ac[n])return Ac[n].call(t);const i=Mc(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(Ac[n]=o,o.call(t)):t[r]}const Rc={};function Nc(e,t,r){const s=`${e}.${String(r)}`;if(Rc[s])return Rc[s].bind(t);const n=Mc(e)[r];return"function"!=typeof n?t[r]:(Rc[s]=n,n.bind(t))}const Tc={childNodes:function(e){return Ec("Node",e,"childNodes")},parentNode:function(e){return Ec("Node",e,"parentNode")},parentElement:function(e){return Ec("Node",e,"parentElement")},textContent:function(e){return Ec("Node",e,"textContent")},contains:function(e,t){return Nc("Node",e,"contains")(t)},getRootNode:function(e){return Nc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ec("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ec("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ec("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ec("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Mc("MutationObserver").constructor}};class Pc{constructor(){Ic(this,"idNodeMap",new Map),Ic(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 Fc(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Fc(Tc.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Fc(Tc.parentNode(e),t,r)}function Dc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lc(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 Bc={exports:{}},_c=String,Uc=function(){return{isColorSupported:!1,reset:_c,bold:_c,dim:_c,italic:_c,underline:_c,inverse:_c,hidden:_c,strikethrough:_c,black:_c,red:_c,green:_c,yellow:_c,blue:_c,magenta:_c,cyan:_c,white:_c,gray:_c,bgBlack:_c,bgRed:_c,bgGreen:_c,bgYellow:_c,bgBlue:_c,bgMagenta:_c,bgCyan:_c,bgWhite:_c}};Bc.exports=Uc(),Bc.exports.createColors=Uc;var jc=Bc.exports;const zc=Lc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Wc=jc,Vc=zc,Gc=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=Wc.isColorSupported),Vc&&e&&(t=Vc(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}=Wc.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 Zc=Gc;Gc.default=Gc;var Yc={};Yc.isClean=Symbol("isClean"),Yc.my=Symbol("my");const Jc={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let $c=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 Jc[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=Jc[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 Xc=$c;$c.default=$c;let Hc=Xc;function Kc(e,t){new Hc(t).stringify(e)}var Qc=Kc;Kc.default=Kc;let{isClean:qc,my:eh}=Yc,th=Zc,rh=Xc,sh=Qc;function nh(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=>nh(e,r)):("object"===i&&null!==n&&(n=nh(n)),r[s]=n)}return r}let ih=class{constructor(e={}){this.raws={},this[qc]=!1,this[eh]=!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=nh(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 th(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[qc]){this[qc]=!1;let e=this;for(;e=e.parent;)e[qc]=!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 rh).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=sh){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 oh=ih;ih.default=ih;let ah=oh,lh=class extends ah{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 ch=lh;lh.default=lh;var hh={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:uh,SourceMapGenerator:ph}=zc,{existsSync:dh,readFileSync:fh}=zc,{dirname:mh,join:gh}=zc;let yh=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=mh(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new uh(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=mh(e),dh(e))return this.mapFile=e,fh(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 uh)return ph.fromSourceMap(t).toString();if(t instanceof ph)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=gh(mh(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 wh=yh;yh.default=yh;let{SourceMapConsumer:bh,SourceMapGenerator:vh}=zc,{fileURLToPath:Sh,pathToFileURL:Ch}=zc,{isAbsolute:Ih,resolve:xh}=zc,{nanoid:kh}=hh,Oh=zc,Mh=Zc,Ah=wh,Eh=Symbol("fromOffsetCache"),Rh=Boolean(bh&&vh),Nh=Boolean(xh&&Ih),Th=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&&(!Nh||/^\w+:\/\//.test(t.from)||Ih(t.from)?this.file=t.from:this.file=xh(t.from)),Nh&&Rh){let e=new Ah(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 "+kh(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 Mh(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 Mh(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&&(Ch&&(n.input.url=Ch(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Eh])r=this[Eh];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[Eh]=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:xh(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=Ih(a.source)?Ch(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ch(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(!Sh)throw new Error("file: protocol is not available in this PostCSS build");l.file=Sh(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 Ph=Th;Th.default=Th,Oh&&Oh.registerInput&&Oh.registerInput(Th);let{SourceMapConsumer:Fh,SourceMapGenerator:Dh}=zc,{dirname:Lh,relative:Bh,resolve:_h,sep:Uh}=zc,{pathToFileURL:jh}=zc,zh=Ph,Wh=Boolean(Fh&&Dh),Vh=Boolean(Lh&&_h&&Bh&&Uh);var Gh=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||Lh(e.file);!1===this.mapOpts.sourcesContent?(t=new Fh(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(),Vh&&Wh&&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=Dh.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Dh({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 Dh({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?Lh(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Lh(_h(r,this.mapOpts.annotation)));let s=Bh(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 zh(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(jh){let t=jh(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;"\\"===Uh&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Zh=oh,Yh=class extends Zh{constructor(e){super(e),this.type="comment"}};var Jh=Yh;Yh.default=Yh;let $h,Xh,Hh,Kh,{isClean:Qh,my:qh}=Yc,eu=ch,tu=Jh,ru=oh;function su(e){return e.map(e=>(e.nodes&&(e.nodes=su(e.nodes)),delete e.source,e))}function nu(e){if(e[Qh]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)nu(t)}let iu=class e extends ru{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=su($h(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 eu(t)]}else if(t.selector)t=[new Xh(t)];else if(t.name)t=[new Hh(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new tu(t)]}return t.map(t=>(t[qh]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Qh]&&nu(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]}};iu.registerParse=e=>{$h=e},iu.registerRule=e=>{Xh=e},iu.registerAtRule=e=>{Hh=e},iu.registerRoot=e=>{Kh=e};var ou=iu;iu.default=iu,iu.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Hh.prototype):"rule"===e.type?Object.setPrototypeOf(e,Xh.prototype):"decl"===e.type?Object.setPrototypeOf(e,eu.prototype):"comment"===e.type?Object.setPrototypeOf(e,tu.prototype):"root"===e.type&&Object.setPrototypeOf(e,Kh.prototype),e[qh]=!0,e.nodes&&e.nodes.forEach(e=>{iu.rebuild(e)})};let au,lu,cu=ou,hu=class extends cu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new au(new lu,this,e).stringify()}};hu.registerLazyResult=e=>{au=e},hu.registerProcessor=e=>{lu=e};var uu=hu;hu.default=hu;let pu={};var du=function(e){pu[e]||(pu[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let fu=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 mu=fu;fu.default=fu;let gu=mu,yu=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 gu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var wu=yu;yu.default=yu;const bu="'".charCodeAt(0),vu='"'.charCodeAt(0),Su="\\".charCodeAt(0),Cu="/".charCodeAt(0),Iu="\n".charCodeAt(0),xu=" ".charCodeAt(0),ku="\f".charCodeAt(0),Ou="\t".charCodeAt(0),Mu="\r".charCodeAt(0),Au="[".charCodeAt(0),Eu="]".charCodeAt(0),Ru="(".charCodeAt(0),Nu=")".charCodeAt(0),Tu="{".charCodeAt(0),Pu="}".charCodeAt(0),Fu=";".charCodeAt(0),Du="*".charCodeAt(0),Lu=":".charCodeAt(0),Bu="@".charCodeAt(0),_u=/[\t\n\f\r "#'()/;[\\\]{}]/g,Uu=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ju=/.[\r\n"'(/\\]/,zu=/[\da-f]/i;let Wu=ou,Vu=class extends Wu{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 Gu=Vu;Vu.default=Vu,Wu.registerAtRule(Vu);let Zu,Yu,Ju=ou,$u=class extends Ju{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 Zu(new Yu,this,e).stringify()}};$u.registerLazyResult=e=>{Zu=e},$u.registerProcessor=e=>{Yu=e};var Xu=$u;$u.default=$u,Ju.registerRoot($u);let Hu={comma:e=>Hu.split(e,[","],!0),space:e=>Hu.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 Ku=Hu;Hu.default=Hu;let Qu=ou,qu=Ku,ep=class extends Qu{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return qu.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 tp=ep;ep.default=ep,Qu.registerRule(ep);let rp=ch,sp=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case Iu:case xu:case Ou:case Mu:case ku:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===xu||r===Iu||r===Ou||r===Mu||r===ku);u=["space",p.slice(m,s)],m=s-1;break;case Au:case Eu:case Tu:case Pu:case Lu:case Fu:case Nu:{let e=String.fromCharCode(r);u=[e,e,m];break}case Ru:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==bu&&h!==vu&&h!==xu&&h!==Iu&&h!==Ou&&h!==ku&&h!==Mu){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Su;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||ju.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case bu:case vu:n=r===bu?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Su;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Bu:_u.lastIndex=m+1,_u.test(p),s=0===_u.lastIndex?p.length-1:_u.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Su:for(s=m,o=!0;p.charCodeAt(s+1)===Su;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==Cu&&r!==xu&&r!==Iu&&r!==Ou&&r!==Mu&&r!==ku&&(s+=1,zu.test(p.charAt(s)))){for(;zu.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===xu&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Cu&&p.charCodeAt(m+1)===Du?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Uu.lastIndex=m+1,Uu.test(p),s=0===Uu.lastIndex?p.length-1:Uu.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},np=Jh,ip=Gu,op=Xu,ap=tp;const lp={empty:!0,space:!0};let cp=ou,hp=class{constructor(e){this.input=e,this.root=new op,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 ip;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 np;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=sp(this.input)}decl(e,t){let r=new rp;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 ap;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,c="",h=!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",lp[a]||lp[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new ap;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})}},up=Ph;function pp(e,t){let r=new up(e,t),s=new hp(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 dp=pp;pp.default=pp,cp.registerParse(pp);let{isClean:fp,my:mp}=Yc,gp=Gh,yp=Qc,wp=ou,bp=uu,vp=du,Sp=wu,Cp=dp,Ip=Xu;const xp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kp={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},Op={Once:!0,postcssPlugin:!0,prepare:!0};function Mp(e){return"object"==typeof e&&"function"==typeof e.then}function Ap(e){let t=!1,r=xp[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 Ep(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ap(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Rp(e){return e[fp]=!1,e.nodes&&e.nodes.forEach(e=>Rp(e)),e}let Np={},Tp=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 Sp)n=Rp(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=Cp;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[mp]&&wp.rebuild(n)}else n=Rp(r);this.result=new Sp(t,n,s),this.helpers={...Np,postcss:Np,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(!kp[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Op[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(Mp(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fp];){e[fp]=!0;let t=[Ep(e)];for(;t.length>0;){let e=this.visitTick(t);if(Mp(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 Mp(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=yp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new gp(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(Mp(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fp];)e[fp]=!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||vp("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(Mp(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[fp])return s[fp]=!0,void e.push(Ep(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[fp]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[fp]=!0;let t=Ap(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[fp]||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"}};Tp.registerPostcss=e=>{Np=e};var Pp=Tp;Tp.default=Tp,Ip.registerLazyResult(Tp),bp.registerLazyResult(Tp);let Fp=Gh,Dp=Qc,Lp=du,Bp=dp;const _p=wu;let Up=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=Dp;this.result=new _p(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Fp(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||Lp("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=Bp;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 jp=Up;Up.default=Up;let zp=jp,Wp=Pp,Vp=uu,Gp=Xu,Zp=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 Wp(this,e,t):new zp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yp=Zp;Zp.default=Zp,Gp.registerProcessor(Zp),Vp.registerProcessor(Zp);let Jp=ch,$p=wh,Xp=Jh,Hp=Gu,Kp=Ph,Qp=Xu,qp=tp;function ed(e,t){if(Array.isArray(e))return e.map(e=>ed(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Kp.prototype};r.map&&(r.map={...r.map,__proto__:$p.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>ed(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 Qp(s);if("decl"===s.type)return new Jp(s);if("rule"===s.type)return new qp(s);if("comment"===s.type)return new Xp(s);if("atrule"===s.type)return new Hp(s);throw new Error("Unknown node type: "+e.type)}var td=ed;ed.default=ed;let rd=Zc,sd=ch,nd=Pp,id=ou,od=Yp,ad=Qc,ld=td,cd=uu,hd=mu,ud=Jh,pd=Gu,dd=wu,fd=Ph,md=dp,gd=Ku,yd=tp,wd=Xu,bd=oh;function vd(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new od(e)}vd.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 od).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return vd([n(r)]).process(e,t)},n},vd.stringify=ad,vd.parse=md,vd.fromJSON=ld,vd.list=gd,vd.comment=e=>new ud(e),vd.atRule=e=>new pd(e),vd.decl=e=>new sd(e),vd.rule=e=>new yd(e),vd.root=e=>new wd(e),vd.document=e=>new cd(e),vd.CssSyntaxError=rd,vd.Declaration=sd,vd.Container=id,vd.Processor=od,vd.Document=cd,vd.Comment=ud,vd.Warning=hd,vd.AtRule=pd,vd.Result=dd,vd.Input=fd,vd.Rule=yd,vd.Root=wd,vd.Node=bd,nd.registerPostcss(vd);var Sd=vd;vd.default=vd;const Cd=Dc(Sd);Cd.stringify,Cd.fromJSON,Cd.plugin,Cd.parse,Cd.list,Cd.document,Cd.comment,Cd.atRule,Cd.rule,Cd.decl,Cd.root,Cd.CssSyntaxError,Cd.Declaration,Cd.Container,Cd.Processor,Cd.Document,Cd.Comment,Cd.Warning,Cd.AtRule,Cd.Result,Cd.Input,Cd.Rule,Cd.Root,Cd.Node;var Id=Object.defineProperty,xd=(e,t,r)=>((e,t,r)=>t in e?Id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function kd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Od(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 Md={exports:{}},Ad=String,Ed=function(){return{isColorSupported:!1,reset:Ad,bold:Ad,dim:Ad,italic:Ad,underline:Ad,inverse:Ad,hidden:Ad,strikethrough:Ad,black:Ad,red:Ad,green:Ad,yellow:Ad,blue:Ad,magenta:Ad,cyan:Ad,white:Ad,gray:Ad,bgBlack:Ad,bgRed:Ad,bgGreen:Ad,bgYellow:Ad,bgBlue:Ad,bgMagenta:Ad,bgCyan:Ad,bgWhite:Ad}};Md.exports=Ed(),Md.exports.createColors=Ed;var Rd=Md.exports;const Nd=Od(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Td=Rd,Pd=Nd,Fd=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=Td.isColorSupported),Pd&&e&&(t=Pd(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}=Td.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 Dd=Fd;Fd.default=Fd;var Ld={};Ld.isClean=Symbol("isClean"),Ld.my=Symbol("my");const Bd={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _d=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 Bd[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=Bd[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 Ud=_d;_d.default=_d;let jd=Ud;function zd(e,t){new jd(t).stringify(e)}var Wd=zd;zd.default=zd;let{isClean:Vd,my:Gd}=Ld,Zd=Dd,Yd=Ud,Jd=Wd;function $d(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=>$d(e,r)):("object"===i&&null!==n&&(n=$d(n)),r[s]=n)}return r}let Xd=class{constructor(e={}){this.raws={},this[Vd]=!1,this[Gd]=!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=$d(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 Zd(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[Vd]){this[Vd]=!1;let e=this;for(;e=e.parent;)e[Vd]=!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 Yd).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=Jd){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 Hd=Xd;Xd.default=Xd;let Kd=Hd,Qd=class extends Kd{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 qd=Qd;Qd.default=Qd;var ef={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:tf,SourceMapGenerator:rf}=Nd,{existsSync:sf,readFileSync:nf}=Nd,{dirname:of,join:af}=Nd;let lf=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=of(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new tf(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=of(e),sf(e))return this.mapFile=e,nf(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 tf)return rf.fromSourceMap(t).toString();if(t instanceof rf)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=af(of(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 cf=lf;lf.default=lf;let{SourceMapConsumer:hf,SourceMapGenerator:uf}=Nd,{fileURLToPath:pf,pathToFileURL:df}=Nd,{isAbsolute:ff,resolve:mf}=Nd,{nanoid:gf}=ef,yf=Nd,wf=Dd,bf=cf,vf=Symbol("fromOffsetCache"),Sf=Boolean(hf&&uf),Cf=Boolean(mf&&ff),If=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&&(!Cf||/^\w+:\/\//.test(t.from)||ff(t.from)?this.file=t.from:this.file=mf(t.from)),Cf&&Sf){let e=new bf(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 "+gf(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 wf(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 wf(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&&(df&&(n.input.url=df(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[vf])r=this[vf];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[vf]=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:mf(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=ff(a.source)?df(a.source):new URL(a.source,this.map.consumer().sourceRoot||df(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(!pf)throw new Error("file: protocol is not available in this PostCSS build");l.file=pf(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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 xf=If;If.default=If,yf&&yf.registerInput&&yf.registerInput(If);let{SourceMapConsumer:kf,SourceMapGenerator:Of}=Nd,{dirname:Mf,relative:Af,resolve:Ef,sep:Rf}=Nd,{pathToFileURL:Nf}=Nd,Tf=xf,Pf=Boolean(kf&&Of),Ff=Boolean(Mf&&Ef&&Af&&Rf);var Df=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||Mf(e.file);!1===this.mapOpts.sourcesContent?(t=new kf(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(),Ff&&Pf&&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=Of.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Of({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 Of({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?Mf(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Mf(Ef(r,this.mapOpts.annotation)));let s=Af(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 Tf(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(Nf){let t=Nf(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;"\\"===Rf&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Lf=Hd,Bf=class extends Lf{constructor(e){super(e),this.type="comment"}};var _f=Bf;Bf.default=Bf;let Uf,jf,zf,Wf,{isClean:Vf,my:Gf}=Ld,Zf=qd,Yf=_f,Jf=Hd;function $f(e){return e.map(e=>(e.nodes&&(e.nodes=$f(e.nodes)),delete e.source,e))}function Xf(e){if(e[Vf]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Xf(t)}let Hf=class e extends Jf{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=$f(Uf(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 Zf(t)]}else if(t.selector)t=[new jf(t)];else if(t.name)t=[new zf(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Yf(t)]}return t.map(t=>(t[Gf]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Vf]&&Xf(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]}};Hf.registerParse=e=>{Uf=e},Hf.registerRule=e=>{jf=e},Hf.registerAtRule=e=>{zf=e},Hf.registerRoot=e=>{Wf=e};var Kf=Hf;Hf.default=Hf,Hf.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,zf.prototype):"rule"===e.type?Object.setPrototypeOf(e,jf.prototype):"decl"===e.type?Object.setPrototypeOf(e,Zf.prototype):"comment"===e.type?Object.setPrototypeOf(e,Yf.prototype):"root"===e.type&&Object.setPrototypeOf(e,Wf.prototype),e[Gf]=!0,e.nodes&&e.nodes.forEach(e=>{Hf.rebuild(e)})};let Qf,qf,em=Kf,tm=class extends em{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Qf(new qf,this,e).stringify()}};tm.registerLazyResult=e=>{Qf=e},tm.registerProcessor=e=>{qf=e};var rm=tm;tm.default=tm;let sm={};var nm=function(e){sm[e]||(sm[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let im=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 om=im;im.default=im;let am=om,lm=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 am(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var cm=lm;lm.default=lm;const hm="'".charCodeAt(0),um='"'.charCodeAt(0),pm="\\".charCodeAt(0),dm="/".charCodeAt(0),fm="\n".charCodeAt(0),mm=" ".charCodeAt(0),gm="\f".charCodeAt(0),ym="\t".charCodeAt(0),wm="\r".charCodeAt(0),bm="[".charCodeAt(0),vm="]".charCodeAt(0),Sm="(".charCodeAt(0),Cm=")".charCodeAt(0),Im="{".charCodeAt(0),xm="}".charCodeAt(0),km=";".charCodeAt(0),Om="*".charCodeAt(0),Mm=":".charCodeAt(0),Am="@".charCodeAt(0),Em=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Nm=/.[\r\n"'(/\\]/,Tm=/[\da-f]/i;let Pm=Kf,Fm=class extends Pm{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 Dm=Fm;Fm.default=Fm,Pm.registerAtRule(Fm);let Lm,Bm,_m=Kf,Um=class extends _m{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 Lm(new Bm,this,e).stringify()}};Um.registerLazyResult=e=>{Lm=e},Um.registerProcessor=e=>{Bm=e};var jm=Um;Um.default=Um,_m.registerRoot(Um);let zm={comma:e=>zm.split(e,[","],!0),space:e=>zm.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!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 Wm=zm;zm.default=zm;let Vm=Kf,Gm=Wm,Zm=class extends Vm{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Gm.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 Ym=Zm;Zm.default=Zm,Vm.registerRule(Zm);let Jm=qd,$m=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.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=p.charCodeAt(m),r){case fm:case mm:case ym:case wm:case gm:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===mm||r===fm||r===ym||r===wm||r===gm);u=["space",p.slice(m,s)],m=s-1;break;case bm:case vm:case Im:case xm:case Mm:case km:case Cm:{let e=String.fromCharCode(r);u=[e,e,m];break}case Sm:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==hm&&h!==um&&h!==mm&&h!==fm&&h!==ym&&h!==gm&&h!==wm){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===pm;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||Nm.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case hm:case um:n=r===hm?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===pm;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Am:Em.lastIndex=m+1,Em.test(p),s=0===Em.lastIndex?p.length-1:Em.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case pm:for(s=m,o=!0;p.charCodeAt(s+1)===pm;)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&r!==dm&&r!==mm&&r!==fm&&r!==ym&&r!==wm&&r!==gm&&(s+=1,Tm.test(p.charAt(s)))){for(;Tm.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===mm&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===dm&&p.charCodeAt(m+1)===Om?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Rm.lastIndex=m+1,Rm.test(p),s=0===Rm.lastIndex?p.length-1:Rm.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Xm=_f,Hm=Dm,Km=jm,Qm=Ym;const qm={empty:!0,space:!0};let eg=Kf,tg=class{constructor(e){this.input=e,this.root=new Km,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 Hm;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 Xm;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=$m(this.input)}decl(e,t){let r=new Jm;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 Qm;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,c="",h=!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",qm[a]||qm[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Qm;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})}},rg=xf;function sg(e,t){let r=new rg(e,t),s=new tg(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 ng=sg;sg.default=sg,eg.registerParse(sg);let{isClean:ig,my:og}=Ld,ag=Df,lg=Wd,cg=Kf,hg=rm,ug=nm,pg=cm,dg=ng,fg=jm;const mg={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gg={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},yg={Once:!0,postcssPlugin:!0,prepare:!0};function wg(e){return"object"==typeof e&&"function"==typeof e.then}function bg(e){let t=!1,r=mg[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 vg(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:bg(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Sg(e){return e[ig]=!1,e.nodes&&e.nodes.forEach(e=>Sg(e)),e}let Cg={},Ig=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 pg)n=Sg(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=dg;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[og]&&cg.rebuild(n)}else n=Sg(r);this.result=new pg(t,n,s),this.helpers={...Cg,postcss:Cg,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(!gg[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yg[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(wg(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ig];){e[ig]=!0;let t=[vg(e)];for(;t.length>0;){let e=this.visitTick(t);if(wg(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 wg(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=lg;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ag(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(wg(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ig];)e[ig]=!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||ug("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(wg(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[ig])return s[ig]=!0,void e.push(vg(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[ig]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ig]=!0;let t=bg(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[ig]||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"}};Ig.registerPostcss=e=>{Cg=e};var xg=Ig;Ig.default=Ig,fg.registerLazyResult(Ig),hg.registerLazyResult(Ig);let kg=Df,Og=Wd,Mg=nm,Ag=ng;const Eg=cm;let Rg=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=Og;this.result=new Eg(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new kg(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||Mg("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=Ag;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 Ng=Rg;Rg.default=Rg;let Tg=Ng,Pg=xg,Fg=rm,Dg=jm,Lg=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 Pg(this,e,t):new Tg(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Bg=Lg;Lg.default=Lg,Dg.registerProcessor(Lg),Fg.registerProcessor(Lg);let _g=qd,Ug=cf,jg=_f,zg=Dm,Wg=xf,Vg=jm,Gg=Ym;function Zg(e,t){if(Array.isArray(e))return e.map(e=>Zg(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Wg.prototype};r.map&&(r.map={...r.map,__proto__:Ug.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>Zg(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 Vg(s);if("decl"===s.type)return new _g(s);if("rule"===s.type)return new Gg(s);if("comment"===s.type)return new jg(s);if("atrule"===s.type)return new zg(s);throw new Error("Unknown node type: "+e.type)}var Yg=Zg;Zg.default=Zg;let Jg=Dd,$g=qd,Xg=xg,Hg=Kf,Kg=Bg,Qg=Wd,qg=Yg,ey=rm,ty=om,ry=_f,sy=Dm,ny=cm,iy=xf,oy=ng,ay=Wm,ly=Ym,cy=jm,hy=Hd;function uy(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Kg(e)}uy.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 Kg).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return uy([n(r)]).process(e,t)},n},uy.stringify=Qg,uy.parse=oy,uy.fromJSON=qg,uy.list=ay,uy.comment=e=>new ry(e),uy.atRule=e=>new sy(e),uy.decl=e=>new $g(e),uy.rule=e=>new ly(e),uy.root=e=>new cy(e),uy.document=e=>new ey(e),uy.CssSyntaxError=Jg,uy.Declaration=$g,uy.Container=Hg,uy.Processor=Kg,uy.Document=ey,uy.Comment=ry,uy.Warning=ty,uy.AtRule=sy,uy.Result=ny,uy.Input=iy,uy.Rule=ly,uy.Root=cy,uy.Node=hy,Xg.registerPostcss(uy);var py=uy;uy.default=uy;const dy=kd(py);dy.stringify,dy.fromJSON,dy.plugin,dy.parse,dy.list,dy.document,dy.comment,dy.atRule,dy.rule,dy.decl,dy.root,dy.CssSyntaxError,dy.Declaration,dy.Container,dy.Processor,dy.Document,dy.Comment,dy.Warning,dy.AtRule,dy.Result,dy.Input,dy.Rule,dy.Root,dy.Node;class fy{constructor(...e){xd(this,"parentElement",null),xd(this,"parentNode",null),xd(this,"ownerDocument"),xd(this,"firstChild",null),xd(this,"lastChild",null),xd(this,"previousSibling",null),xd(this,"nextSibling",null),xd(this,"ELEMENT_NODE",1),xd(this,"TEXT_NODE",3),xd(this,"nodeType"),xd(this,"nodeName"),xd(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 fy))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 my={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yy={};function wy(e){if(yy[e])return yy[e];const t=globalThis[e],r=t.prototype,s=e in my?my[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 gy?gy[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 yy[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?yy[e]=i:r}catch{return r}}const by={};function vy(e,t,r){var s;const n=`${e}.${String(r)}`;if(by[n])return by[n].call(t);const i=wy(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(by[n]=o,o.call(t)):t[r]}const Sy={};function Cy(e,t,r){const s=`${e}.${String(r)}`;if(Sy[s])return Sy[s].bind(t);const n=wy(e)[r];return"function"!=typeof n?t[r]:(Sy[s]=n,n.bind(t))}const Iy={childNodes:function(e){return vy("Node",e,"childNodes")},parentNode:function(e){return vy("Node",e,"parentNode")},parentElement:function(e){return vy("Node",e,"parentElement")},textContent:function(e){return vy("Node",e,"textContent")},contains:function(e,t){return Cy("Node",e,"contains")(t)},getRootNode:function(e){return Cy("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?vy("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?vy("Element",e,"shadowRoot"):null},querySelector:function(e,t){return vy("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return vy("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return wy("MutationObserver").constructor}};const xy="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 ky={map:{},getId:()=>(console.error(xy),-1),getNode:()=>(console.error(xy),null),removeNodeFromMap(){console.error(xy)},has:()=>(console.error(xy),!1),reset(){console.error(xy)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ky=new Proxy(ky,{get:(e,t,r)=>("map"===t&&console.error(xy),Reflect.get(e,t,r))}));let Oy=Date.now;function My(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Iy.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oy=()=>(new Date).getTime());function Ay(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Iy.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Iy.host(Iy.getRootNode(e))&&(r=Iy.host(Iy.getRootNode(e))),r}function Ey(e){let t,r=e;for(;t=Ay(r);)r=t;return r}function Ry(e){const t=e.ownerDocument;if(!t)return!1;const r=Ey(e);return Iy.contains(t,r)}const Ny=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Sc(this,"id",1),Sc(this,"styleIDMap",new WeakMap),Sc(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++}},get _mirror(){return ky},closestElementOfNode:My,getBaseDimension:function e(t,r){var s,n;const i=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!i||i===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,r),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Ey,getShadowHost:Ay,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(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=Iy.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=Iy.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof fy&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Iy.shadowRoot(e)))},hookSetter:function e(t,r,s,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,r);return i.Object.defineProperty(t,r,n?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(Iy.contains(t,e)||Ry(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Tc.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Tc.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=Iy.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=My(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(Fc(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},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Oy},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(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()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,r(n,i.parent))}else{const e=s.indexOf(i);s.splice(e,0,r(n,null))}continue}if(i in t){const e=t[i];e.children.push(r(n,e));continue}s.push(r(n,null))}return s},shadowHostInDom:Ry,throttle:function(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))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var Ty="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Py="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Fy=0;Fy<64;Fy++)Py[Ty.charCodeAt(Fy)]=Fy;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(yc=e.contentWindow)?void 0:yc.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Dy;new Pc,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Dy||(Dy={}));class Ly{constructor(e){bc(this,"fileName"),bc(this,"functionName"),bc(this,"lineNumber"),bc(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const By=/(^|@)\S+:\d+/,_y=/^\s*at .*(\S+:\d+|\(native\))/m,Uy=/^(eval@)?(\[native code])?$/,jy={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(_y)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(_y)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),i=s.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Ly({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Uy)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Ly({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Ly({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Ly({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Ly({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(By)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ly({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function zy(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function Wy(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vy(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(Wy(e[s])&&Vy(e[s],t-1))return!0;return!1}function Gy(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Wy(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wy(e)&&Vy(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=zy(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Zy={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Yy(e,t,r){const s=r?Object.assign({},Zy,r):Zy,n=s.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,i=jy.parse(n).map(e=>e.toString()),o=[Gy(r,s.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",r),l.push(()=>{t.removeEventListener("error",r)});const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[Gy(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[Gy("Uncaught (in promise)",s.stringifyOptions),Gy(t.reason,s.stringifyOptions)]);const i=jy.parse(r).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const e of s.level)l.push(c(i,e));return()=>{l.forEach(e=>e())};function c(t,r){return t[r]?Ny.patch(t,r,t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=jy.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===r?n.slice(1):n).map(e=>Gy(e,s.stringifyOptions));o++,o<s.lengthThreshold?e({level:r,trace:t,payload:i}):o===s.lengthThreshold&&e({level:"warn",trace:[],payload:[Gy("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}}):()=>{}}}const Jy="https://events.userlens.io",$y=()=>window.localStorage.getItem("$ul_WRITE_CODE"),Xy=async e=>{if(!(null==e?void 0:e.userId))return;const t={type:"identify",userId:e.userId,source:"userlens-js-analytics-sdk",traits:null==e?void 0:e.traits};if(!(await fetch(`${Jy}/event`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(t)})).ok)throw new Error("Userlens HTTP error: failed to identify");return"ok"},Hy=async e=>{if(!(null==e?void 0:e.groupId))return;const{groupId:t,userId:r,traits:s}=e,n={type:"group",groupId:t,source:"userlens-js-analytics-sdk",...r&&{userId:r},...s&&{traits:s}};if(!(await fetch(`${Jy}/event`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(n)})).ok)throw new Error("Userlens HTTP error: failed to identify");return"ok"},Ky=async e=>{const t={events:e};if(!(await fetch("https://raw.userlens.io/raw/event",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(t)})).ok)throw new Error("Userlens HTTP error: failed to track");return"ok"};function Qy(e){window.localStorage.setItem("$ul_WRITE_CODE",btoa(`${e}:`))}var qy,ew,tw,rw,sw,nw,iw,ow,aw,lw,cw,hw;ew=new WeakMap,iw=new WeakMap,qy=new WeakSet,tw=function(){this.rrwebStop||(e(this,qy,"m",nw).call(this),setTimeout(()=>{var t;this.rrwebStop=dc({emit:t=>{e(this,qy,"m",rw).call(this,t)},maskAllInputs:this.maskingOptions.includes("all"),maskInputOptions:{password:this.maskingOptions.includes("passwords")},plugins:[{name:"rrweb/console@1",observer:Yy,options:t}]})},100),e(this,qy,"m",ow).call(this))},rw=function(t){const r=Date.now(),s=Number(localStorage.getItem("userlensSessionLastActive"));s&&r-s>this.TIMEOUT&&e(this,qy,"m",sw).call(this),localStorage.setItem("userlensSessionLastActive",r.toString()),this.sessionEvents.push(t),this.sessionEvents.length>=this.BUFFER_SIZE&&e(this,ew,"f").call(this)},sw=function(){e(this,qy,"m",hw).call(this),e(this,qy,"m",nw).call(this)},nw=function(){const e=Number(localStorage.getItem("userlensSessionLastActive")),t=localStorage.getItem("userlensSessionUuid"),r=Date.now(),s=!e||r-e>this.TIMEOUT;!t||s?(this.sessionUuid="10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(Number(e)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Number(e)/4).toString(16)),localStorage.setItem("userlensSessionUuid",this.sessionUuid)):this.sessionUuid=t,localStorage.setItem("userlensSessionLastActive",r.toString())},ow=function(){window.addEventListener("visibilitychange",e(this,iw,"f"))},aw=function(e,t){let r=0;return(...s)=>{const n=Date.now();n-r>=t&&(r=n,e.apply(this,s))}},lw=async function(){var t;const r=null===(t=this.sessionEvents[this.sessionEvents.length-1])||void 0===t?void 0:t.timestamp,s=[...this.sessionEvents];e(this,qy,"m",cw).call(this);try{await(async(e,t,r,s)=>{const n={userId:e,chunk_timestamp:s,payload:r};if(!(await fetch(`https://sessions.userlens.io/session/${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(n)})).ok)throw new Error("Userlens HTTP error: failed to track");return"ok"})(this.userId,this.sessionUuid,s,r)}catch(t){e(this,qy,"m",sw).call(this)}},cw=function(){this.sessionEvents=[]},hw=function(){localStorage.removeItem("userlensSessionUuid"),localStorage.removeItem("userlensSessionLastActive")};const uw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},pw={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},dw={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fw={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},mw={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class gw{static getFirstMatch(e,t){const r=t.match(e);return r&&r.length>0&&r[1]||""}static getSecondMatch(e,t){const r=t.match(e);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(e,t,r){if(e.test(t))return r}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,r=!1){const s=gw.getVersionPrecision(e),n=gw.getVersionPrecision(t);let i=Math.max(s,n),o=0;const a=gw.map([e,t],e=>{const t=i-gw.getVersionPrecision(e),r=e+new Array(t+1).join(".0");return gw.map(r.split("."),e=>new Array(20-e.length).join("0")+e).reverse()});for(r&&(o=i-Math.min(s,n)),i-=1;i>=o;){if(a[0][i]>a[1][i])return 1;if(a[0][i]===a[1][i]){if(i===o)return 0;i-=1}else if(a[0][i]<a[1][i])return-1}}static map(e,t){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(s=0;s<e.length;s+=1)r.push(t(e[s]));return r}static find(e,t){let r,s;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,s=e.length;r<s;r+=1){const s=e[r];if(t(s,r))return s}}static assign(e,...t){const r=e;let s,n;if(Object.assign)return Object.assign(e,...t);for(s=0,n=t.length;s<n;s+=1){const e=t[s];if("object"==typeof e&&null!==e){Object.keys(e).forEach(t=>{r[t]=e[t]})}}return e}static getBrowserAlias(e){return uw[e]}static getBrowserTypeByAlias(e){return pw[e]||""}}const yw=/version\/(\d+(\.?_?\d+)+)/i,ww=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},r=gw.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},r=gw.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},r=gw.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},r=gw.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},r=gw.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},r=gw.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},r=gw.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},r=gw.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=gw.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},r=gw.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},r=gw.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},r=gw.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},r=gw.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},r=gw.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},r=gw.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},r=gw.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},r=gw.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},r=gw.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},r=gw.getFirstMatch(yw,e)||gw.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},r=gw.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},r=gw.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},r=gw.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},r=gw.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},r=gw.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},r=gw.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},r=gw.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},r=gw.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},r=gw.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t={name:"Android Browser"},r=gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},r=gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},r=gw.getFirstMatch(yw,e);return r&&(t.version=r),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:gw.getFirstMatch(t,e),version:gw.getSecondMatch(t,e)}}}];var bw=[{test:[/Roku\/DVP/],describe(e){const t=gw.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fw.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=gw.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fw.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=gw.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=gw.getWindowsVersionName(t);return{name:fw.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fw.iOS},r=gw.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe(e){const t=gw.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=gw.getMacOSVersionName(t),s={name:fw.MacOS,version:t};return r&&(s.versionName=r),s}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=gw.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fw.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t=gw.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=gw.getAndroidVersionName(t),s={name:fw.Android,version:t};return r&&(s.versionName=r),s}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=gw.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:fw.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=gw.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||gw.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||gw.getFirstMatch(/\bbb(\d+)/i,e);return{name:fw.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=gw.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fw.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=gw.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fw.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:fw.Linux})},{test:[/CrOS/],describe:()=>({name:fw.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=gw.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fw.PlayStation4,version:t}}}],vw=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=gw.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:dw.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:dw.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:dw.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:dw.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:dw.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:dw.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:dw.tablet})},{test(e){const t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe(e){const t=gw.getFirstMatch(/(ipod|iphone)/i,e);return{type:dw.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:dw.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:dw.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:dw.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:dw.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:dw.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:dw.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:dw.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:dw.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:dw.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:dw.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:dw.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:dw.tv})}],Sw=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:mw.Blink};const t=gw.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:mw.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:mw.Trident},r=gw.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:mw.Presto},r=gw.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe(e){const t={name:mw.Gecko},r=gw.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:mw.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:mw.WebKit},r=gw.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];class Cw{constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=gw.find(ww,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=gw.find(bw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=gw.find(vw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=gw.find(Sw,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return gw.assign({},this.parsedResult)}satisfies(e){const t={};let r=0;const s={};let n=0;if(Object.keys(e).forEach(i=>{const o=e[i];"string"==typeof o?(s[i]=o,n+=1):"object"==typeof o&&(t[i]=o,r+=1)}),r>0){const e=Object.keys(t),r=gw.find(e,e=>this.isOS(e));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}const s=gw.find(e,e=>this.isPlatform(e));if(s){const e=this.satisfies(t[s]);if(void 0!==e)return e}}if(n>0){const e=Object.keys(s),t=gw.find(e,e=>this.isBrowser(e,!0));if(void 0!==t)return this.compareVersion(s[t])}}isBrowser(e,t=!1){const r=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const n=gw.getBrowserTypeByAlias(s);return t&&n&&(s=n.toLowerCase()),s===r}compareVersion(e){let t=[0],r=e,s=!1;const n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(s=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(s=!0,r=e.substr(1)),t.indexOf(gw.compareVersions(n,r,s))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}}
|
|
2
2
|
/*!
|
|
3
3
|
* Bowser - a browser detector
|
|
4
4
|
* https://github.com/lancedikson/bowser
|
|
5
5
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
6
6
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
7
|
-
*/class
|
|
8
|
-
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */function Aw(){return kw||(kw=1,e=Ow,function(t){e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,r=String(e),s=r.length,n=-1,i="",o=r.charCodeAt(0);++n<s;)0!=(t=r.charCodeAt(n))?i+=t>=1&&t<=31||127==t||0==n&&t>=48&&t<=57||1==n&&t>=48&&t<=57&&45==o?"\\"+t.toString(16)+" ":0==n&&1==s&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+r.charAt(n):r.charAt(n):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(t)}(void 0!==Iw?Iw:Mw)),Ow.exports;var e}var Ew,Rw,Nw,Tw={};var Pw,Fw,Dw,Lw,Bw,_w,Uw,jw,zw,Ww,Vw,Gw,Zw,Yw,Jw,$w,Xw,Hw,Kw,Qw=function(){if(Nw)return Rw;Nw=1,Aw();const{ShadowRootTypes:e,nodeNameInCorrectCase:t,NodeType:r}=(Ew||(Ew=1,Tw.nodeNameInCorrectCase=function(e){const t=e.shadowRoot&&e.shadowRoot.mode;return t?"#shadow-root ("+t+")":e.localName?e.localName.length!==e.nodeName.length?e.nodeName:e.localName:e.nodeName},Tw.shadowRootType=function(e){const t=e.ancestorShadowRoot();return t?t.mode:null},Tw.NodeType={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9},Tw.ShadowRootTypes={UserAgent:"user-agent",Open:"open",Closed:"closed"}),Tw);let s={DOMPath:{}};return s.DOMPath.fullQualifiedSelector=function(e,t){try{return e.nodeType!==r.ELEMENT_NODE?e.localName||e.nodeName.toLowerCase():s.DOMPath.cssPath(e,t)}catch(e){return null}},s.DOMPath.cssPath=function(e,t){if(e.nodeType!==r.ELEMENT_NODE)return"";const n=[];let i=e;for(;i;){const r=s.DOMPath._cssPathStep(i,!!t,i===e);if(!r)break;if(n.push(r),r.optimized)break;i=i.parentNode}return n.reverse(),n.join(" > ")},s.DOMPath.canGetJSPath=function(t){let r=t;for(;r;){if(r.shadowRoot&&r.shadowRoot.mode!==e.Open)return!1;r=r.shadowRoot&&r.shadowRoot.host}return!0},s.DOMPath.jsPath=function(e,t){if(e.nodeType!==r.ELEMENT_NODE)return"";const n=[];let i=e;for(;i;)n.push(s.DOMPath.cssPath(i,t)),i=i.shadowRoot&&i.shadowRoot.host;n.reverse();let o="";for(let e=0;e<n.length;++e){const t=JSON.stringify(n[e]);o+=e?`.shadowRoot.querySelector(${t})`:`document.querySelector(${t})`}return o},s.DOMPath._cssPathStep=function(e,n,i){if(e.nodeType!==r.ELEMENT_NODE)return null;const o=e.getAttribute("id");if(n){if(o)return new s.DOMPath.Step(h(o),!0);const r=e.nodeName.toLowerCase();if("body"===r||"head"===r||"html"===r)return new s.DOMPath.Step(t(e),!0)}const a=t(e);if(o)return new s.DOMPath.Step(a+h(o),!0);const l=e.parentNode;if(!l||l.nodeType===r.DOCUMENT_NODE)return new s.DOMPath.Step(a,!0);function c(e){const t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function h(e){return"#"+CSS.escape(e)}const u=c(e);let p=!1,d=!1,f=-1,m=-1;const g=l.children;for(let s=0;(-1===f||!d)&&s<g.length;++s){const n=g[s];if(n.nodeType!==r.ELEMENT_NODE)continue;if(m+=1,n===e){f=m;continue}if(d)continue;if(t(n)!==a)continue;p=!0;const i=new Set(u);if(!i.size){d=!0;continue}const o=c(n);for(let e=0;e<o.length;++e){const t=o[e];if(i.has(t)&&(i.delete(t),!i.size)){d=!0;break}}}let y=a;if(i&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(y+="[type="+CSS.escape(e.getAttribute("type"))+"]"),d)y+=":nth-child("+(f+1)+")";else if(p)for(const e of u)y+="."+CSS.escape(e.slice(1));return new s.DOMPath.Step(y,!1)},s.DOMPath.xPath=function(e,t){if(e.nodeType===r.DOCUMENT_NODE)return"/";const n=[];let i=e;for(;i;){const e=s.DOMPath._xPathValue(i,t);if(!e)break;if(n.push(e),e.optimized)break;i=i.parentNode}return n.reverse(),(n.length&&n[0].optimized?"":"/")+n.join("/")},s.DOMPath._xPathValue=function(e,t){let n;const i=s.DOMPath._xPathIndex(e);if(-1===i)return null;switch(e.nodeType){case r.ELEMENT_NODE:if(t&&e.getAttribute("id"))return new s.DOMPath.Step('//*[@id="'+e.getAttribute("id")+'"]',!0);n=e.localName;break;case r.ATTRIBUTE_NODE:n="@"+e.nodeName;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:n="text()";break;case r.PROCESSING_INSTRUCTION_NODE:n="processing-instruction()";break;case r.COMMENT_NODE:n="comment()";break;case r.DOCUMENT_NODE:default:n=""}return i>0&&(n+="["+i+"]"),new s.DOMPath.Step(n,e.nodeType===r.DOCUMENT_NODE)},s.DOMPath._xPathIndex=function(e){function t(e,t){if(e===t)return!0;if(e.nodeType===r.ELEMENT_NODE&&t.nodeType===r.ELEMENT_NODE)return e.localName===t.localName;if(e.nodeType===t.nodeType)return!0;return(e.nodeType===r.CDATA_SECTION_NODE?r.TEXT_NODE:e.nodeType)===(t.nodeType===r.CDATA_SECTION_NODE?r.TEXT_NODE:t.nodeType)}const s=e.parentNode?e.parentNode.children:null;if(!s)return 0;let n;for(let r=0;r<s.length;++r)if(t(e,s[r])&&s[r]!==e){n=!0;break}if(!n)return 0;let i=1;for(let r=0;r<s.length;++r)if(t(e,s[r])){if(s[r]===e)return i;++i}return-1},s.DOMPath.Step=class{constructor(e,t){this.value=e,this.optimized=t||!1}toString(){return this.value}},Rw=s.DOMPath}(),qw=xw(Qw);Fw=new WeakMap,Dw=new WeakMap,Lw=new WeakMap,Bw=new WeakMap,_w=new WeakMap,Jw=new WeakMap,Pw=new WeakSet,Uw=function(){document.addEventListener("click",e(this,Bw,"f"),!0)},jw=function(t){try{const r=t.target;if(!(r instanceof HTMLElement))return;const s=qw.xPath(r,!0),n=this.useLighterSnapshot?e(this,Pw,"m",zw).call(this,r):e(this,Pw,"m",Ww).call(this,r),i={event:s,is_raw:!0,snapshot:n?[n]:[],properties:{...this.getUserContext(),...this.getPageMetadata()}};this.userId&&(i.userId=this.userId),this.events.push(i),this.events.length>100&&(this.events=this.events.slice(-100))}catch(e){}},zw=function(t){if(!(t instanceof HTMLElement))return null;const r=document.body;if(!r)return null;const s=[];let n=t;for(;n&&1===n.nodeType&&n!==r;)s.unshift(n),n=n.parentElement;const i=[r,...s.filter(e=>e!==r)];let o=null,a=null;for(let t=0;t<i.length;t++){const r=i[t],s=t===i.length-1,n=e(this,Pw,"m",Vw).call(this,r,{isTarget:s,leadsToTarget:!s});o||(o=n),a&&(a.children||(a.children=[]),a.children.push(n)),a=n}const l=a;return l&&t.children.length>0&&(l.children=Array.from(t.children).filter(e=>e instanceof HTMLElement).map(t=>e(this,Pw,"m",Vw).call(this,t,{includeChildren:!0})).filter(Boolean)),o},Ww=function(t){if(!(t instanceof HTMLElement))return null;const r=[];let s=t;for(;s&&1===s.nodeType;)r.unshift(s),s=s.parentElement;let n=null,i=null;for(let t=0;t<r.length;t++){const s=r[t],o=t>=r.length-3,a=t===r.length-1,l=e(this,Pw,"m",Vw).call(this,s,{isTarget:a,leadsToTarget:!0});let c=[l];if(o&&s.parentElement){c=[l,...Array.from(s.parentElement.children).filter(e=>e!==s&&e instanceof HTMLElement).map(t=>e(this,Pw,"m",Vw).call(this,t,{includeChildren:!0})).filter(Boolean)]}n||(n=l),i&&(i.children||(i.children=[]),i.children.push(...c)),i=l}return n},Vw=function t(r,{isTarget:s=!1,includeChildren:n=!1,leadsToTarget:i=!1}={}){var o,a;const l=r.tagName.toLowerCase(),c=r.classList.length?Array.from(r.classList):null,h=r.id||null,u=r.getAttribute("href")||null,p=Array.from((null===(o=r.parentNode)||void 0===o?void 0:o.children)||[]).indexOf(r)+1,d=Array.from((null===(a=r.parentNode)||void 0===a?void 0:a.children)||[]).filter(e=>e instanceof HTMLElement&&e.tagName===r.tagName).indexOf(r)+1,f={};for(let e of Array.from(r.attributes))f[`attr__${e.name}`]=e.value;const m=Array.from(r.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE),g=m.map(e=>{var t;return null===(t=e.textContent)||void 0===t?void 0:t.trim()}).filter(Boolean).join(" ")||null,y={tag_name:l,nth_child:p,nth_of_type:d,attributes:f,...c?{attr_class:c}:{},...h?{attr_id:h}:{},...u?{href:u}:{},...g?{text:g}:{},...s?{is_target:!0}:{},...i&&!s?{leads_to_target:!0}:{}};return(n&&r.children.length>0||s)&&(y.children=Array.from(r.children).filter(e=>e instanceof HTMLElement).map(r=>e(this,Pw,"m",t).call(this,r,{includeChildren:!0})).filter(Boolean)),y},Gw=function(){t(this,Fw,setInterval(()=>{e(this,Jw,"f").call(this)},this.intervalTime),"f")},Zw=function(){t(this,Dw,history.pushState,"f"),t(this,Lw,history.replaceState,"f"),history.pushState=(...t)=>{e(this,Dw,"f").apply(history,t),e(this,Pw,"m",Yw).call(this)},history.replaceState=(...t)=>{e(this,Lw,"f").apply(history,t),e(this,Pw,"m",Yw).call(this)},window.addEventListener("popstate",e(this,_w,"f"))},Yw=function(){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.endsWith(".localhost")}())return;const e={event:"$ul_pageview",properties:this.getPageMetadata()};this.userId&&(e.userId=this.userId),this.events.push(e)},$w=function(){this.events=[]},Xw=function(){document.removeEventListener("click",e(this,Bw,"f"),!0)},Hw=function(){e(this,Jw,"f").call(this),clearInterval(e(this,Fw,"f")),e(this,Pw,"m",$w).call(this)},Kw=function(){history.pushState=e(this,Dw,"f"),history.replaceState=e(this,Lw,"f"),window.removeEventListener("popstate",e(this,_w,"f"))},exports.EventCollector=class{constructor(t){if(Pw.add(this),this.useLighterSnapshot=!1,this.userContext=null,Fw.set(this,void 0),Dw.set(this,void 0),Lw.set(this,void 0),Bw.set(this,e(this,Pw,"m",jw).bind(this)),_w.set(this,e(this,Pw,"m",Yw).bind(this)),Jw.set(this,()=>{if(0===this.events.length)return;const t=[...this.events];if(this.callback){try{this.callback(t)}catch(e){}e(this,Pw,"m",$w).call(this)}else Promise.allSettled([this.userId&&this.userTraits?Xy({userId:this.userId,traits:this.userTraits}):null,Hy(t)]),e(this,Pw,"m",$w).call(this)}),"undefined"==typeof window)return;const{userId:r,WRITE_CODE:s,callback:n,intervalTime:i=5e3,skipRawEvents:o=!1,useLighterSnapshot:a=!1}=t,l=t.userTraits;this.autoUploadModeEnabled=!n,this.autoUploadModeEnabled&&!(null==r?void 0:r.length)||this.autoUploadModeEnabled&&!(null==s?void 0:s.length)||(this.autoUploadModeEnabled&&Ky(s),(this.autoUploadModeEnabled||"function"==typeof n)&&(this.userId=r,this.userTraits="object"==typeof l&&null!==l?l:{},this.callback=n,this.intervalTime=i,this.events=[],o||(this.useLighterSnapshot=a,e(this,Pw,"m",Uw).call(this),e(this,Pw,"m",Zw).call(this)),e(this,Pw,"m",Gw).call(this),this.userContext=this.getUserContext()))}pushEvent(e){const t={is_raw:!1,...e,properties:{...null==e?void 0:e.properties,...this.getUserContext(),...this.getPageMetadata()}};this.userId&&(t.userId=this.userId),this.events.push(t)}identify(e,t){return Xy({userId:e,traits:t})}group(e,t){return(async e=>{if(!(null==e?void 0:e.groupId))return;const{groupId:t,traits:r,userId:s}=e,n={type:"group",groupId:t,...s&&{userId:s},source:"userlens-js-analytics-sdk",traits:r};if(!(await fetch(`${Jy}/event`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${$y()}`},body:JSON.stringify(n)})).ok)throw new Error("Userlens HTTP error: failed to identify");return"ok"})({groupId:e,traits:t,userId:this.userId})}updateUserTraits(e){this.userTraits=e}stop(){e(this,Pw,"m",Xw).call(this),e(this,Pw,"m",Hw).call(this),e(this,Pw,"m",Kw).call(this)}getUserContext(){var e,t,r,s,n,i,o;if(this.userContext)return this.userContext;const a=Cw.getParser(window.navigator.userAgent),l=a.getBrowser(),c=a.getOS(),h={$ul_browser:null!==(e=l.name)&&void 0!==e?e:"Unknown",$ul_browser_version:null!==(t=l.version)&&void 0!==t?t:"Unknown",$ul_os:null!==(r=c.name)&&void 0!==r?r:"Unknown",$ul_os_version:null!==(s=c.versionName)&&void 0!==s?s:"Unknown",$ul_browser_language:null!==(n=navigator.language)&&void 0!==n?n:"en-US",$ul_browser_language_prefix:null!==(o=null===(i=navigator.language)||void 0===i?void 0:i.split("-")[0])&&void 0!==o?o:"en",$ul_screen_width:window.screen.width,$ul_screen_height:window.screen.height,$ul_viewport_width:window.innerWidth,$ul_viewport_height:window.innerHeight,$ul_lib:"userlens.js",$ul_lib_version:"0.1.81",$ul_device_type:/Mobi|Android/i.test(navigator.userAgent)?"Mobile":"Desktop",$ul_timezone:Intl.DateTimeFormat().resolvedOptions().timeZone};return this.userContext=h,h}getPageMetadata(){try{const e=new URL(window.location.href);let t=document.referrer||"$direct",r="$direct";try{t&&/^https?:\/\//.test(t)&&(r=new URL(t).hostname)}catch(e){}const s=e.search.slice(1);return{$ul_page:e.origin+e.pathname,$ul_pathname:e.pathname,$ul_host:e.host,$ul_referrer:t,$ul_referring_domain:r,$ul_query:s}}catch(e){return{$ul_page:"",$ul_pathname:"",$ul_host:"",$ul_referrer:"",$ul_referring_domain:"",$ul_query:""}}}},exports.SessionRecorder=class{constructor({WRITE_CODE:r,userId:s,recordingOptions:n={}}){if(Qy.add(this),this.sessionEvents=[],this.rrwebStop=null,qy.set(this,void 0),nw.set(this,()=>{document.visibilityState&&gc()}),"undefined"==typeof window&&console.error("Userlens SDK error: unavailable outside of browser environment."),!(null==r?void 0:r.trim()))throw new Error("Userlens SDK Error: WRITE_CODE is required and must be a string");(null==s?void 0:s.trim())||console.error("Userlens SDK Error: userId is required to identify session user.");const{TIMEOUT:i=18e5,BUFFER_SIZE:o=10,maskingOptions:a=["passwords"]}=n;if("string"!=typeof r)throw new Error("WRITE_CODE must be a string to base64 encode it");Ky(r),this.userId=s,this.TIMEOUT=i,this.BUFFER_SIZE=o,this.maskingOptions=a,this.sessionEvents=[],t(this,qy,e(this,Qy,"m",ow).call(this,()=>{e(this,Qy,"m",aw).call(this)},5e3),"f"),e(this,Qy,"m",ew).call(this)}stop(){this.rrwebStop&&(this.rrwebStop(),this.rrwebStop=null,e(this,Qy,"m",lw).call(this),e(this,Qy,"m",cw).call(this),window.removeEventListener("visibilitychange",e(this,nw,"f")))}};
|
|
7
|
+
*/class Iw{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Cw(e,t)}static parse(e){return new Cw(e).getResult()}static get BROWSER_MAP(){return pw}static get ENGINE_MAP(){return mw}static get OS_MAP(){return fw}static get PLATFORMS_MAP(){return dw}}var xw="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function kw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ow,Mw={exports:{}},Aw=Mw.exports;
|
|
8
|
+
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */function Ew(){return Ow||(Ow=1,e=Mw,function(t){e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,r=String(e),s=r.length,n=-1,i="",o=r.charCodeAt(0);++n<s;)0!=(t=r.charCodeAt(n))?i+=t>=1&&t<=31||127==t||0==n&&t>=48&&t<=57||1==n&&t>=48&&t<=57&&45==o?"\\"+t.toString(16)+" ":0==n&&1==s&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+r.charAt(n):r.charAt(n):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(t)}(void 0!==xw?xw:Aw)),Mw.exports;var e}var Rw,Nw,Tw,Pw={};var Fw,Dw,Lw,Bw,_w,Uw,jw,zw,Ww,Vw,Gw,Zw,Yw,Jw,$w,Xw,Hw,Kw,Qw,qw=function(){if(Tw)return Nw;Tw=1,Ew();const{ShadowRootTypes:e,nodeNameInCorrectCase:t,NodeType:r}=(Rw||(Rw=1,Pw.nodeNameInCorrectCase=function(e){const t=e.shadowRoot&&e.shadowRoot.mode;return t?"#shadow-root ("+t+")":e.localName?e.localName.length!==e.nodeName.length?e.nodeName:e.localName:e.nodeName},Pw.shadowRootType=function(e){const t=e.ancestorShadowRoot();return t?t.mode:null},Pw.NodeType={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9},Pw.ShadowRootTypes={UserAgent:"user-agent",Open:"open",Closed:"closed"}),Pw);let s={DOMPath:{}};return s.DOMPath.fullQualifiedSelector=function(e,t){try{return e.nodeType!==r.ELEMENT_NODE?e.localName||e.nodeName.toLowerCase():s.DOMPath.cssPath(e,t)}catch(e){return null}},s.DOMPath.cssPath=function(e,t){if(e.nodeType!==r.ELEMENT_NODE)return"";const n=[];let i=e;for(;i;){const r=s.DOMPath._cssPathStep(i,!!t,i===e);if(!r)break;if(n.push(r),r.optimized)break;i=i.parentNode}return n.reverse(),n.join(" > ")},s.DOMPath.canGetJSPath=function(t){let r=t;for(;r;){if(r.shadowRoot&&r.shadowRoot.mode!==e.Open)return!1;r=r.shadowRoot&&r.shadowRoot.host}return!0},s.DOMPath.jsPath=function(e,t){if(e.nodeType!==r.ELEMENT_NODE)return"";const n=[];let i=e;for(;i;)n.push(s.DOMPath.cssPath(i,t)),i=i.shadowRoot&&i.shadowRoot.host;n.reverse();let o="";for(let e=0;e<n.length;++e){const t=JSON.stringify(n[e]);o+=e?`.shadowRoot.querySelector(${t})`:`document.querySelector(${t})`}return o},s.DOMPath._cssPathStep=function(e,n,i){if(e.nodeType!==r.ELEMENT_NODE)return null;const o=e.getAttribute("id");if(n){if(o)return new s.DOMPath.Step(h(o),!0);const r=e.nodeName.toLowerCase();if("body"===r||"head"===r||"html"===r)return new s.DOMPath.Step(t(e),!0)}const a=t(e);if(o)return new s.DOMPath.Step(a+h(o),!0);const l=e.parentNode;if(!l||l.nodeType===r.DOCUMENT_NODE)return new s.DOMPath.Step(a,!0);function c(e){const t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function h(e){return"#"+CSS.escape(e)}const u=c(e);let p=!1,d=!1,f=-1,m=-1;const g=l.children;for(let s=0;(-1===f||!d)&&s<g.length;++s){const n=g[s];if(n.nodeType!==r.ELEMENT_NODE)continue;if(m+=1,n===e){f=m;continue}if(d)continue;if(t(n)!==a)continue;p=!0;const i=new Set(u);if(!i.size){d=!0;continue}const o=c(n);for(let e=0;e<o.length;++e){const t=o[e];if(i.has(t)&&(i.delete(t),!i.size)){d=!0;break}}}let y=a;if(i&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(y+="[type="+CSS.escape(e.getAttribute("type"))+"]"),d)y+=":nth-child("+(f+1)+")";else if(p)for(const e of u)y+="."+CSS.escape(e.slice(1));return new s.DOMPath.Step(y,!1)},s.DOMPath.xPath=function(e,t){if(e.nodeType===r.DOCUMENT_NODE)return"/";const n=[];let i=e;for(;i;){const e=s.DOMPath._xPathValue(i,t);if(!e)break;if(n.push(e),e.optimized)break;i=i.parentNode}return n.reverse(),(n.length&&n[0].optimized?"":"/")+n.join("/")},s.DOMPath._xPathValue=function(e,t){let n;const i=s.DOMPath._xPathIndex(e);if(-1===i)return null;switch(e.nodeType){case r.ELEMENT_NODE:if(t&&e.getAttribute("id"))return new s.DOMPath.Step('//*[@id="'+e.getAttribute("id")+'"]',!0);n=e.localName;break;case r.ATTRIBUTE_NODE:n="@"+e.nodeName;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:n="text()";break;case r.PROCESSING_INSTRUCTION_NODE:n="processing-instruction()";break;case r.COMMENT_NODE:n="comment()";break;case r.DOCUMENT_NODE:default:n=""}return i>0&&(n+="["+i+"]"),new s.DOMPath.Step(n,e.nodeType===r.DOCUMENT_NODE)},s.DOMPath._xPathIndex=function(e){function t(e,t){if(e===t)return!0;if(e.nodeType===r.ELEMENT_NODE&&t.nodeType===r.ELEMENT_NODE)return e.localName===t.localName;if(e.nodeType===t.nodeType)return!0;return(e.nodeType===r.CDATA_SECTION_NODE?r.TEXT_NODE:e.nodeType)===(t.nodeType===r.CDATA_SECTION_NODE?r.TEXT_NODE:t.nodeType)}const s=e.parentNode?e.parentNode.children:null;if(!s)return 0;let n;for(let r=0;r<s.length;++r)if(t(e,s[r])&&s[r]!==e){n=!0;break}if(!n)return 0;let i=1;for(let r=0;r<s.length;++r)if(t(e,s[r])){if(s[r]===e)return i;++i}return-1},s.DOMPath.Step=class{constructor(e,t){this.value=e,this.optimized=t||!1}toString(){return this.value}},Nw=s.DOMPath}(),eb=kw(qw);Dw=new WeakMap,Lw=new WeakMap,Bw=new WeakMap,_w=new WeakMap,Uw=new WeakMap,$w=new WeakMap,Fw=new WeakSet,jw=function(){document.addEventListener("click",e(this,_w,"f"),!0)},zw=function(t){try{const r=t.target;if(!(r instanceof HTMLElement))return;const s=eb.xPath(r,!0),n=this.useLighterSnapshot?e(this,Fw,"m",Ww).call(this,r):e(this,Fw,"m",Vw).call(this,r),i={event:s,is_raw:!0,snapshot:n?[n]:[],properties:{...this.getUserContext(),...this.getPageMetadata()}};this.userId&&(i.userId=this.userId),this.events.push(i),this.events.length>100&&(this.events=this.events.slice(-100))}catch(e){}},Ww=function(t){if(!(t instanceof HTMLElement))return null;const r=document.body;if(!r)return null;const s=[];let n=t;for(;n&&1===n.nodeType&&n!==r;)s.unshift(n),n=n.parentElement;const i=[r,...s.filter(e=>e!==r)];let o=null,a=null;for(let t=0;t<i.length;t++){const r=i[t],s=t===i.length-1,n=e(this,Fw,"m",Gw).call(this,r,{isTarget:s,leadsToTarget:!s});o||(o=n),a&&(a.children||(a.children=[]),a.children.push(n)),a=n}const l=a;return l&&t.children.length>0&&(l.children=Array.from(t.children).filter(e=>e instanceof HTMLElement).map(t=>e(this,Fw,"m",Gw).call(this,t,{includeChildren:!0})).filter(Boolean)),o},Vw=function(t){if(!(t instanceof HTMLElement))return null;const r=[];let s=t;for(;s&&1===s.nodeType;)r.unshift(s),s=s.parentElement;let n=null,i=null;for(let t=0;t<r.length;t++){const s=r[t],o=t>=r.length-3,a=t===r.length-1,l=e(this,Fw,"m",Gw).call(this,s,{isTarget:a,leadsToTarget:!0});let c=[l];if(o&&s.parentElement){c=[l,...Array.from(s.parentElement.children).filter(e=>e!==s&&e instanceof HTMLElement).map(t=>e(this,Fw,"m",Gw).call(this,t,{includeChildren:!0})).filter(Boolean)]}n||(n=l),i&&(i.children||(i.children=[]),i.children.push(...c)),i=l}return n},Gw=function t(r,{isTarget:s=!1,includeChildren:n=!1,leadsToTarget:i=!1}={}){var o,a;const l=r.tagName.toLowerCase(),c=r.classList.length?Array.from(r.classList):null,h=r.id||null,u=r.getAttribute("href")||null,p=Array.from((null===(o=r.parentNode)||void 0===o?void 0:o.children)||[]).indexOf(r)+1,d=Array.from((null===(a=r.parentNode)||void 0===a?void 0:a.children)||[]).filter(e=>e instanceof HTMLElement&&e.tagName===r.tagName).indexOf(r)+1,f={};for(let e of Array.from(r.attributes))f[`attr__${e.name}`]=e.value;const m=Array.from(r.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE),g=m.map(e=>{var t;return null===(t=e.textContent)||void 0===t?void 0:t.trim()}).filter(Boolean).join(" ")||null,y={tag_name:l,nth_child:p,nth_of_type:d,attributes:f,...c?{attr_class:c}:{},...h?{attr_id:h}:{},...u?{href:u}:{},...g?{text:g}:{},...s?{is_target:!0}:{},...i&&!s?{leads_to_target:!0}:{}};return(n&&r.children.length>0||s)&&(y.children=Array.from(r.children).filter(e=>e instanceof HTMLElement).map(r=>e(this,Fw,"m",t).call(this,r,{includeChildren:!0})).filter(Boolean)),y},Zw=function(){t(this,Dw,setInterval(()=>{e(this,$w,"f").call(this)},this.intervalTime),"f")},Yw=function(){t(this,Lw,history.pushState,"f"),t(this,Bw,history.replaceState,"f"),history.pushState=(...t)=>{e(this,Lw,"f").apply(history,t),e(this,Fw,"m",Jw).call(this)},history.replaceState=(...t)=>{e(this,Bw,"f").apply(history,t),e(this,Fw,"m",Jw).call(this)},window.addEventListener("popstate",e(this,Uw,"f"))},Jw=function(){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.endsWith(".localhost")}())return;const e={event:"$ul_pageview",properties:this.getPageMetadata()};this.userId&&(e.userId=this.userId),this.events.push(e)},Xw=function(){this.events=[]},Hw=function(){document.removeEventListener("click",e(this,_w,"f"),!0)},Kw=function(){e(this,$w,"f").call(this),clearInterval(e(this,Dw,"f")),e(this,Fw,"m",Xw).call(this)},Qw=function(){history.pushState=e(this,Lw,"f"),history.replaceState=e(this,Bw,"f"),window.removeEventListener("popstate",e(this,Uw,"f"))},exports.EventCollector=class{constructor(t){if(Fw.add(this),this.useLighterSnapshot=!1,this.userContext=null,Dw.set(this,void 0),Lw.set(this,void 0),Bw.set(this,void 0),_w.set(this,e(this,Fw,"m",zw).bind(this)),Uw.set(this,e(this,Fw,"m",Jw).bind(this)),$w.set(this,()=>{if(0===this.events.length)return;const t=[...this.events];if(this.callback){try{this.callback(t)}catch(e){}e(this,Fw,"m",Xw).call(this)}else Promise.allSettled([this.userId&&this.userTraits?Xy({userId:this.userId,traits:this.userTraits}):null,this.groupId?Hy({groupId:this.groupId,traits:this.groupTraits,userId:this.userId}):null,Ky(t)]),e(this,Fw,"m",Xw).call(this)}),"undefined"==typeof window)return;const{userId:r,WRITE_CODE:s,callback:n,intervalTime:i=5e3,skipRawEvents:o=!1,useLighterSnapshot:a=!1}=t,l=t.userTraits,c=t.groupId,h=t.groupTraits;this.autoUploadModeEnabled=!n,this.autoUploadModeEnabled&&!(null==r?void 0:r.length)||this.autoUploadModeEnabled&&!(null==s?void 0:s.length)||(this.autoUploadModeEnabled&&Qy(s),(this.autoUploadModeEnabled||"function"==typeof n)&&(this.userId=r,this.userTraits="object"==typeof l&&null!==l?l:{},this.callback=n,this.intervalTime=i,this.events=[],c&&(this.groupId=c,this.groupTraits="object"==typeof h&&null!==h?h:{}),o||(this.useLighterSnapshot=a,e(this,Fw,"m",jw).call(this),e(this,Fw,"m",Yw).call(this)),e(this,Fw,"m",Zw).call(this),this.userContext=this.getUserContext()))}pushEvent(e){const t={is_raw:!1,...e,properties:{...null==e?void 0:e.properties,...this.getUserContext(),...this.getPageMetadata()}};this.userId&&(t.userId=this.userId),this.events.push(t)}identify(e,t){return Xy({userId:e,traits:t})}group(e,t){return Hy({groupId:e,traits:t,userId:this.userId})}updateUserTraits(e){this.userTraits=e}updateGroupTraits(e){this.groupTraits=e}stop(){e(this,Fw,"m",Hw).call(this),e(this,Fw,"m",Kw).call(this),e(this,Fw,"m",Qw).call(this)}getUserContext(){var e,t,r,s,n,i,o;if(this.userContext)return this.userContext;const a=Iw.getParser(window.navigator.userAgent),l=a.getBrowser(),c=a.getOS(),h={$ul_browser:null!==(e=l.name)&&void 0!==e?e:"Unknown",$ul_browser_version:null!==(t=l.version)&&void 0!==t?t:"Unknown",$ul_os:null!==(r=c.name)&&void 0!==r?r:"Unknown",$ul_os_version:null!==(s=c.versionName)&&void 0!==s?s:"Unknown",$ul_browser_language:null!==(n=navigator.language)&&void 0!==n?n:"en-US",$ul_browser_language_prefix:null!==(o=null===(i=navigator.language)||void 0===i?void 0:i.split("-")[0])&&void 0!==o?o:"en",$ul_screen_width:window.screen.width,$ul_screen_height:window.screen.height,$ul_viewport_width:window.innerWidth,$ul_viewport_height:window.innerHeight,$ul_lib:"userlens.js",$ul_lib_version:"0.1.83",$ul_device_type:/Mobi|Android/i.test(navigator.userAgent)?"Mobile":"Desktop",$ul_timezone:Intl.DateTimeFormat().resolvedOptions().timeZone};return this.userContext=h,h}getPageMetadata(){try{const e=new URL(window.location.href);let t=document.referrer||"$direct",r="$direct";try{t&&/^https?:\/\//.test(t)&&(r=new URL(t).hostname)}catch(e){}const s=e.search.slice(1);return{$ul_page:e.origin+e.pathname,$ul_pathname:e.pathname,$ul_host:e.host,$ul_referrer:t,$ul_referring_domain:r,$ul_query:s}}catch(e){return{$ul_page:"",$ul_pathname:"",$ul_host:"",$ul_referrer:"",$ul_referring_domain:"",$ul_query:""}}}},exports.SessionRecorder=class{constructor({WRITE_CODE:r,userId:s,recordingOptions:n={}}){if(qy.add(this),this.sessionEvents=[],this.rrwebStop=null,ew.set(this,void 0),iw.set(this,()=>{document.visibilityState&&gc()}),"undefined"==typeof window&&console.error("Userlens SDK error: unavailable outside of browser environment."),!(null==r?void 0:r.trim()))throw new Error("Userlens SDK Error: WRITE_CODE is required and must be a string");(null==s?void 0:s.trim())||console.error("Userlens SDK Error: userId is required to identify session user.");const{TIMEOUT:i=18e5,BUFFER_SIZE:o=10,maskingOptions:a=["passwords"]}=n;if("string"!=typeof r)throw new Error("WRITE_CODE must be a string to base64 encode it");Qy(r),this.userId=s,this.TIMEOUT=i,this.BUFFER_SIZE=o,this.maskingOptions=a,this.sessionEvents=[],t(this,ew,e(this,qy,"m",aw).call(this,()=>{e(this,qy,"m",lw).call(this)},5e3),"f"),e(this,qy,"m",tw).call(this)}stop(){this.rrwebStop&&(this.rrwebStop(),this.rrwebStop=null,e(this,qy,"m",cw).call(this),e(this,qy,"m",hw).call(this),window.removeEventListener("visibilitychange",e(this,iw,"f")))}};
|
|
9
9
|
//# sourceMappingURL=main.cjs.js.map
|