@tracelane/wdio 0.1.0-alpha.7 → 0.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-bundle.js +29 -29
- package/package.json +4 -4
package/dist/rrweb-bundle.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
"use strict";(()=>{var Hn=Object.defineProperty,Gn=(e,t,r)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t,r)=>Gn(e,typeof t!="symbol"?t+"":t,r),ws,Yn=Object.defineProperty,Xn=(e,t,r)=>t in e?Yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bs=(e,t,r)=>Xn(e,typeof t!="symbol"?t+"":t,r),Y=(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))(Y||{}),Ss={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={};function Jn(e){var t,r;let o=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Yr(e){if(Ze[e])return Ze[e];let t=Jn(e)||globalThis[e],r=t.prototype,o=e in Ss?Ss[e]:void 0,i=!!(o&&o.every(p=>{var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),a=e in vs?vs[e]:void 0,c=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(i&&c)return Ze[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let h=d[e].prototype;return document.body.removeChild(p),h?Ze[e]=h:r}catch{return r}}var Mt={};function ve(e,t,r){var o;let i=`${e}.${String(r)}`;if(Mt[i])return Mt[i].call(t);let a=Yr(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(Mt[i]=c,c.call(t)):t[r]}var Nt={};function Yi(e,t,r){let o=`${e}.${String(r)}`;if(Nt[o])return Nt[o].bind(t);let a=Yr(e)[r];return typeof a!="function"?t[r]:(Nt[o]=a,a.bind(t))}function Zn(e){return ve("Node",e,"childNodes")}function Kn(e){return ve("Node",e,"parentNode")}function Qn(e){return ve("Node",e,"parentElement")}function eo(e){return ve("Node",e,"textContent")}function to(e,t){return Yi("Node",e,"contains")(t)}function ro(e){return Yi("Node",e,"getRootNode")()}function so(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function io(e){return e.styleSheets}function no(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function oo(e,t){return ve("Element",e,"querySelector")(t)}function ao(e,t){return ve("Element",e,"querySelectorAll")(t)}function lo(){return Yr("MutationObserver").constructor}function uo(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var K={childNodes:Zn,parentNode:Kn,parentElement:Qn,textContent:eo,contains:to,getRootNode:ro,host:so,styleSheets:io,shadowRoot:no,querySelector:oo,querySelectorAll:ao,mutationObserver:lo,patch:uo};function Xi(e){return e.nodeType===e.ELEMENT_NODE}function We(e){let t=e&&"host"in e&&"mode"in e&&K.host(e)||null;return!!(t&&"shadowRoot"in t&&K.shadowRoot(t)===e)}function ze(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function co(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ho(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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(" ")+";"}function at(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>Ji(i,r)).join("");return co(o)}catch{return null}}function Ji(e,t){var r;if(po(e)){let o;try{o=at(e.styleSheet)||ho(e)}catch{o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return ut(o,e.styleSheet.href)}catch{}return o}else{let o=e.cssText;return mo(e)&&e.selectorText.includes(":")&&(o=fo(o)),t?ut(o,t):o}}function fo(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function po(e){return"styleSheet"in e}function mo(e){return"selectorText"in e}var lt=class{constructor(){bs(this,"idNodeMap",new Map),bs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function go(){return new lt}function Xr({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:a}){let c=i||"",p=o&&Re(o);return(t[r.toLowerCase()]||p&&t[p])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function Re(e){return e.toLowerCase()}var Cs="__rrweb_original__";function yo(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let a=t.getImageData,c=Cs in a?a[Cs]:a;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function Jr(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Zi(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return i?.[1]??null}function wo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var bo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,So=/^(?:[a-z+]+:)?\/\//i,vo=/^www\..*/i,Co=/^(data:)([^,]*),(.*)/i;function ut(e,t){return(e||"").replace(bo,(r,o,i,a,c,p)=>{let d=i||c||p,h=o||a||"";if(!d)return r;if(So.test(d)||vo.test(d))return`url(${h}${d}${h})`;if(Co.test(d))return`url(${h}${d}${h})`;if(d[0]==="/")return`url(${h}${wo(t)+d}${h})`;let s=t.split("/"),u=d.split("/");s.pop();for(let l of u)l!=="."&&(l===".."?s.pop():s.push(l));return`url(${h}${s.join("/")}${h})`})}var Eo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Es=4096;function xo(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>Es||e.naturalHeight>Es)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let a=i.getContext("2d");return a?(a.drawImage(e,0,0),i.toDataURL(r||"image/webp",o??.4)):t}catch{return t}}function Ro(e,t){return!t||e.length<=t?e:Eo}var Mo=1,No=new RegExp("[^a-z0-9-_:]"),qe=-2;function Ki(){return Mo++}function Oo(e){if(e instanceof HTMLFormElement)return"form";let t=Re(e.tagName);return No.test(t)?"div":t}var De,xs,Io=/^[^ \t\n\r\u000c]+/,Ao=/^[, \t\n\r\u000c]+/;function Do(e,t){if(t.trim()==="")return t;let r=0;function o(a){let c,p=a.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let i=[];for(;o(Ao),!(r>=t.length);){let a=o(Io);if(a.slice(-1)===",")a=ke(e,a.substring(0,a.length-1)),i.push(a);else{let c="";a=ke(e,a);let p=!1;for(;;){let d=t.charAt(r);if(d===""){i.push((a+c).trim());break}else if(p)d===")"&&(p=!1);else if(d===","){r+=1,i.push((a+c).trim());break}else d==="("&&(p=!0);c+=d,r+=1}}}return i.join(", ")}var Rs=new WeakMap;function ke(e,t){return!t||t.trim()===""?t:Zr(e,t)}function To(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Zr(e,t){let r=Rs.get(e);if(r||(r=e.createElement("a"),Rs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Qi(e,t,r,o,i,a){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=ke(e,o);if(t==="img"&&c.startsWith("data:")&&i){let p=i,d=c;return(a?.type||a?.quality!==void 0)&&(d=xo(p,c,a.type,a.quality)),a?.maxBase64ImageLength&&(d=Ro(d,a.maxBase64ImageLength)),d}return c}else{if(r==="xlink:href"&&o[0]!=="#")return ke(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return ke(e,o);if(r==="srcset")return Do(e,o);if(r==="style")return ut(o,Zr(e));if(t==="object"&&r==="data")return ke(e,o)}return o}function en(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function _o(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function ct(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ct(K.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?ct(K.parentNode(e),t,r):!1}function tn(e,t,r,o){let i;if(Xi(e)){if(i=e,!K.childNodes(i).length)return!1}else{if(K.parentElement(e)===null)return!1;i=K.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(ct(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function ko(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,a;try{a=o.document.readyState}catch{return}if(a!=="complete"){let p=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Lo(e,t,r){let o=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()})}function Po(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:c,inlineStylesheet:p,maskInputOptions:d={},maskTextFn:h,maskInputFn:s,dataURLOptions:u={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:f=!1}=t,g=Fo(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Wo(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:p,maskInputOptions:d,maskInputFn:s,dataURLOptions:u,inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:f,rootId:g});case e.TEXT_NODE:return Bo(e,{doc:r,needsMask:c,maskTextFn:h,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:K.textContent(e)||"",rootId:g};default:return!1}}function Fo(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Bo(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:a}=t,c=K.parentNode(e),p=c&&c.tagName,d=K.textContent(e),h=p==="STYLE"?!0:void 0,s=p==="SCRIPT"?!0:void 0;if(h&&d){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(d=at(c.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}d=ut(d,Zr(t.doc))}return s&&(d="SCRIPT_PLACEHOLDER"),!h&&!s&&d&&o&&(d=i?i(d,K.parentElement(e)):d.replace(/[\S]/g,"*")),{type:Y.Text,textContent:d||"",isStyle:h,rootId:a}}function Ms(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function Uo(e){return e.href}function Wo(e,t){var r,o;let{doc:i,blockClass:a,blockSelector:c,inlineStylesheet:p,maskInputOptions:d={},maskInputFn:h,dataURLOptions:s={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:n,newlyAddedElement:m=!1,rootId:f}=t,g=_o(e,a,c),S=Oo(e),w={},v=e.attributes.length;for(let y=0;y<v;y++){let b=e.attributes[y];en(S,b.name,b.value)||(w[b.name]=Qi(i,S,Re(b.name),b.value,e,s))}if(S==="link"&&p){let y=Uo(e);if(y){let b=Ms(i,y);if(!b&&y.includes(".css")){let x=window.location.origin,O=y.replace(window.location.href,""),M=x+"/"+O;b=Ms(i,M)}let C=null;b&&(C=at(b)),C&&(delete w.rel,delete w.href,w._cssText=C)}}if(S==="style"&&e.sheet&&!(e.innerText||K.textContent(e)||"").trim().length){let y=at(e.sheet);y&&(w._cssText=y)}if(S==="input"||S==="textarea"||S==="select"){let y=e.value,b=e.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&y?w.value=Xr({element:e,type:Jr(e),tagName:S,value:y,maskInputOptions:d,maskInputFn:h}):b&&(w.checked=b)}if(S==="option"&&(e.selected&&!d.select?w.selected=!0:delete w.selected),S==="dialog"&&e.open)try{w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch{w.rr_open_mode="modal",w.ph_rr_could_not_detect_modal=!0}if(S==="canvas"&&l){if(e.__context==="2d")yo(e)||(w.rr_dataURL=e.toDataURL(s.type,s.quality));else if(!("__context"in e)){let y=e.toDataURL(s.type,s.quality),b=i.createElement("canvas");b.width=e.width,b.height=e.height;let C=b.toDataURL(s.type,s.quality);y!==C&&(w.rr_dataURL=y)}}if(S==="img"&&u){De||(De=i.createElement("canvas"),xs=De.getContext("2d"));let y=e,b=y.currentSrc||y.getAttribute("src")||"<unknown-src>",C=y.crossOrigin,x=()=>{y.removeEventListener("load",x);try{De.width=y.naturalWidth,De.height=y.naturalHeight,xs.drawImage(y,0,0),w.rr_dataURL=De.toDataURL(s.type,s.quality)}catch(O){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${O}`)}y.crossOrigin==="anonymous"&&(C?w.crossOrigin=C:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x)}if(S==="audio"||S==="video"){let y=w;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),g){let{width:y,height:b,left:C,top:x}=e.getBoundingClientRect();w={class:w.class,rr_width:`${y}px`,rr_height:`${b}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}S==="iframe"&&!n(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(S)&&(E=!0)}catch{}return{type:Y.Element,tagName:S,attributes:w,childNodes:[],isSVG:To(e)||void 0,needBlock:g,rootId:f,isCustom:E}}function U(e){return e==null?"":e.toLowerCase()}function zo(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Zi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||U(e.attributes.name)==="application-name"||U(e.attributes.rel)==="icon"||U(e.attributes.rel)==="apple-touch-icon"||U(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||U(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(U(e.attributes.name)==="robots"||U(e.attributes.name)==="googlebot"||U(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(U(e.attributes.name)==="author"||U(e.attributes.name)==="generator"||U(e.attributes.name)==="framework"||U(e.attributes.name)==="publisher"||U(e.attributes.name)==="progid"||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(U(e.attributes.name)==="google-site-verification"||U(e.attributes.name)==="yandex-verification"||U(e.attributes.name)==="csrf-token"||U(e.attributes.name)==="p:domain_verify"||U(e.attributes.name)==="verify-v1"||U(e.attributes.name)==="verification"||U(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Le(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:p,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:s={},maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:C=!1}=t,{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;x||(x=tn(e,c,p,x===void 0));let M=Po(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let D;o.hasNode(e)?D=o.getId(e):zo(M,n)||!O&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?D=qe:D=Ki();let A=Object.assign(M,{id:D});if(o.add(e,A),D===qe)return null;S&&S(e);let ee=!d;if(A.type===Y.Element){ee=ee&&!A.needBlock,delete A.needBlock;let R=K.shadowRoot(e);R&&ze(R)&&(A.isShadowHost=!0)}if((A.type===Y.Document||A.type===Y.Element)&&ee){n.headWhitespace&&A.type===Y.Element&&A.tagName==="head"&&(O=!1);let R={doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:d,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b};if(!(A.type===Y.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0))for(let P of Array.from(K.childNodes(e))){let B=Le(P,R);B&&A.childNodes.push(B)}let X=null;if(Xi(e)&&(X=K.shadowRoot(e)))for(let P of Array.from(K.childNodes(X))){let B=Le(P,R);B&&(ze(X)&&(B.isShadow=!0),A.childNodes.push(B))}}let te=K.parentNode(e);return te&&We(te)&&ze(te)&&(A.isShadow=!0),A.type===Y.Element&&A.tagName==="iframe"&&ko(e,()=>{let R=e.contentDocument;if(R&&w){let X=Le(R,{doc:R,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b});X&&w(e,X)}},v),A.type===Y.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Zi(A.attributes.href)==="css")&&Lo(e,()=>{if(E){let R=Le(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b});R&&E(e,R)}},y),A}function $o(e,t){let{mirror:r=new lt,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,inlineImages:d=!1,recordCanvas:h=!1,maskAllInputs:s=!1,maskTextFn:u,maskInputFn:l,slimDOM:n=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y=()=>!1}=t||{};return Le(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:s===!0?{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}:s===!1?{password:!0}:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:m,inlineImages:d,recordCanvas:h,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y,newlyAddedElement:!1})}var qo=/(max|min)-device-(width|height)/,Rl=new RegExp(qo.source,"g");function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),r}var Ke={exports:{}},Ns;function Ho(){if(Ns)return Ke.exports;Ns=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}var Go={},Yo=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"})),he=Vo(Yo),Ot,Os;function Kr(){if(Os)return Ot;Os=1;let e=Ho(),t=he;class r extends Error{constructor(i,a,c,p,d,h){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),p&&(this.source=p),h&&(this.plugin=h),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,p=n=>n,d=n=>n;if(i){let{bold:n,gray:m,red:f}=e.createColors(!0);p=g=>n(f(g)),c=g=>m(g),t&&(d=g=>t(g))}let h=a.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),l=String(u).length;return h.slice(s,u).map((n,m)=>{let f=s+1+m,g=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(n.length>160){let w=20,v=Math.max(0,this.column-w),E=Math.max(this.column+w,this.endColumn+w),y=n.slice(v,E),b=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return p(">")+c(g)+d(y)+`
|
|
2
|
-
`+
|
|
1
|
+
"use strict";(()=>{var Gn=Object.defineProperty,Yn=(e,t,r)=>t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>Yn(e,typeof t!="symbol"?t+"":t,r),bs,Xn=Object.defineProperty,Jn=(e,t,r)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ws=(e,t,r)=>Jn(e,typeof t!="symbol"?t+"":t,r),Y=(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))(Y||{}),Ss={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={};function Zn(e){var t,r;let o=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Jr(e){if(Ze[e])return Ze[e];let t=Zn(e)||globalThis[e],r=t.prototype,o=e in Ss?Ss[e]:void 0,i=!!(o&&o.every(p=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),a=e in vs?vs[e]:void 0,c=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(i&&c)return Ze[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let f=d[e].prototype;return document.body.removeChild(p),f?Ze[e]=f:r}catch{return r}}var Nt={};function ve(e,t,r){var o;let i=`${e}.${String(r)}`;if(Nt[i])return Nt[i].call(t);let a=Jr(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(Nt[i]=c,c.call(t)):t[r]}var Tt={};function Yi(e,t,r){let o=`${e}.${String(r)}`;if(Tt[o])return Tt[o].bind(t);let a=Jr(e)[r];return typeof a!="function"?t[r]:(Tt[o]=a,a.bind(t))}function Kn(e){return ve("Node",e,"childNodes")}function Qn(e){return ve("Node",e,"parentNode")}function eo(e){return ve("Node",e,"parentElement")}function to(e){return ve("Node",e,"textContent")}function ro(e,t){return Yi("Node",e,"contains")(t)}function so(e){return Yi("Node",e,"getRootNode")()}function io(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function no(e){return e.styleSheets}function oo(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function ao(e,t){return ve("Element",e,"querySelector")(t)}function lo(e,t){return ve("Element",e,"querySelectorAll")(t)}function uo(){return Jr("MutationObserver").constructor}function co(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var K={childNodes:Kn,parentNode:Qn,parentElement:eo,textContent:to,contains:ro,getRootNode:so,host:io,styleSheets:no,shadowRoot:oo,querySelector:ao,querySelectorAll:lo,mutationObserver:uo,patch:co};function Xi(e){return e.nodeType===e.ELEMENT_NODE}function qe(e){let t=e&&"host"in e&&"mode"in e&&K.host(e)||null;return!!(t&&"shadowRoot"in t&&K.shadowRoot(t)===e)}function ze(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fo(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ho(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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(" ")+";"}function at(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>Ji(i,r)).join("");return fo(o)}catch{return null}}function Ji(e,t){var r;if(mo(e)){let o;try{o=at(e.styleSheet)||ho(e)}catch{o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return ut(o,e.styleSheet.href)}catch{}return o}else{let o=e.cssText;return go(e)&&e.selectorText.includes(":")&&(o=po(o)),t?ut(o,t):o}}function po(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function mo(e){return"styleSheet"in e}function go(e){return"selectorText"in e}var lt=class{constructor(){ws(this,"idNodeMap",new Map),ws(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function yo(){return new lt}function Zr({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:a}){let c=i||"",p=o&&Re(o);return(t[r.toLowerCase()]||p&&t[p])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function Re(e){return e.toLowerCase()}var Cs="__rrweb_original__";function bo(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let a=t.getImageData,c=Cs in a?a[Cs]:a;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function Kr(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Zi(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return i?.[1]??null}function wo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var So=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,vo=/^(?:[a-z+]+:)?\/\//i,Co=/^www\..*/i,Eo=/^(data:)([^,]*),(.*)/i;function ut(e,t){return(e||"").replace(So,(r,o,i,a,c,p)=>{let d=i||c||p,f=o||a||"";if(!d)return r;if(vo.test(d)||Co.test(d))return`url(${f}${d}${f})`;if(Eo.test(d))return`url(${f}${d}${f})`;if(d[0]==="/")return`url(${f}${wo(t)+d}${f})`;let s=t.split("/"),u=d.split("/");s.pop();for(let l of u)l!=="."&&(l===".."?s.pop():s.push(l));return`url(${f}${s.join("/")}${f})`})}var xo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Es=4096;function Ro(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>Es||e.naturalHeight>Es)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let a=i.getContext("2d");return a?(a.drawImage(e,0,0),i.toDataURL(r||"image/webp",o??.4)):t}catch{return t}}function Mo(e,t){return!t||e.length<=t?e:xo}var Oo=1,No=new RegExp("[^a-z0-9-_:]"),$e=-2;function Ki(){return Oo++}function To(e){if(e instanceof HTMLFormElement)return"form";let t=Re(e.tagName);return No.test(t)?"div":t}var Ae,xs,Io=/^[^ \t\n\r\u000c]+/,Ao=/^[, \t\n\r\u000c]+/;function Do(e,t){if(t.trim()==="")return t;let r=0;function o(a){let c,p=a.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let i=[];for(;o(Ao),!(r>=t.length);){let a=o(Io);if(a.slice(-1)===",")a=Le(e,a.substring(0,a.length-1)),i.push(a);else{let c="";a=Le(e,a);let p=!1;for(;;){let d=t.charAt(r);if(d===""){i.push((a+c).trim());break}else if(p)d===")"&&(p=!1);else if(d===","){r+=1,i.push((a+c).trim());break}else d==="("&&(p=!0);c+=d,r+=1}}}return i.join(", ")}var Rs=new WeakMap;function Le(e,t){return!t||t.trim()===""?t:Qr(e,t)}function _o(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Qr(e,t){let r=Rs.get(e);if(r||(r=e.createElement("a"),Rs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Qi(e,t,r,o,i,a){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=Le(e,o);if(t==="img"&&c.startsWith("data:")&&i){let p=i,d=c;return(a?.type||a?.quality!==void 0)&&(d=Ro(p,c,a.type,a.quality)),a?.maxBase64ImageLength&&(d=Mo(d,a.maxBase64ImageLength)),d}return c}else{if(r==="xlink:href"&&o[0]!=="#")return Le(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Le(e,o);if(r==="srcset")return Do(e,o);if(r==="style")return ut(o,Qr(e));if(t==="object"&&r==="data")return Le(e,o)}return o}function en(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Lo(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function ct(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ct(K.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?ct(K.parentNode(e),t,r):!1}function tn(e,t,r,o){let i;if(Xi(e)){if(i=e,!K.childNodes(i).length)return!1}else{if(K.parentElement(e)===null)return!1;i=K.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(ct(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function ko(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,a;try{a=o.document.readyState}catch{return}if(a!=="complete"){let p=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Po(e,t,r){let o=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()})}function Fo(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:c,inlineStylesheet:p,maskInputOptions:d={},maskTextFn:f,maskInputFn:s,dataURLOptions:u={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:h=!1}=t,g=Bo(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return zo(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:p,maskInputOptions:d,maskInputFn:s,dataURLOptions:u,inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:h,rootId:g});case e.TEXT_NODE:return Uo(e,{doc:r,needsMask:c,maskTextFn:f,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:K.textContent(e)||"",rootId:g};default:return!1}}function Bo(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Uo(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:a}=t,c=K.parentNode(e),p=c&&c.tagName,d=K.textContent(e),f=p==="STYLE"?!0:void 0,s=p==="SCRIPT"?!0:void 0;if(f&&d){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(d=at(c.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}d=ut(d,Qr(t.doc))}return s&&(d="SCRIPT_PLACEHOLDER"),!f&&!s&&d&&o&&(d=i?i(d,K.parentElement(e)):d.replace(/[\S]/g,"*")),{type:Y.Text,textContent:d||"",isStyle:f,rootId:a}}function Ms(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function qo(e){return e.href}function zo(e,t){var r,o;let{doc:i,blockClass:a,blockSelector:c,inlineStylesheet:p,maskInputOptions:d={},maskInputFn:f,dataURLOptions:s={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:n,newlyAddedElement:m=!1,rootId:h}=t,g=Lo(e,a,c),S=To(e),b={},v=e.attributes.length;for(let y=0;y<v;y++){let w=e.attributes[y];en(S,w.name,w.value)||(b[w.name]=Qi(i,S,Re(w.name),w.value,e,s))}if(S==="link"&&p){let y=qo(e);if(y){let w=Ms(i,y);if(!w&&y.includes(".css")){let x=window.location.origin,N=y.replace(window.location.href,""),M=x+"/"+N;w=Ms(i,M)}let C=null;w&&(C=at(w)),C&&(delete b.rel,delete b.href,b._cssText=C)}}if(S==="style"&&e.sheet&&!(e.innerText||K.textContent(e)||"").trim().length){let y=at(e.sheet);y&&(b._cssText=y)}if(S==="input"||S==="textarea"||S==="select"){let y=e.value,w=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=Zr({element:e,type:Kr(e),tagName:S,value:y,maskInputOptions:d,maskInputFn:f}):w&&(b.checked=w)}if(S==="option"&&(e.selected&&!d.select?b.selected=!0:delete b.selected),S==="dialog"&&e.open)try{b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch{b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if(S==="canvas"&&l){if(e.__context==="2d")bo(e)||(b.rr_dataURL=e.toDataURL(s.type,s.quality));else if(!("__context"in e)){let y=e.toDataURL(s.type,s.quality),w=i.createElement("canvas");w.width=e.width,w.height=e.height;let C=w.toDataURL(s.type,s.quality);y!==C&&(b.rr_dataURL=y)}}if(S==="img"&&u){Ae||(Ae=i.createElement("canvas"),xs=Ae.getContext("2d"));let y=e,w=y.currentSrc||y.getAttribute("src")||"<unknown-src>",C=y.crossOrigin,x=()=>{y.removeEventListener("load",x);try{Ae.width=y.naturalWidth,Ae.height=y.naturalHeight,xs.drawImage(y,0,0),b.rr_dataURL=Ae.toDataURL(s.type,s.quality)}catch(N){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${w}! Error: ${N}`)}y.crossOrigin==="anonymous"&&(C?b.crossOrigin=C:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x)}if(S==="audio"||S==="video"){let y=b;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),g){let{width:y,height:w,left:C,top:x}=e.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${w}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}S==="iframe"&&!n(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let E;try{customElements.get(S)&&(E=!0)}catch{}return{type:Y.Element,tagName:S,attributes:b,childNodes:[],isSVG:_o(e)||void 0,needBlock:g,rootId:h,isCustom:E}}function U(e){return e==null?"":e.toLowerCase()}function Wo(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Zi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||U(e.attributes.name)==="application-name"||U(e.attributes.rel)==="icon"||U(e.attributes.rel)==="apple-touch-icon"||U(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||U(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(U(e.attributes.name)==="robots"||U(e.attributes.name)==="googlebot"||U(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(U(e.attributes.name)==="author"||U(e.attributes.name)==="generator"||U(e.attributes.name)==="framework"||U(e.attributes.name)==="publisher"||U(e.attributes.name)==="progid"||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(U(e.attributes.name)==="google-site-verification"||U(e.attributes.name)==="yandex-verification"||U(e.attributes.name)==="csrf-token"||U(e.attributes.name)==="p:domain_verify"||U(e.attributes.name)==="verify-v1"||U(e.attributes.name)==="verification"||U(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ke(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:p,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:s={},maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m={},inlineImages:h=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=t,{needsMask:x}=t,{preserveWhiteSpace:N=!0}=t;x||(x=tn(e,c,p,x===void 0));let M=Fo(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,inlineStylesheet:f,maskInputOptions:s,maskTextFn:u,maskInputFn:l,dataURLOptions:m,inlineImages:h,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let A;o.hasNode(e)?A=o.getId(e):Wo(M,n)||!N&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?A=$e:A=Ki();let I=Object.assign(M,{id:A});if(o.add(e,I),A===$e)return null;S&&S(e);let ee=!d;if(I.type===Y.Element){ee=ee&&!I.needBlock,delete I.needBlock;let R=K.shadowRoot(e);R&&ze(R)&&(I.isShadowHost=!0)}if((I.type===Y.Document||I.type===Y.Element)&&ee){n.headWhitespace&&I.type===Y.Element&&I.tagName==="head"&&(N=!1);let R={doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:d,inlineStylesheet:f,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w};if(!(I.type===Y.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0))for(let P of Array.from(K.childNodes(e))){let B=ke(P,R);B&&I.childNodes.push(B)}let X=null;if(Xi(e)&&(X=K.shadowRoot(e)))for(let P of Array.from(K.childNodes(X))){let B=ke(P,R);B&&(ze(X)&&(B.isShadow=!0),I.childNodes.push(B))}}let te=K.parentNode(e);return te&&qe(te)&&ze(te)&&(I.isShadow=!0),I.type===Y.Element&&I.tagName==="iframe"&&ko(e,()=>{let R=e.contentDocument;if(R&&b){let X=ke(R,{doc:R,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:f,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});X&&b(e,X)}},v),I.type===Y.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&Zi(I.attributes.href)==="css")&&Po(e,()=>{if(E){let R=ke(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:f,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});R&&E(e,R)}},y),I}function $o(e,t){let{mirror:r=new lt,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:s=!1,maskTextFn:u,maskInputFn:l,slimDOM:n=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y=()=>!1}=t||{};return ke(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:s===!0?{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}:s===!1?{password:!0}:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y,newlyAddedElement:!1})}var Ho=/(max|min)-device-(width|height)/,Nl=new RegExp(Ho.source,"g");function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),r}var Ke={exports:{}},Os;function Go(){if(Os)return Ke.exports;Os=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}var Yo={},Xo=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),fe=Vo(Xo),It,Ns;function es(){if(Ns)return It;Ns=1;let e=Go(),t=fe;class r extends Error{constructor(i,a,c,p,d,f){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),p&&(this.source=p),f&&(this.plugin=f),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,p=n=>n,d=n=>n;if(i){let{bold:n,gray:m,red:h}=e.createColors(!0);p=g=>n(h(g)),c=g=>m(g),t&&(d=g=>t(g))}let f=a.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),l=String(u).length;return f.slice(s,u).map((n,m)=>{let h=s+1+m,g=" "+(" "+h).slice(-l)+" | ";if(h===this.line){if(n.length>160){let b=20,v=Math.max(0,this.column-b),E=Math.max(this.column+b,this.endColumn+b),y=n.slice(v,E),w=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return p(">")+c(g)+d(y)+`
|
|
2
|
+
`+w+p("^")}let S=c(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+c(g)+d(n)+`
|
|
3
3
|
`+S+p("^")}return" "+c(g)+d(n)}).join(`
|
|
4
4
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
5
5
|
|
|
6
6
|
`+i+`
|
|
7
|
-
`),this.name+": "+this.message+i}}return
|
|
7
|
+
`),this.name+": "+this.message+i}}return It=r,r.default=r,It}var At,Ts;function rn(){if(Ts)return At;Ts=1;let e={after:`
|
|
8
8
|
`,beforeClose:`
|
|
9
9
|
`,beforeComment:`
|
|
10
10
|
`,beforeDecl:`
|
|
11
11
|
`,beforeOpen:" ",beforeRule:`
|
|
12
12
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let c="@"+i.name,p=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?c+=i.raws.afterName:p&&(c+=" "),i.nodes)this.block(i,c+p);else{let d=(i.raws.between||"")+(a?";":"");this.builder(c+p+d,i)}}beforeAfter(i,a){let c;i.type==="decl"?c=this.raw(i,null,"beforeDecl"):i.type==="comment"?c=this.raw(i,null,"beforeComment"):a==="before"?c=this.raw(i,null,"beforeRule"):c=this.raw(i,null,"beforeClose");let p=i.parent,d=0;for(;p&&p.type!=="root";)d+=1,p=p.parent;if(c.includes(`
|
|
13
|
-
`)){let
|
|
13
|
+
`)){let f=this.raw(i,null,"indent");if(f.length)for(let s=0;s<d;s++)c+=f}return c}block(i,a){let c=this.raw(i,"between","beforeOpen");this.builder(a+c+"{",i,"start");let p;i.nodes&&i.nodes.length?(this.body(i),p=this.raw(i,"after")):p=this.raw(i,"after","emptyBody"),p&&this.builder(p),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let c=this.raw(i,"semicolon");for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,a!==p||c)}}comment(i){let a=this.raw(i,"left","commentLeft"),c=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+c+"*/",i)}decl(i,a){let c=this.raw(i,"between","colon"),p=i.prop+c+this.rawValue(i,"value");i.important&&(p+=i.raws.important||" !important"),a&&(p+=";"),this.builder(p,i)}document(i){this.body(i)}raw(i,a,c){let p;if(c||(c=a),a&&(p=i.raws[a],typeof p<"u"))return p;let d=i.parent;if(c==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[c];let f=i.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[c]<"u")return f.rawCache[c];if(c==="before"||c==="after")return this.beforeAfter(i,c);{let s="raw"+t(c);this[s]?p=this[s](f,i):f.walk(u=>{if(p=u.raws[a],typeof p<"u")return!1})}return typeof p>"u"&&(p=e[c]),f.rawCache[c]=p,p}rawBeforeClose(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length>0&&typeof c.raws.after<"u")return a=c.raws.after,a.includes(`
|
|
14
14
|
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let c;return i.walkComments(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
|
|
15
15
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),typeof c>"u"?c=this.raw(a,null,"beforeDecl"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeDecl(i,a){let c;return i.walkDecls(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
|
|
16
16
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),typeof c>"u"?c=this.raw(a,null,"beforeRule"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeOpen(i){let a;return i.walk(c=>{if(c.type!=="decl"&&(a=c.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(i){let a;return i.walk(c=>{if(c.nodes&&(c.parent!==i||i.first!==c)&&typeof c.raws.before<"u")return a=c.raws.before,a.includes(`
|
|
17
17
|
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(c=>{if(typeof c.raws.between<"u")return a=c.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length===0&&(a=c.raws.after,typeof a<"u"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(c=>{let p=c.parent;if(p&&p!==i&&p.parent&&p.parent===i&&typeof c.raws.before<"u"){let d=c.raws.before.split(`
|
|
18
|
-
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(i,a){let c=i[a],p=i.raws[a];return p&&p.value===c?p.raw:c}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return
|
|
19
|
-
`?(s=1,u+=1):s+=1}return l}class p{constructor(
|
|
20
|
-
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(h.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(h.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+h.word.length))}else h.start?s={column:h.start.column,line:h.start.line}:h.index&&(s=this.positionInside(h.index)),h.end?u={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?u=this.positionInside(h.endIndex):h.index&&(u=this.positionInside(h.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(h,s){return new t().raw(this,h,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let s=this,u=!1;for(let l of h)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let f=this[m];if(Array.isArray(f))u[m]=f.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof f=="object"&&f.toJSON)u[m]=f.toJSON(null,s);else if(m==="source"){let g=s.get(f.input);g==null&&(g=n,s.set(f.input,n),n++),u[m]={end:f.end,inputId:g,start:f.start}}else u[m]=f}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=r){h.stringify&&(h=h.stringify);let s="";return h(this,u=>{s+=u}),s}warn(h,s,u){let l={node:this};for(let n in u)l[n]=u[n];return h.warn(s,l)}get proxyOf(){return this}}return Dt=p,p.default=p,Dt}var Tt,_s;function Ve(){if(_s)return Tt;_s=1;let e=gt();class t extends e{constructor(o){super(o),this.type="comment"}}return Tt=t,t.default=t,Tt}var _t,ks;function yt(){if(ks)return _t;ks=1;let e=gt();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return _t=t,t.default=t,_t}var kt,Ls;function Me(){if(Ls)return kt;Ls=1;let e=Ve(),t=yt(),r=gt(),{isClean:o,my:i}=Qr(),a,c,p,d;function h(l){return l.map(n=>(n.nodes&&(n.nodes=h(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=n(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>n[m](...f.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?f=>n[m]((g,...S)=>f(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,f){return n[m]===f||(n[m]=f,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let f=this.index(n),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(n);for(let w of g)this.proxyOf.nodes.splice(f+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],f<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let f=this.index(n),g=f===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(n);for(let v of S)this.proxyOf.nodes.splice(f,0,v);let w;for(let v in this.indexes)w=this.indexes[v],f<=w&&(this.indexes[v]=w+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=h(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=n&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(n,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,f))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,f)=>{let g;try{g=n(m,f)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&n.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(n){return this.walk((m,f)=>{if(m.type==="comment")return n(m,f)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&n.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&n.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="rule")return m(f,g)}))}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]}}return u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},kt=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},kt}var Lt,Ps;function es(){if(Ps)return Lt;Ps=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Lt=t,t.default=t,e.registerAtRule(t),Lt}var Pt,Fs;function ts(){if(Fs)return Pt;Fs=1;let e=Me(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},Pt=o,o.default=o,Pt}var Ft,Bs;function Xo(){if(Bs)return Ft;Bs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ft={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},Ft}var Bt,Us;function sn(){if(Us)return Bt;Us=1;let{existsSync:e,readFileSync:t}=he,{dirname:r,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:a}=he;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(h,s){if(s.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=h.match(l)||h.match(n);if(m)return decodeURIComponent(h.substr(m[0].length));let f=h.match(s)||h.match(u);if(f)return c(h.substr(f[0].length));let g=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=h.lastIndexOf(s.pop()),l=h.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,l)))}loadFile(h){if(this.root=r(h),e(h))return this.mapFile=h,t(h,"utf-8").toString().trim()}loadMap(h,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(h);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=o(r(h),u)),this.loadFile(u)}}}startWith(h,s){return h?h.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Bt=p,p.default=p,Bt}var Ut,Ws;function wt(){if(Ws)return Ut;Ws=1;let{nanoid:e}=Xo(),{isAbsolute:t,resolve:r}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:a,pathToFileURL:c}=he,p=Kr(),d=sn(),h=he,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let w=S.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(f,g,S,w={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,v=O.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let b=this.origin(g,S,E,v);return b?y=new p(f,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,w.plugin):y=new p(f,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,w.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(f){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
21
|
-
`);S=new Array(v.length);let E=0;for(let y=0,
|
|
22
|
-
`," "];return e.split(t,r)},split(t,r,o){let i=[],a="",c=!1,p=0,d=!1,
|
|
18
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(i,a){let c=i[a],p=i.raws[a];return p&&p.value===c?p.raw:c}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return At=r,r.default=r,At}var Dt,Is;function mt(){if(Is)return Dt;Is=1;let e=rn();function t(r,o){new e(o).stringify(r)}return Dt=t,t.default=t,Dt}var Qe={},As;function ts(){return As||(As=1,Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my")),Qe}var _t,Ds;function gt(){if(Ds)return _t;Ds=1;let e=es(),t=rn(),r=mt(),{isClean:o,my:i}=ts();function a(d,f){let s=new d.constructor;for(let u in d){if(!Object.prototype.hasOwnProperty.call(d,u)||u==="proxyCache")continue;let l=d[u],n=typeof l;u==="parent"&&n==="object"?f&&(s[u]=f):u==="source"?s[u]=l:Array.isArray(l)?s[u]=l.map(m=>a(m,s)):(n==="object"&&l!==null&&(l=a(l)),s[u]=l)}return s}function c(d,f){if(f&&typeof f.offset<"u")return f.offset;let s=1,u=1,l=0;for(let n=0;n<d.length;n++){if(u===f.line&&s===f.column){l=n;break}d[n]===`
|
|
19
|
+
`?(s=1,u+=1):s+=1}return l}class p{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let s in f)if(s==="nodes"){this.nodes=[];for(let u of f[s])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[s]=f[s]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let s=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let s in f)this[s]=f[s];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let s=a(this);for(let u in f)s[u]=f[u];return s}cloneAfter(f={}){let s=this.clone(f);return this.parent.insertAfter(this,s),s}cloneBefore(f={}){let s=this.clone(f);return this.parent.insertBefore(this,s),s}error(f,s={}){if(this.source){let{end:u,start:l}=this.rangeBy(s);return this.source.input.error(f,{column:l.column,line:l.line},{column:u.column,line:u.line},s)}return new e(f)}getProxyProcessor(){return{get(f,s){return s==="proxyOf"?f:s==="root"?()=>f.root().toProxy():f[s]},set(f,s,u){return f[s]===u||(f[s]=u,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let s=this.source.start;if(f.index)s=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(c(u,this.source.start),c(u,this.source.end)).indexOf(f.word);n!==-1&&(s=this.positionInside(n))}return s}positionInside(f){let s=this.source.start.column,u=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,n=c(l,this.source.start),m=n+f;for(let h=n;h<m;h++)l[h]===`
|
|
20
|
+
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(f.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(f.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+f.word.length))}else f.start?s={column:f.start.column,line:f.start.line}:f.index&&(s=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(f,s){return new t().raw(this,f,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let s=this,u=!1;for(let l of f)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let h=this[m];if(Array.isArray(h))u[m]=h.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof h=="object"&&h.toJSON)u[m]=h.toJSON(null,s);else if(m==="source"){let g=s.get(h.input);g==null&&(g=n,s.set(h.input,n),n++),u[m]={end:h.end,inputId:g,start:h.start}}else u[m]=h}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=r){f.stringify&&(f=f.stringify);let s="";return f(this,u=>{s+=u}),s}warn(f,s,u){let l={node:this};for(let n in u)l[n]=u[n];return f.warn(s,l)}get proxyOf(){return this}}return _t=p,p.default=p,_t}var Lt,_s;function je(){if(_s)return Lt;_s=1;let e=gt();class t extends e{constructor(o){super(o),this.type="comment"}}return Lt=t,t.default=t,Lt}var kt,Ls;function yt(){if(Ls)return kt;Ls=1;let e=gt();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return kt=t,t.default=t,kt}var Pt,ks;function Me(){if(ks)return Pt;ks=1;let e=je(),t=yt(),r=gt(),{isClean:o,my:i}=ts(),a,c,p,d;function f(l){return l.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=n(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>n[m](...h.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?h=>n[m]((g,...S)=>h(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,h){return n[m]===h||(n[m]=h,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let h=this.index(n),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(n);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],h<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let h=this.index(n),g=h===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(n);for(let v of S)this.proxyOf.nodes.splice(h,0,v);let b;for(let v in this.indexes)b=this.indexes[v],h<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=f(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=n&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(n,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,h))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,h)=>{let g;try{g=n(m,h)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&n.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(n){return this.walk((m,h)=>{if(m.type==="comment")return n(m,h)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&n.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&n.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}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]}}return u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},Pt=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},Pt}var Ft,Ps;function rs(){if(Ps)return Ft;Ps=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Ft=t,t.default=t,e.registerAtRule(t),Ft}var Bt,Fs;function ss(){if(Fs)return Bt;Fs=1;let e=Me(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},Bt=o,o.default=o,Bt}var Ut,Bs;function Jo(){if(Bs)return Ut;Bs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ut={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},Ut}var qt,Us;function sn(){if(Us)return qt;Us=1;let{existsSync:e,readFileSync:t}=fe,{dirname:r,join:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:a}=fe;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(f,s){if(s.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=f.match(l)||f.match(n);if(m)return decodeURIComponent(f.substr(m[0].length));let h=f.match(s)||f.match(u);if(h)return c(f.substr(h[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let s=f.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=f.lastIndexOf(s.pop()),l=f.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,l)))}loadFile(f){if(this.root=r(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(f);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(r(f),u)),this.loadFile(u)}}}startWith(f,s){return f?f.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return qt=p,p.default=p,qt}var zt,qs;function bt(){if(qs)return zt;qs=1;let{nanoid:e}=Jo(),{isAbsolute:t,resolve:r}=fe,{SourceMapConsumer:o,SourceMapGenerator:i}=fe,{fileURLToPath:a,pathToFileURL:c}=fe,p=es(),d=sn(),f=fe,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(h,g,S,b={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let N=this.fromOffset(C.offset);g=N.line,S=N.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let N=this.fromOffset(x.offset);E=N.line,v=N.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,v);return w?y=new p(h,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new p(h,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(h){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
21
|
+
`);S=new Array(v.length);let E=0;for(let y=0,w=v.length;y<w;y++)S[y]=E,E+=v[y].length+1;this[s]=S}g=S[S.length-1];let b=0;if(h>=g)b=S.length-1;else{let v=S.length-2,E;for(;b<v;)if(E=b+(v-b>>1),h<S[E])v=E-1;else if(h>=S[E+1])b=E+1;else{b=E;break}}return{col:h-S[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:r(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,S,b){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:h});if(!E.source)return!1;let y;typeof S=="number"&&(y=v.originalPositionFor({column:b,line:S}));let w;t(E.source)?w=c(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(a)C.file=a(w);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return zt=n,n.default=n,f&&f.registerInput&&f.registerInput(n),zt}var Wt,zs;function Ve(){if(zs)return Wt;zs=1;let e=Me(),t,r;class o extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,c,p){let d=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let f of d)f.raws.before=c.raws.before}return d}removeChild(a,c){let p=this.index(a);return!c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},Wt=o,o.default=o,e.registerRoot(o),Wt}var $t,Ws;function nn(){if(Ws)return $t;Ws=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
22
|
+
`," "];return e.split(t,r)},split(t,r,o){let i=[],a="",c=!1,p=0,d=!1,f="",s=!1;for(let u of t)s?s=!1:u==="\\"?s=!0:d?u===f&&(d=!1):u==='"'||u==="'"?(d=!0,f=u):u==="("?p+=1:u===")"?p>0&&(p-=1):p===0&&r.includes(u)&&(c=!0),c?(a!==""&&i.push(a.trim()),a="",c=!1):a+=u;return(o||a!=="")&&i.push(a.trim()),i}};return $t=e,e.default=e,$t}var Ht,$s;function is(){if($s)return Ht;$s=1;let e=Me(),t=nn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(c)}}return Ht=r,r.default=r,e.registerRule(r),Ht}var jt,Hs;function Zo(){if(Hs)return jt;Hs=1;let e=rs(),t=je(),r=yt(),o=bt(),i=sn(),a=Ve(),c=is();function p(d,f){if(Array.isArray(d))return d.map(l=>p(l));let{inputs:s,...u}=d;if(s){f=[];for(let l of s){let n={...l,__proto__:o.prototype};n.map&&(n.map={...n.map,__proto__:i.prototype}),f.push(n)}}if(u.nodes&&(u.nodes=d.nodes.map(l=>p(l,f))),u.source){let{inputId:l,...n}=u.source;u.source=n,l!=null&&(u.source.input=f[l])}if(u.type==="root")return new a(u);if(u.type==="decl")return new r(u);if(u.type==="rule")return new c(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+d.type)}return jt=p,p.default=p,jt}var Vt,js;function on(){if(js)return Vt;js=1;let{dirname:e,relative:t,resolve:r,sep:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:a}=fe,{pathToFileURL:c}=fe,p=bt(),d=!!(i&&a),f=!!(e&&r&&t&&o);class s{constructor(l,n,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=n,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let n=`
|
|
23
23
|
`;this.css.includes(`\r
|
|
24
24
|
`)&&(n=`\r
|
|
25
|
-
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),m=l.root||e(l.file),
|
|
26
|
-
`),n=w.length-g):n+=w.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let f=t(m,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return jt=s,jt}var Vt,Hs;function an(){if(Hs)return Vt;Hs=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,h=91,s=93,u=40,l=41,n=123,m=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Vt=function(x,O={}){let M=x.css.valueOf(),D=O.ignoreErrors,A,ee,te,R,X,P,B,J,j,be,me=M.length,N=0,ne=[],oe=[];function Ie(){return N}function ge(G){throw x.error("Unclosed "+G,N)}function ue(){return oe.length===0&&N>=me}function ie(G){if(oe.length)return oe.pop();if(N>=me)return;let T=G?G.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case i:case a:case p:case d:case c:{R=N;do R+=1,A=M.charCodeAt(R);while(A===a||A===i||A===p||A===d||A===c);P=["space",M.slice(N,R)],N=R-1;break}case h:case s:case n:case m:case S:case f:case l:{let Z=String.fromCharCode(A);P=[Z,Z,N];break}case u:{if(be=ne.length?ne.pop()[1]:"",j=M.charCodeAt(N+1),be==="url"&&j!==e&&j!==t&&j!==a&&j!==i&&j!==p&&j!==c&&j!==d){R=N;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(D||T){R=N;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),ee=M.slice(N,R+1),R===-1||y.test(ee)?P=["(","(",N]:(P=["brackets",ee,N,R],N=R);break}case e:case t:{X=A===e?"'":'"',R=N;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(D||T){R=N+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(N,R+1),N,R],N=R;break}case w:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(A=M.charCodeAt(R+1),te&&A!==o&&A!==a&&A!==i&&A!==p&&A!==d&&A!==c&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(N,R+1),N,R],N=R;break}default:{A===o&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(D||T?R=M.length:ge("comment")),P=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(N,R+1),N,R],ne.push(P),N=R);break}}return N++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Ie}},Vt}var Ht,Gs;function ln(){if(Gs)return Ht;Gs=1;let e=es(),t=Ve(),r=yt(),o=He(),i=rs(),a=an(),c={empty:!0,space:!0};function p(h){for(let s=h.length-1;s>=0;s--){let u=h[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[f,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)f.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,w);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=w;y>0;y--){let b=v[y][0];if(E.trim().startsWith("!")&&b!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,f=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")m||(m=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,f,g=l.length,S="",w=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],f=m[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?w=!1:S+=m[1]:w=!1):S+=m[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Ht=d,Ht}var Gt,Ys;function ss(){if(Ys)return Gt;Ys=1;let e=Me(),t=wt(),r=ln();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return Gt=o,o.default=o,e.registerParse(o),Gt}var Yt,Xs;function un(){if(Xs)return Yt;Xs=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Yt=e,e.default=e,Yt}var Xt,Js;function is(){if(Js)return Xt;Js=1;let e=un();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Xt=t,t.default=t,Xt}var Jt,Zs;function cn(){if(Zs)return Jt;Zs=1;let e={};return Jt=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Jt}var Zt,Ks;function hn(){if(Ks)return Zt;Ks=1;let e=Me(),t=ts(),r=on(),o=ss(),i=is(),a=He(),c=mt(),{isClean:p,my:d}=Qr(),h=cn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let y=!1,b=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:E.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=f(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let w={};class v{constructor(y,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=S(b);else if(b instanceof v||b instanceof i)x=S(b.root),b.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=o;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?y(b,C,b[C][x]):y(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let x=y.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 y of this.plugins){let b=this.runOnRoot(y);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,x]of y){this.result.lastPlugin=C;let O;try{O=x(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,D]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return D(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let M=b.iterator,D;for(;D=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!D[p]){D[p]=!0,y.push(g(D));return}b.iterator=0,delete C.indexes[M]}let O=b.events;for(;b.eventIndex<O.length;){let M=O[b.eventIndex];if(b.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,b.iterator=C.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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"}}return v.registerPostcss=E=>{w=E},Zt=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Zt}var Kt,Qs;function Zo(){if(Qs)return Kt;Qs=1;let e=on(),t=ss(),r=is(),o=mt(),i=cn();class a{constructor(p,d,h){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=h,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,f]=n.generate();m&&(this.result.css=m),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}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 p,d=t;try{p=d(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return Kt=a,a.default=a,Kt}var Qt,ei;function Ko(){if(ei)return Qt;ei=1;let e=ts(),t=hn(),r=Zo(),o=He();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Qt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Qt}var er,ti;function fn(){if(ti)return er;ti=1;let e=es(),t=Ve(),r=Me(),o=Kr(),i=yt(),a=ts(),c=Jo(),p=wt(),d=hn(),h=nn(),s=gt(),u=ss(),l=Ko(),n=is(),m=He(),f=rs(),g=mt(),S=un();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(E,y){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
25
|
+
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),m=l.root||e(l.file),h;this.mapOpts.sourcesContent===!1?(h=new i(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,n,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,v,E)=>{if(this.css+=b,v&&E!=="end"&&(h.generated.line=l,h.generated.column=n-1,v.source&&v.source.start?(h.source=this.sourcePath(v),h.original.line=v.source.start.line,h.original.column=v.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),S=b.match(/\n/g),S?(l+=S.length,g=b.lastIndexOf(`
|
|
26
|
+
`),n=b.length-g):n+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=l,h.generated.column=n-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=n-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let h=t(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return Vt=s,Vt}var Gt,Vs;function an(){if(Vs)return Gt;Vs=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,f=91,s=93,u=40,l=41,n=123,m=125,h=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Gt=function(x,N={}){let M=x.css.valueOf(),A=N.ignoreErrors,I,ee,te,R,X,P,B,J,H,we,me=M.length,O=0,ne=[],oe=[];function Te(){return O}function ge(G){throw x.error("Unclosed "+G,O)}function ue(){return oe.length===0&&O>=me}function ie(G){if(oe.length)return oe.pop();if(O>=me)return;let D=G?G.ignoreUnclosed:!1;switch(I=M.charCodeAt(O),I){case i:case a:case p:case d:case c:{R=O;do R+=1,I=M.charCodeAt(R);while(I===a||I===i||I===p||I===d||I===c);P=["space",M.slice(O,R)],O=R-1;break}case f:case s:case n:case m:case S:case h:case l:{let Z=String.fromCharCode(I);P=[Z,Z,O];break}case u:{if(we=ne.length?ne.pop()[1]:"",H=M.charCodeAt(O+1),we==="url"&&H!==e&&H!==t&&H!==a&&H!==i&&H!==p&&H!==c&&H!==d){R=O;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(A||D){R=O;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),ee=M.slice(O,R+1),R===-1||y.test(ee)?P=["(","(",O]:(P=["brackets",ee,O,R],O=R);break}case e:case t:{X=I===e?"'":'"',R=O;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(A||D){R=O+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(O,R+1),O,R],O=R;break}case b:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(I=M.charCodeAt(R+1),te&&I!==o&&I!==a&&I!==i&&I!==p&&I!==d&&I!==c&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(O,R+1),O,R],O=R;break}default:{I===o&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(A||D?R=M.length:ge("comment")),P=["comment",M.slice(O,R+1),O,R],O=R):(E.lastIndex=O+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(O,R+1),O,R],ne.push(P),O=R);break}}return O++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Te}},Gt}var Yt,Gs;function ln(){if(Gs)return Yt;Gs=1;let e=rs(),t=je(),r=yt(),o=Ve(),i=is(),a=an(),c={empty:!0,space:!0};function p(f){for(let s=f.length-1;s>=0;s--){let u=f[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,h=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){h=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),h&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[h,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return h}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let b=s[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)h.push(s.shift());this.precheckMissedSemicolon(s);for(let b=s.length-1;b>=0;b--){if(m=s[b],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,b);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().startsWith("!")&&w!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,h=[],g=s[1].startsWith("--"),S=[],b=s;for(;b;){if(l=b[0],S.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),h.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,h,g=l.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],h=m[0],h==="space"&&y===g-1&&!n?b=!1:h==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let y=l.reduce((w,C)=>w+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Yt=d,Yt}var Xt,Ys;function ns(){if(Ys)return Xt;Ys=1;let e=Me(),t=bt(),r=ln();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return Xt=o,o.default=o,e.registerParse(o),Xt}var Jt,Xs;function un(){if(Xs)return Jt;Xs=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Jt=e,e.default=e,Jt}var Zt,Js;function os(){if(Js)return Zt;Js=1;let e=un();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Zt=t,t.default=t,Zt}var Kt,Zs;function cn(){if(Zs)return Kt;Zs=1;let e={};return Kt=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Kt}var Qt,Ks;function fn(){if(Ks)return Qt;Ks=1;let e=Me(),t=ss(),r=on(),o=ns(),i=os(),a=Ve(),c=mt(),{isClean:p,my:d}=ts(),f=cn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let y=!1,w=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=h(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let x;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))x=S(w);else if(w instanceof v||w instanceof i)x=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let N=o;C.syntax&&(N=C.syntax.parse),C.parser&&(N=C.parser),N.parse&&(N=N.parse);try{x=N(w,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(N=>typeof N=="object"&&N.prepare?{...N,...N.prepare(this.result)}:N)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(w,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,x])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let x in w[C])x==="*"?y(w,C,w[C][x]):y(w,C+"-"+x.toLowerCase(),w[C][x]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(m(C))try{await C}catch(x){let N=w[w.length-1].node;throw this.handleError(x,N)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let x=y.nodes.map(N=>C(N,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=c;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let x=new r(w,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 y of this.plugins){let w=this.runOnRoot(y);if(m(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,x]of y){this.result.lastPlugin=C;let N;try{N=x(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(m(N))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:x}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&w.visitorIndex<x.length){let[M,A]=x[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===x.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return A(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(w.iterator!==0){let M=w.iterator,A;for(;A=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!A[p]){A[p]=!0,y.push(g(A));return}w.iterator=0,delete C.indexes[M]}let N=w.events;for(;w.eventIndex<N.length;){let M=N[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let w=h(y);for(let C of w)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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"}}return v.registerPostcss=E=>{b=E},Qt=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Qt}var er,Qs;function Ko(){if(Qs)return er;Qs=1;let e=on(),t=ns(),r=os(),o=mt(),i=cn();class a{constructor(p,d,f){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=f,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,h]=n.generate();m&&(this.result.css=m),h&&(this.result.map=h)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}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 p,d=t;try{p=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return er=a,a.default=a,er}var tr,ei;function Qo(){if(ei)return tr;ei=1;let e=ss(),t=fn(),r=Ko(),o=Ve();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return tr=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),tr}var rr,ti;function hn(){if(ti)return rr;ti=1;let e=rs(),t=je(),r=Me(),o=es(),i=yt(),a=ss(),c=Zo(),p=bt(),d=fn(),f=nn(),s=gt(),u=ns(),l=Qo(),n=os(),m=Ve(),h=is(),g=mt(),S=un();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return b.plugin=function(E,y){let w=!1;function C(...N){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
27
27
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
28
|
-
https://www.w3ctech.com/topic/2226`));let M=y(...
|
|
29
|
-
`+
|
|
28
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...N);return M.postcssPlugin=E,M.postcssVersion=new l().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(N,M,A){return b([C(A)]).process(N,M)},C},b.stringify=g,b.parse=u,b.fromJSON=c,b.list=f,b.comment=v=>new t(v),b.atRule=v=>new e(v),b.decl=v=>new i(v),b.rule=v=>new h(v),b.root=v=>new m(v),b.document=v=>new a(v),b.CssSyntaxError=o,b.Declaration=i,b.Container=r,b.Processor=l,b.Document=a,b.Comment=t,b.Warning=S,b.AtRule=e,b.Result=n,b.Input=p,b.Rule=h,b.Root=m,b.Node=s,d.registerPostcss(b),rr=b,b.default=b,rr}var sr,ri;function ea(){if(ri)return sr;ri=1;let e=je(),t=ln(),r=an();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let p=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:p.col,line:p.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=f[2],c.raws.left=f[1],c.raws.right=f[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let p,d;for(p=c-1;p>=0&&a[p][0]!=="word";p--);if(p===0||p<0)return;for(d=p-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let f=a.slice(p),s=a.slice(d,p);a.splice(d,a.length-d),this.spaces=s.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return sr=o,sr}var ir,si;function ta(){if(si)return ir;si=1;let{Input:e}=hn(),t=ea();return ir=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},ir}var Tl=ta();var ra=hn(),z=jo(ra);z.stringify;z.fromJSON;z.plugin;z.parse;z.list;z.document;z.comment;z.atRule;z.rule;z.decl;z.root;z.CssSyntaxError;z.Declaration;z.Container;z.Processor;z.Document;z.Comment;z.Warning;z.AtRule;z.Result;z.Input;z.Rule;z.Root;z.Node;var sa=Object.defineProperty,ia=(e,t,r)=>t in e?sa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ae=(e,t,r)=>ia(e,typeof t!="symbol"?t+"":t,r);function na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),r}var et={exports:{}},ii;function aa(){if(ii)return et.exports;ii=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return et.exports=t(),et.exports.createColors=t,et.exports}var la={},ua=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),he=oa(ua),nr,ni;function as(){if(ni)return nr;ni=1;let e=aa(),t=he;class r extends Error{constructor(i,a,c,p,d,f){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),p&&(this.source=p),f&&(this.plugin=f),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,p=n=>n,d=n=>n;if(i){let{bold:n,gray:m,red:h}=e.createColors(!0);p=g=>n(h(g)),c=g=>m(g),t&&(d=g=>t(g))}let f=a.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),l=String(u).length;return f.slice(s,u).map((n,m)=>{let h=s+1+m,g=" "+(" "+h).slice(-l)+" | ";if(h===this.line){if(n.length>160){let b=20,v=Math.max(0,this.column-b),E=Math.max(this.column+b,this.endColumn+b),y=n.slice(v,E),w=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return p(">")+c(g)+d(y)+`
|
|
29
|
+
`+w+p("^")}let S=c(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+c(g)+d(n)+`
|
|
30
30
|
`+S+p("^")}return" "+c(g)+d(n)}).join(`
|
|
31
31
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
32
32
|
|
|
33
33
|
`+i+`
|
|
34
|
-
`),this.name+": "+this.message+i}}return
|
|
34
|
+
`),this.name+": "+this.message+i}}return nr=r,r.default=r,nr}var or,oi;function dn(){if(oi)return or;oi=1;let e={after:`
|
|
35
35
|
`,beforeClose:`
|
|
36
36
|
`,beforeComment:`
|
|
37
37
|
`,beforeDecl:`
|
|
38
38
|
`,beforeOpen:" ",beforeRule:`
|
|
39
39
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let c="@"+i.name,p=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?c+=i.raws.afterName:p&&(c+=" "),i.nodes)this.block(i,c+p);else{let d=(i.raws.between||"")+(a?";":"");this.builder(c+p+d,i)}}beforeAfter(i,a){let c;i.type==="decl"?c=this.raw(i,null,"beforeDecl"):i.type==="comment"?c=this.raw(i,null,"beforeComment"):a==="before"?c=this.raw(i,null,"beforeRule"):c=this.raw(i,null,"beforeClose");let p=i.parent,d=0;for(;p&&p.type!=="root";)d+=1,p=p.parent;if(c.includes(`
|
|
40
|
-
`)){let
|
|
40
|
+
`)){let f=this.raw(i,null,"indent");if(f.length)for(let s=0;s<d;s++)c+=f}return c}block(i,a){let c=this.raw(i,"between","beforeOpen");this.builder(a+c+"{",i,"start");let p;i.nodes&&i.nodes.length?(this.body(i),p=this.raw(i,"after")):p=this.raw(i,"after","emptyBody"),p&&this.builder(p),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let c=this.raw(i,"semicolon");for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,a!==p||c)}}comment(i){let a=this.raw(i,"left","commentLeft"),c=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+c+"*/",i)}decl(i,a){let c=this.raw(i,"between","colon"),p=i.prop+c+this.rawValue(i,"value");i.important&&(p+=i.raws.important||" !important"),a&&(p+=";"),this.builder(p,i)}document(i){this.body(i)}raw(i,a,c){let p;if(c||(c=a),a&&(p=i.raws[a],typeof p<"u"))return p;let d=i.parent;if(c==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[c];let f=i.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[c]<"u")return f.rawCache[c];if(c==="before"||c==="after")return this.beforeAfter(i,c);{let s="raw"+t(c);this[s]?p=this[s](f,i):f.walk(u=>{if(p=u.raws[a],typeof p<"u")return!1})}return typeof p>"u"&&(p=e[c]),f.rawCache[c]=p,p}rawBeforeClose(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length>0&&typeof c.raws.after<"u")return a=c.raws.after,a.includes(`
|
|
41
41
|
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let c;return i.walkComments(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
|
|
42
42
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),typeof c>"u"?c=this.raw(a,null,"beforeDecl"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeDecl(i,a){let c;return i.walkDecls(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
|
|
43
43
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),typeof c>"u"?c=this.raw(a,null,"beforeRule"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeOpen(i){let a;return i.walk(c=>{if(c.type!=="decl"&&(a=c.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(i){let a;return i.walk(c=>{if(c.nodes&&(c.parent!==i||i.first!==c)&&typeof c.raws.before<"u")return a=c.raws.before,a.includes(`
|
|
44
44
|
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(c=>{if(typeof c.raws.between<"u")return a=c.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length===0&&(a=c.raws.after,typeof a<"u"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(c=>{let p=c.parent;if(p&&p!==i&&p.parent&&p.parent===i&&typeof c.raws.before<"u"){let d=c.raws.before.split(`
|
|
45
|
-
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(i,a){let c=i[a],p=i.raws[a];return p&&p.value===c?p.raw:c}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return
|
|
46
|
-
`?(s=1,u+=1):s+=1}return l}class p{constructor(
|
|
47
|
-
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(h.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(h.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+h.word.length))}else h.start?s={column:h.start.column,line:h.start.line}:h.index&&(s=this.positionInside(h.index)),h.end?u={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?u=this.positionInside(h.endIndex):h.index&&(u=this.positionInside(h.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(h,s){return new t().raw(this,h,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let s=this,u=!1;for(let l of h)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let f=this[m];if(Array.isArray(f))u[m]=f.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof f=="object"&&f.toJSON)u[m]=f.toJSON(null,s);else if(m==="source"){let g=s.get(f.input);g==null&&(g=n,s.set(f.input,n),n++),u[m]={end:f.end,inputId:g,start:f.start}}else u[m]=f}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=r){h.stringify&&(h=h.stringify);let s="";return h(this,u=>{s+=u}),s}warn(h,s,u){let l={node:this};for(let n in u)l[n]=u[n];return h.warn(s,l)}get proxyOf(){return this}}return or=p,p.default=p,or}var ar,ci;function Ge(){if(ci)return ar;ci=1;let e=St();class t extends e{constructor(o){super(o),this.type="comment"}}return ar=t,t.default=t,ar}var lr,hi;function vt(){if(hi)return lr;hi=1;let e=St();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return lr=t,t.default=t,lr}var ur,fi;function Ne(){if(fi)return ur;fi=1;let e=Ge(),t=vt(),r=St(),{isClean:o,my:i}=os(),a,c,p,d;function h(l){return l.map(n=>(n.nodes&&(n.nodes=h(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=n(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>n[m](...f.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?f=>n[m]((g,...S)=>f(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,f){return n[m]===f||(n[m]=f,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let f=this.index(n),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(n);for(let w of g)this.proxyOf.nodes.splice(f+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],f<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let f=this.index(n),g=f===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(n);for(let v of S)this.proxyOf.nodes.splice(f,0,v);let w;for(let v in this.indexes)w=this.indexes[v],f<=w&&(this.indexes[v]=w+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=h(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=n&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(n,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,f))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,f)=>{let g;try{g=n(m,f)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&n.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(n){return this.walk((m,f)=>{if(m.type==="comment")return n(m,f)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&n.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&n.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="rule")return m(f,g)}))}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]}}return u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},ur=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},ur}var cr,di;function as(){if(di)return cr;di=1;let e=Ne();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return cr=t,t.default=t,e.registerAtRule(t),cr}var hr,pi;function ls(){if(pi)return hr;pi=1;let e=Ne(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},hr=o,o.default=o,hr}var fr,mi;function ua(){if(mi)return fr;mi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return fr={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},fr}var dr,gi;function pn(){if(gi)return dr;gi=1;let{existsSync:e,readFileSync:t}=fe,{dirname:r,join:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:a}=fe;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(h,s){if(s.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=h.match(l)||h.match(n);if(m)return decodeURIComponent(h.substr(m[0].length));let f=h.match(s)||h.match(u);if(f)return c(h.substr(f[0].length));let g=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=h.lastIndexOf(s.pop()),l=h.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,l)))}loadFile(h){if(this.root=r(h),e(h))return this.mapFile=h,t(h,"utf-8").toString().trim()}loadMap(h,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(h);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=o(r(h),u)),this.loadFile(u)}}}startWith(h,s){return h?h.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return dr=p,p.default=p,dr}var pr,yi;function Ct(){if(yi)return pr;yi=1;let{nanoid:e}=ua(),{isAbsolute:t,resolve:r}=fe,{SourceMapConsumer:o,SourceMapGenerator:i}=fe,{fileURLToPath:a,pathToFileURL:c}=fe,p=ns(),d=pn(),h=fe,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let w=S.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(f,g,S,w={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,v=O.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let b=this.origin(g,S,E,v);return b?y=new p(f,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,w.plugin):y=new p(f,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,w.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(f){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
48
|
-
`);S=new Array(v.length);let E=0;for(let y=0,
|
|
49
|
-
`," "];return e.split(t,r)},split(t,r,o){let i=[],a="",c=!1,p=0,d=!1,
|
|
45
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(i,a){let c=i[a],p=i.raws[a];return p&&p.value===c?p.raw:c}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return or=r,r.default=r,or}var ar,ai;function wt(){if(ai)return ar;ai=1;let e=dn();function t(r,o){new e(o).stringify(r)}return ar=t,t.default=t,ar}var tt={},li;function ls(){return li||(li=1,tt.isClean=Symbol("isClean"),tt.my=Symbol("my")),tt}var lr,ui;function St(){if(ui)return lr;ui=1;let e=as(),t=dn(),r=wt(),{isClean:o,my:i}=ls();function a(d,f){let s=new d.constructor;for(let u in d){if(!Object.prototype.hasOwnProperty.call(d,u)||u==="proxyCache")continue;let l=d[u],n=typeof l;u==="parent"&&n==="object"?f&&(s[u]=f):u==="source"?s[u]=l:Array.isArray(l)?s[u]=l.map(m=>a(m,s)):(n==="object"&&l!==null&&(l=a(l)),s[u]=l)}return s}function c(d,f){if(f&&typeof f.offset<"u")return f.offset;let s=1,u=1,l=0;for(let n=0;n<d.length;n++){if(u===f.line&&s===f.column){l=n;break}d[n]===`
|
|
46
|
+
`?(s=1,u+=1):s+=1}return l}class p{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let s in f)if(s==="nodes"){this.nodes=[];for(let u of f[s])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[s]=f[s]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let s=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let s in f)this[s]=f[s];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let s=a(this);for(let u in f)s[u]=f[u];return s}cloneAfter(f={}){let s=this.clone(f);return this.parent.insertAfter(this,s),s}cloneBefore(f={}){let s=this.clone(f);return this.parent.insertBefore(this,s),s}error(f,s={}){if(this.source){let{end:u,start:l}=this.rangeBy(s);return this.source.input.error(f,{column:l.column,line:l.line},{column:u.column,line:u.line},s)}return new e(f)}getProxyProcessor(){return{get(f,s){return s==="proxyOf"?f:s==="root"?()=>f.root().toProxy():f[s]},set(f,s,u){return f[s]===u||(f[s]=u,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let s=this.source.start;if(f.index)s=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(c(u,this.source.start),c(u,this.source.end)).indexOf(f.word);n!==-1&&(s=this.positionInside(n))}return s}positionInside(f){let s=this.source.start.column,u=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,n=c(l,this.source.start),m=n+f;for(let h=n;h<m;h++)l[h]===`
|
|
47
|
+
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(f.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(f.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+f.word.length))}else f.start?s={column:f.start.column,line:f.start.line}:f.index&&(s=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(f,s){return new t().raw(this,f,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let s=this,u=!1;for(let l of f)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let h=this[m];if(Array.isArray(h))u[m]=h.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof h=="object"&&h.toJSON)u[m]=h.toJSON(null,s);else if(m==="source"){let g=s.get(h.input);g==null&&(g=n,s.set(h.input,n),n++),u[m]={end:h.end,inputId:g,start:h.start}}else u[m]=h}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=r){f.stringify&&(f=f.stringify);let s="";return f(this,u=>{s+=u}),s}warn(f,s,u){let l={node:this};for(let n in u)l[n]=u[n];return f.warn(s,l)}get proxyOf(){return this}}return lr=p,p.default=p,lr}var ur,ci;function Ge(){if(ci)return ur;ci=1;let e=St();class t extends e{constructor(o){super(o),this.type="comment"}}return ur=t,t.default=t,ur}var cr,fi;function vt(){if(fi)return cr;fi=1;let e=St();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return cr=t,t.default=t,cr}var fr,hi;function Oe(){if(hi)return fr;hi=1;let e=Ge(),t=vt(),r=St(),{isClean:o,my:i}=ls(),a,c,p,d;function f(l){return l.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=n(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>n[m](...h.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?h=>n[m]((g,...S)=>h(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,h){return n[m]===h||(n[m]=h,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let h=this.index(n),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(n);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],h<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let h=this.index(n),g=h===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(n);for(let v of S)this.proxyOf.nodes.splice(h,0,v);let b;for(let v in this.indexes)b=this.indexes[v],h<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=f(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=n&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(n,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,h))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,h)=>{let g;try{g=n(m,h)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&n.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(n){return this.walk((m,h)=>{if(m.type==="comment")return n(m,h)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&n.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&n.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===n)return m(h,g)}):(m=n,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}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]}}return u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},fr=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},fr}var hr,di;function us(){if(di)return hr;di=1;let e=Oe();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return hr=t,t.default=t,e.registerAtRule(t),hr}var dr,pi;function cs(){if(pi)return dr;pi=1;let e=Oe(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},dr=o,o.default=o,dr}var pr,mi;function ca(){if(mi)return pr;mi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return pr={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},pr}var mr,gi;function pn(){if(gi)return mr;gi=1;let{existsSync:e,readFileSync:t}=he,{dirname:r,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:a}=he;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(f,s){if(s.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=f.match(l)||f.match(n);if(m)return decodeURIComponent(f.substr(m[0].length));let h=f.match(s)||f.match(u);if(h)return c(f.substr(h[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let s=f.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=f.lastIndexOf(s.pop()),l=f.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,l)))}loadFile(f){if(this.root=r(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(f);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(r(f),u)),this.loadFile(u)}}}startWith(f,s){return f?f.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return mr=p,p.default=p,mr}var gr,yi;function Ct(){if(yi)return gr;yi=1;let{nanoid:e}=ca(),{isAbsolute:t,resolve:r}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:a,pathToFileURL:c}=he,p=as(),d=pn(),f=he,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(h,g,S,b={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let N=this.fromOffset(C.offset);g=N.line,S=N.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let N=this.fromOffset(x.offset);E=N.line,v=N.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,v);return w?y=new p(h,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new p(h,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(h){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
48
|
+
`);S=new Array(v.length);let E=0;for(let y=0,w=v.length;y<w;y++)S[y]=E,E+=v[y].length+1;this[s]=S}g=S[S.length-1];let b=0;if(h>=g)b=S.length-1;else{let v=S.length-2,E;for(;b<v;)if(E=b+(v-b>>1),h<S[E])v=E-1;else if(h>=S[E+1])b=E+1;else{b=E;break}}return{col:h-S[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:r(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,S,b){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:h});if(!E.source)return!1;let y;typeof S=="number"&&(y=v.originalPositionFor({column:b,line:S}));let w;t(E.source)?w=c(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(a)C.file=a(w);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return gr=n,n.default=n,f&&f.registerInput&&f.registerInput(n),gr}var yr,bi;function Ye(){if(bi)return yr;bi=1;let e=Oe(),t,r;class o extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,c,p){let d=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let f of d)f.raws.before=c.raws.before}return d}removeChild(a,c){let p=this.index(a);return!c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},yr=o,o.default=o,e.registerRoot(o),yr}var br,wi;function mn(){if(wi)return br;wi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
49
|
+
`," "];return e.split(t,r)},split(t,r,o){let i=[],a="",c=!1,p=0,d=!1,f="",s=!1;for(let u of t)s?s=!1:u==="\\"?s=!0:d?u===f&&(d=!1):u==='"'||u==="'"?(d=!0,f=u):u==="("?p+=1:u===")"?p>0&&(p-=1):p===0&&r.includes(u)&&(c=!0),c?(a!==""&&i.push(a.trim()),a="",c=!1):a+=u;return(o||a!=="")&&i.push(a.trim()),i}};return br=e,e.default=e,br}var wr,Si;function fs(){if(Si)return wr;Si=1;let e=Oe(),t=mn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(c)}}return wr=r,r.default=r,e.registerRule(r),wr}var Sr,vi;function fa(){if(vi)return Sr;vi=1;let e=us(),t=Ge(),r=vt(),o=Ct(),i=pn(),a=Ye(),c=fs();function p(d,f){if(Array.isArray(d))return d.map(l=>p(l));let{inputs:s,...u}=d;if(s){f=[];for(let l of s){let n={...l,__proto__:o.prototype};n.map&&(n.map={...n.map,__proto__:i.prototype}),f.push(n)}}if(u.nodes&&(u.nodes=d.nodes.map(l=>p(l,f))),u.source){let{inputId:l,...n}=u.source;u.source=n,l!=null&&(u.source.input=f[l])}if(u.type==="root")return new a(u);if(u.type==="decl")return new r(u);if(u.type==="rule")return new c(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+d.type)}return Sr=p,p.default=p,Sr}var vr,Ci;function gn(){if(Ci)return vr;Ci=1;let{dirname:e,relative:t,resolve:r,sep:o}=he,{SourceMapConsumer:i,SourceMapGenerator:a}=he,{pathToFileURL:c}=he,p=Ct(),d=!!(i&&a),f=!!(e&&r&&t&&o);class s{constructor(l,n,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=n,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let n=`
|
|
50
50
|
`;this.css.includes(`\r
|
|
51
51
|
`)&&(n=`\r
|
|
52
|
-
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),m=l.root||e(l.file),
|
|
53
|
-
`),n=w.length-g):n+=w.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let f=t(m,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return br=s,br}var Sr,Ei;function yn(){if(Ei)return Sr;Ei=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,h=91,s=93,u=40,l=41,n=123,m=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Sr=function(x,O={}){let M=x.css.valueOf(),D=O.ignoreErrors,A,ee,te,R,X,P,B,J,j,be,me=M.length,N=0,ne=[],oe=[];function Ie(){return N}function ge(G){throw x.error("Unclosed "+G,N)}function ue(){return oe.length===0&&N>=me}function ie(G){if(oe.length)return oe.pop();if(N>=me)return;let T=G?G.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case i:case a:case p:case d:case c:{R=N;do R+=1,A=M.charCodeAt(R);while(A===a||A===i||A===p||A===d||A===c);P=["space",M.slice(N,R)],N=R-1;break}case h:case s:case n:case m:case S:case f:case l:{let Z=String.fromCharCode(A);P=[Z,Z,N];break}case u:{if(be=ne.length?ne.pop()[1]:"",j=M.charCodeAt(N+1),be==="url"&&j!==e&&j!==t&&j!==a&&j!==i&&j!==p&&j!==c&&j!==d){R=N;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(D||T){R=N;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),ee=M.slice(N,R+1),R===-1||y.test(ee)?P=["(","(",N]:(P=["brackets",ee,N,R],N=R);break}case e:case t:{X=A===e?"'":'"',R=N;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(D||T){R=N+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(N,R+1),N,R],N=R;break}case w:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(A=M.charCodeAt(R+1),te&&A!==o&&A!==a&&A!==i&&A!==p&&A!==d&&A!==c&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(N,R+1),N,R],N=R;break}default:{A===o&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(D||T?R=M.length:ge("comment")),P=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(N,R+1),N,R],ne.push(P),N=R);break}}return N++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Ie}},Sr}var vr,xi;function wn(){if(xi)return vr;xi=1;let e=as(),t=Ge(),r=vt(),o=Ye(),i=us(),a=yn(),c={empty:!0,space:!0};function p(h){for(let s=h.length-1;s>=0;s--){let u=h[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[f,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)f.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,w);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=w;y>0;y--){let b=v[y][0];if(E.trim().startsWith("!")&&b!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,f=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")m||(m=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,f,g=l.length,S="",w=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],f=m[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?w=!1:S+=m[1]:w=!1):S+=m[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return vr=d,vr}var Cr,Ri;function cs(){if(Ri)return Cr;Ri=1;let e=Ne(),t=Ct(),r=wn();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return Cr=o,o.default=o,e.registerParse(o),Cr}var Er,Mi;function bn(){if(Mi)return Er;Mi=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Er=e,e.default=e,Er}var xr,Ni;function hs(){if(Ni)return xr;Ni=1;let e=bn();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return xr=t,t.default=t,xr}var Rr,Oi;function Sn(){if(Oi)return Rr;Oi=1;let e={};return Rr=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Rr}var Mr,Ii;function vn(){if(Ii)return Mr;Ii=1;let e=Ne(),t=ls(),r=gn(),o=cs(),i=hs(),a=Ye(),c=bt(),{isClean:p,my:d}=os(),h=Sn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let y=!1,b=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:E.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=f(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let w={};class v{constructor(y,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=S(b);else if(b instanceof v||b instanceof i)x=S(b.root),b.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=o;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?y(b,C,b[C][x]):y(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let x=y.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 y of this.plugins){let b=this.runOnRoot(y);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,x]of y){this.result.lastPlugin=C;let O;try{O=x(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,D]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return D(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let M=b.iterator,D;for(;D=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!D[p]){D[p]=!0,y.push(g(D));return}b.iterator=0,delete C.indexes[M]}let O=b.events;for(;b.eventIndex<O.length;){let M=O[b.eventIndex];if(b.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,b.iterator=C.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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"}}return v.registerPostcss=E=>{w=E},Mr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Mr}var Nr,Ai;function ha(){if(Ai)return Nr;Ai=1;let e=gn(),t=cs(),r=hs(),o=bt(),i=Sn();class a{constructor(p,d,h){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=h,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,f]=n.generate();m&&(this.result.css=m),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}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 p,d=t;try{p=d(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return Nr=a,a.default=a,Nr}var Or,Di;function fa(){if(Di)return Or;Di=1;let e=ls(),t=vn(),r=ha(),o=Ye();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Or=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Or}var Ir,Ti;function Cn(){if(Ti)return Ir;Ti=1;let e=as(),t=Ge(),r=Ne(),o=ns(),i=vt(),a=ls(),c=ca(),p=Ct(),d=vn(),h=mn(),s=St(),u=cs(),l=fa(),n=hs(),m=Ye(),f=us(),g=bt(),S=bn();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(E,y){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
52
|
+
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),m=l.root||e(l.file),h;this.mapOpts.sourcesContent===!1?(h=new i(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,n,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,v,E)=>{if(this.css+=b,v&&E!=="end"&&(h.generated.line=l,h.generated.column=n-1,v.source&&v.source.start?(h.source=this.sourcePath(v),h.original.line=v.source.start.line,h.original.column=v.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),S=b.match(/\n/g),S?(l+=S.length,g=b.lastIndexOf(`
|
|
53
|
+
`),n=b.length-g):n+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=l,h.generated.column=n-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=n-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let h=t(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return vr=s,vr}var Cr,Ei;function yn(){if(Ei)return Cr;Ei=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,f=91,s=93,u=40,l=41,n=123,m=125,h=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Cr=function(x,N={}){let M=x.css.valueOf(),A=N.ignoreErrors,I,ee,te,R,X,P,B,J,H,we,me=M.length,O=0,ne=[],oe=[];function Te(){return O}function ge(G){throw x.error("Unclosed "+G,O)}function ue(){return oe.length===0&&O>=me}function ie(G){if(oe.length)return oe.pop();if(O>=me)return;let D=G?G.ignoreUnclosed:!1;switch(I=M.charCodeAt(O),I){case i:case a:case p:case d:case c:{R=O;do R+=1,I=M.charCodeAt(R);while(I===a||I===i||I===p||I===d||I===c);P=["space",M.slice(O,R)],O=R-1;break}case f:case s:case n:case m:case S:case h:case l:{let Z=String.fromCharCode(I);P=[Z,Z,O];break}case u:{if(we=ne.length?ne.pop()[1]:"",H=M.charCodeAt(O+1),we==="url"&&H!==e&&H!==t&&H!==a&&H!==i&&H!==p&&H!==c&&H!==d){R=O;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(A||D){R=O;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),ee=M.slice(O,R+1),R===-1||y.test(ee)?P=["(","(",O]:(P=["brackets",ee,O,R],O=R);break}case e:case t:{X=I===e?"'":'"',R=O;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(A||D){R=O+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(O,R+1),O,R],O=R;break}case b:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(I=M.charCodeAt(R+1),te&&I!==o&&I!==a&&I!==i&&I!==p&&I!==d&&I!==c&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(O,R+1),O,R],O=R;break}default:{I===o&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(A||D?R=M.length:ge("comment")),P=["comment",M.slice(O,R+1),O,R],O=R):(E.lastIndex=O+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(O,R+1),O,R],ne.push(P),O=R);break}}return O++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Te}},Cr}var Er,xi;function bn(){if(xi)return Er;xi=1;let e=us(),t=Ge(),r=vt(),o=Ye(),i=fs(),a=yn(),c={empty:!0,space:!0};function p(f){for(let s=f.length-1;s>=0;s--){let u=f[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,h=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){h=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),h&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[h,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return h}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let b=s[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)h.push(s.shift());this.precheckMissedSemicolon(s);for(let b=s.length-1;b>=0;b--){if(m=s[b],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,b);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().startsWith("!")&&w!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,h=[],g=s[1].startsWith("--"),S=[],b=s;for(;b;){if(l=b[0],S.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),h.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,h,g=l.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],h=m[0],h==="space"&&y===g-1&&!n?b=!1:h==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let y=l.reduce((w,C)=>w+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Er=d,Er}var xr,Ri;function hs(){if(Ri)return xr;Ri=1;let e=Oe(),t=Ct(),r=bn();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return xr=o,o.default=o,e.registerParse(o),xr}var Rr,Mi;function wn(){if(Mi)return Rr;Mi=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Rr=e,e.default=e,Rr}var Mr,Oi;function ds(){if(Oi)return Mr;Oi=1;let e=wn();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Mr=t,t.default=t,Mr}var Or,Ni;function Sn(){if(Ni)return Or;Ni=1;let e={};return Or=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Or}var Nr,Ti;function vn(){if(Ti)return Nr;Ti=1;let e=Oe(),t=cs(),r=gn(),o=hs(),i=ds(),a=Ye(),c=wt(),{isClean:p,my:d}=ls(),f=Sn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let y=!1,w=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=h(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let x;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))x=S(w);else if(w instanceof v||w instanceof i)x=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let N=o;C.syntax&&(N=C.syntax.parse),C.parser&&(N=C.parser),N.parse&&(N=N.parse);try{x=N(w,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(N=>typeof N=="object"&&N.prepare?{...N,...N.prepare(this.result)}:N)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(w,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,x])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let x in w[C])x==="*"?y(w,C,w[C][x]):y(w,C+"-"+x.toLowerCase(),w[C][x]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(m(C))try{await C}catch(x){let N=w[w.length-1].node;throw this.handleError(x,N)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let x=y.nodes.map(N=>C(N,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=c;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let x=new r(w,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 y of this.plugins){let w=this.runOnRoot(y);if(m(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,x]of y){this.result.lastPlugin=C;let N;try{N=x(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(m(N))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:x}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&w.visitorIndex<x.length){let[M,A]=x[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===x.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return A(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(w.iterator!==0){let M=w.iterator,A;for(;A=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!A[p]){A[p]=!0,y.push(g(A));return}w.iterator=0,delete C.indexes[M]}let N=w.events;for(;w.eventIndex<N.length;){let M=N[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let w=h(y);for(let C of w)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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"}}return v.registerPostcss=E=>{b=E},Nr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Nr}var Tr,Ii;function ha(){if(Ii)return Tr;Ii=1;let e=gn(),t=hs(),r=ds(),o=wt(),i=Sn();class a{constructor(p,d,f){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=f,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,h]=n.generate();m&&(this.result.css=m),h&&(this.result.map=h)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}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 p,d=t;try{p=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return Tr=a,a.default=a,Tr}var Ir,Ai;function da(){if(Ai)return Ir;Ai=1;let e=cs(),t=vn(),r=ha(),o=Ye();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Ir=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Ir}var Ar,Di;function Cn(){if(Di)return Ar;Di=1;let e=us(),t=Ge(),r=Oe(),o=as(),i=vt(),a=cs(),c=fa(),p=Ct(),d=vn(),f=mn(),s=St(),u=hs(),l=da(),n=ds(),m=Ye(),h=fs(),g=wt(),S=wn();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return b.plugin=function(E,y){let w=!1;function C(...N){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
54
54
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
55
|
-
https://www.w3ctech.com/topic/2226`));let M=y(...
|
|
55
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...N);return M.postcssPlugin=E,M.postcssVersion=new l().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(N,M,A){return b([C(A)]).process(N,M)},C},b.stringify=g,b.parse=u,b.fromJSON=c,b.list=f,b.comment=v=>new t(v),b.atRule=v=>new e(v),b.decl=v=>new i(v),b.rule=v=>new h(v),b.root=v=>new m(v),b.document=v=>new a(v),b.CssSyntaxError=o,b.Declaration=i,b.Container=r,b.Processor=l,b.Document=a,b.Comment=t,b.Warning=S,b.AtRule=e,b.Result=n,b.Input=p,b.Rule=h,b.Root=m,b.Node=s,d.registerPostcss(b),Ar=b,b.default=b,Ar}var Dr,_i;function pa(){if(_i)return Dr;_i=1;let e=Ge(),t=bn(),r=yn();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let p=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:p.col,line:p.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=f[2],c.raws.left=f[1],c.raws.right=f[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let p,d;for(p=c-1;p>=0&&a[p][0]!=="word";p--);if(p===0||p<0)return;for(d=p-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let f=a.slice(p),s=a.slice(d,p);a.splice(d,a.length-d),this.spaces=s.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return Dr=o,Dr}var _r,Li;function ma(){if(Li)return _r;Li=1;let{Input:e}=Cn(),t=pa();return _r=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},_r}ma();var ga=Cn(),W=na(ga);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Br=class e{constructor(...t){ae(this,"parentElement",null),ae(this,"parentNode",null),ae(this,"ownerDocument"),ae(this,"firstChild",null),ae(this,"lastChild",null),ae(this,"previousSibling",null),ae(this,"nextSibling",null),ae(this,"ELEMENT_NODE",1),ae(this,"TEXT_NODE",3),ae(this,"nodeType"),ae(this,"nodeName"),ae(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var ki={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Pi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rt={};function ya(e){var t,r;let o=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function ps(e){if(rt[e])return rt[e];let t=ya(e)||globalThis[e],r=t.prototype,o=e in ki?ki[e]:void 0,i=!!(o&&o.every(p=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),a=e in Pi?Pi[e]:void 0,c=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(i&&c)return rt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let f=d[e].prototype;return document.body.removeChild(p),f?rt[e]=f:r}catch{return r}}var Lr={};function Ce(e,t,r){var o;let i=`${e}.${String(r)}`;if(Lr[i])return Lr[i].call(t);let a=ps(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(Lr[i]=c,c.call(t)):t[r]}var kr={};function En(e,t,r){let o=`${e}.${String(r)}`;if(kr[o])return kr[o].bind(t);let a=ps(e)[r];return typeof a!="function"?t[r]:(kr[o]=a,a.bind(t))}function ba(e){return Ce("Node",e,"childNodes")}function wa(e){return Ce("Node",e,"parentNode")}function Sa(e){return Ce("Node",e,"parentElement")}function va(e){return Ce("Node",e,"textContent")}function Ca(e,t){return En("Node",e,"contains")(t)}function Ea(e){return En("Node",e,"getRootNode")()}function xa(e){return!e||!("host"in e)?null:Ce("ShadowRoot",e,"host")}function Ra(e){return e.styleSheets}function Ma(e){return!e||!("shadowRoot"in e)?null:Ce("Element",e,"shadowRoot")}function Oa(e,t){return Ce("Element",e,"querySelector")(t)}function Na(e,t){return Ce("Element",e,"querySelectorAll")(t)}function xn(){return ps("MutationObserver").constructor}function Ne(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var k={childNodes:ba,parentNode:wa,parentElement:Sa,textContent:va,contains:Ca,getRootNode:Ea,host:xa,styleSheets:Ra,shadowRoot:Ma,querySelector:Oa,querySelectorAll:Na,mutationObserver:xn,patch:Ne};function re(e,t,r=document){let o={capture:!0,passive:!0};return r.addEventListener(e,t,o),()=>r.removeEventListener(e,t,o)}var De=`Please stop import mirror directly. Instead of that,\r
|
|
56
56
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
57
|
-
or you can use record.mirror to access the mirror instance during recording.`,Fi={map:{},getId(){return console.error(Te),-1},getNode(){return console.error(Te),null},removeNodeFromMap(){console.error(Te)},has(){return console.error(Te),!1},reset(){console.error(Te)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fi=new Proxy(Fi,{get(e,t,r){return t==="map"&&console.error(Te),Reflect.get(e,t,r)}}));function je(e,t,r={}){let o=null,i=0;return function(...a){let c=Date.now();!i&&r.leading===!1&&(i=c);let p=t-(c-i),d=this;p<=0||p>t?(o&&(clearTimeout(o),o=null),i=c,e.apply(d,a)):!o&&r.trailing!==!1&&(o=setTimeout(()=>{i=r.leading===!1?0:Date.now(),o=null,e.apply(d,a)},p))}}function Et(e,t,r,o,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),a&&a.set&&a.set.call(this,c)}}),()=>Et(e,t,a||{},!0)}var ht=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ht=()=>new Date().getTime());function Rn(e){var t,r,o,i;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=L.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((o=L.parentElement(a.body))==null?void 0:o.scrollTop)||((i=a?.body)==null?void 0:i.scrollTop)||0}}function Mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function On(e){return e?e.nodeType===e.ELEMENT_NODE?e:L.parentElement(e):null}function se(e,t,r,o){if(!e)return!1;let i=On(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ct(i,t,o))return!0}catch{}return!!(r&&(i.matches(r)||o&&i.closest(r)!==null))}function Oa(e,t){return t.getId(e)!==-1}function kr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===qe}function In(e,t){if(We(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let o=L.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?In(o,t):!0}function Fr(e){return!!e.changedTouches}function Ia(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)}function An(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Dn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Br(e){return e?e instanceof Pr&&"shadowRoot"in e?!!e.shadowRoot:!!L.shadowRoot(e):!1}var Ur=class{constructor(){I(this,"id",1),I(this,"styleIDMap",new WeakMap),I(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let o;return r===void 0?o=this.id++:o=r,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Tn(e){var t;let r=null;return"getRootNode"in e&&((t=L.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&L.host(L.getRootNode(e))&&(r=L.host(L.getRootNode(e))),r}function Aa(e){let t=e,r;for(;r=Tn(t);)t=r;return t}function Da(e){let t=e.ownerDocument;if(!t)return!1;let r=Aa(e);return L.contains(t,r)}function _n(e){let t=e.ownerDocument;return t?L.contains(t,e)||Da(e):!1}var k=(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))(k||{}),_=(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))(_||{}),Q=(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))(Q||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{}),Fe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Fe||{}),_e=(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))(_e||{});var kn=(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))(kn||{});function Bi(e){return"__ln"in e}var Wr=class{constructor(){I(this,"length",0),I(this,"head",null),I(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let o=0;o<t;o++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Bi(t.previousSibling)){let o=t.previousSibling.__ln.next;r.next=o,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,o&&(o.previous=r)}else if(t.nextSibling&&Bi(t.nextSibling)&&t.nextSibling.__ln.previous){let o=t.nextSibling.__ln.previous;r.previous=o,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,o&&(o.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Ui=(e,t)=>`${e}@${t}`,zr=class{constructor(){I(this,"frozen",!1),I(this,"locked",!1),I(this,"texts",[]),I(this,"attributes",[]),I(this,"attributeMap",new WeakMap),I(this,"removes",[]),I(this,"mapRemoves",[]),I(this,"movedMap",{}),I(this,"addedSet",new Set),I(this,"movedSet",new Set),I(this,"droppedSet",new Set),I(this,"removesSubTreeCache",new Set),I(this,"mutationCb"),I(this,"blockClass"),I(this,"blockSelector"),I(this,"maskTextClass"),I(this,"maskTextSelector"),I(this,"inlineStylesheet"),I(this,"maskInputOptions"),I(this,"maskTextFn"),I(this,"maskInputFn"),I(this,"keepIframeSrcFn"),I(this,"recordCanvas"),I(this,"inlineImages"),I(this,"slimDOMOptions"),I(this,"dataURLOptions"),I(this,"doc"),I(this,"mirror"),I(this,"iframeManager"),I(this,"stylesheetManager"),I(this,"shadowDomManager"),I(this,"canvasManager"),I(this,"processedNodeManager"),I(this,"unattachedDoc"),I(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),I(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,o=new Wr,i=d=>{let h=d,s=qe;for(;s===qe;)h=h&&h.nextSibling,s=h&&this.mirror.getId(h);return s},a=d=>{let h=L.parentNode(d);if(!h||!_n(d)||h.tagName==="TEXTAREA")return;let s=We(h)?this.mirror.getId(Tn(d)):this.mirror.getId(h),u=i(d);if(s===-1||u===-1)return o.addNode(d);let l=Le(d,{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:n=>{An(n,this.mirror)&&this.iframeManager.addIframe(n),Dn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),Br(d)&&this.shadowDomManager.addShadowRoot(L.shadowRoot(d),this.doc)},onIframeLoad:(n,m)=>{this.iframeManager.attachIframe(n,m),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,m)=>{this.stylesheetManager.attachLinkElement(n,m)}});l&&(t.push({parentId:s,nextId:u,node:l}),r.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let d of this.movedSet)Wi(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(L.parentNode(d))||a(d);for(let d of this.addedSet)!zi(this.droppedSet,d)&&!Wi(this.removesSubTreeCache,d,this.mirror)||zi(this.movedSet,d)?a(d):this.droppedSet.add(d);let c=null;for(;o.length;){let d=null;if(c){let h=this.mirror.getId(L.parentNode(c.value)),s=i(c.value);h!==-1&&s!==-1&&(d=c)}if(!d){let h=o.tail;for(;h;){let s=h;if(h=h.previous,s){let u=this.mirror.getId(L.parentNode(s.value));if(i(s.value)===-1)continue;if(u!==-1){d=s;break}else{let n=s.value,m=L.parentNode(n);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=L.host(m);if(this.mirror.getId(f)!==-1){d=s;break}}}}}}if(!d){for(;o.head;)o.removeNode(o.head.value);break}c=d.previous,o.removeNode(d.value),a(d.value)}let p={texts:this.texts.map(d=>{let h=d.node,s=L.parentNode(h);return s&&s.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(h),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{let{attributes:h}=d;if(typeof h.style=="string"){let s=JSON.stringify(d.styleDiff),u=JSON.stringify(d._unchangedStyles);s.length<h.style.length&&(s+u).split("var(").length===h.style.split("var(").length&&(h.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:h}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p))}),I(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(L.childNodes(t),o=>L.textContent(o)||"").join("")}),I(this,"processMutation",t=>{if(!kr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=L.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:tn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,On(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){let c=Jr(r);i=Xr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)o="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),o==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!en(r.tagName,o))if(a.attributes[o]=Qi(this.doc,Re(r.tagName),Re(o),i,r,this.dataURLOptions),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let d=r.style.getPropertyValue(p),h=r.style.getPropertyPriority(p);d!==c.style.getPropertyValue(p)||h!==c.style.getPropertyPriority(p)?h===""?a.styleDiff[p]=d:a.styleDiff[p]=[d,h]:a._unchangedStyles[p]=[d,h]}for(let p of Array.from(c.style))r.style.getPropertyValue(p)===""&&(a.styleDiff[p]=!1)}else o==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let o=this.mirror.getId(r),i=We(t.target)?this.mirror.getId(L.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||kr(r,this.mirror,this.slimDOMOptions)||!Oa(r,this.mirror)||(this.addedSet.has(r)?($r(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&o===-1||In(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ui(o,i)]?$r(this.movedSet,r):(this.removes.push({parentId:i,id:o,isShadow:We(t.target)&&ze(t.target)?!0:void 0}),Ta(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),I(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(kr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;r&&this.mirror.hasNode(r)&&(o=this.mirror.getId(r)),o&&o!==-1&&(this.movedMap[Ui(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(L.childNodes(t).forEach(o=>this.genAdds(o)),Br(t)&&L.childNodes(L.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}};function $r(e,t){e.delete(t),L.childNodes(t).forEach(r=>$r(e,r))}function Ta(e,t){let r=[e];for(;r.length;){let o=r.pop();t.has(o)||(t.add(o),L.childNodes(o).forEach(i=>r.push(i)))}}function Wi(e,t,r){return e.size===0?!1:_a(e,t)}function _a(e,t,r){let o=L.parentNode(t);return o?e.has(o):!1}function zi(e,t){return e.size===0?!1:Ln(e,t)}function Ln(e,t){let r=L.parentNode(t);return r?e.has(r)?!0:Ln(e,r):!1}var $e;function ka(e){$e=e}function La(){$e=void 0}var F=e=>$e?(...r)=>{try{return e(...r)}catch(o){if($e&&$e(o)===!0)return;throw o}}:e,we=[];function Xe(e){try{if("composedPath"in e){let 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 Pn(e,t){let r=new zr;we.push(r),r.init(e);let o=new(xn())(F(r.processMutations.bind(r)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Pa({mousemoveCb:e,sampling:t,doc:r,mirror:o}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,c=[],p,d=je(F(u=>{let l=Date.now()-p;e(c.map(n=>(n.timeOffset-=l,n)),u),c=[],p=null}),a),h=F(je(F(u=>{let l=Xe(u),{clientX:n,clientY:m}=Fr(u)?u.changedTouches[0]:u;p||(p=ht()),c.push({x:n,y:m,id:o.getId(l),timeOffset:ht()-p}),d(typeof DragEvent<"u"&&u instanceof DragEvent?_.Drag:u instanceof MouseEvent?_.MouseMove:_.TouchMove)}),i,{trailing:!1})),s=[re("mousemove",h,r),re("touchmove",h,r),re("drag",h,r)];return F(()=>{s.forEach(u=>u())})}function Fa({mouseInteractionCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],d=null,h=s=>u=>{let l=Xe(u);if(se(l,o,i,!0))return;let n=null,m=s;if("pointerType"in u){switch(u.pointerType){case"mouse":n=ye.Mouse;break;case"touch":n=ye.Touch;break;case"pen":n=ye.Pen;break}n===ye.Touch?Q[s]===Q.MouseDown?m="TouchStart":Q[s]===Q.MouseUp&&(m="TouchEnd"):ye.Pen}else Fr(u)&&(n=ye.Touch);n!==null?(d=n,(m.startsWith("Touch")&&n===ye.Touch||m.startsWith("Mouse")&&n===ye.Mouse)&&(n=null)):Q[s]===Q.Click&&(n=d,d=null);let f=Fr(u)?u.changedTouches[0]:u;if(!f)return;let g=r.getId(l),{clientX:S,clientY:w}=f;F(e)({type:Q[m],id:g,x:S,y:w,...n!==null&&{pointerType:n}})};return Object.keys(Q).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&c[s]!==!1).forEach(s=>{let u=Re(s),l=h(s);if(window.PointerEvent)switch(Q[s]){case Q.MouseDown:case Q.MouseUp:u=u.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}p.push(re(u,l,t))}),F(()=>{p.forEach(s=>s())})}function Fn({scrollCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){let c=F(je(F(p=>{let d=Xe(p);if(!d||se(d,o,i,!0))return;let h=r.getId(d);if(d===t&&t.defaultView){let s=Rn(t.defaultView);e({id:h,x:s.left,y:s.top})}else e({id:h,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return re("scroll",c,t)}function Ba({viewportResizeCb:e},{win:t}){let r=-1,o=-1,i=F(je(F(()=>{let a=Mn(),c=Nn();(r!==a||o!==c)&&(e({width:Number(c),height:Number(a)}),r=a,o=c)}),200));return re("resize",i,t)}var Ua=["INPUT","TEXTAREA","SELECT"],$i=new WeakMap;function Wa({inputCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,ignoreClass:a,ignoreSelector:c,maskInputOptions:p,maskInputFn:d,sampling:h,userTriggeredOnInput:s}){function u(w){let v=Xe(w),E=w.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=L.parentElement(v)),!v||!y||Ua.indexOf(y)<0||se(v,o,i,!0)||v.classList.contains(a)||c&&v.matches(c))return;let b=v.value,C=!1,x=Jr(v)||"";x==="radio"||x==="checkbox"?C=v.checked:(p[y.toLowerCase()]||p[x])&&(b=Xr({element:v,maskInputOptions:p,tagName:y,type:x,value:b,maskInputFn:d})),l(v,s?{text:b,isChecked:C,userTriggered:E}:{text:b,isChecked:C});let O=v.name;x==="radio"&&O&&C&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(M=>{if(M!==v){let D=M.value;l(M,s?{text:D,isChecked:!C,userTriggered:!1}:{text:D,isChecked:!C})}})}function l(w,v){let E=$i.get(w);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){$i.set(w,v);let y=r.getId(w);F(e)({...v,id:y})}}let m=(h.input==="last"?["change"]:["input","change"]).map(w=>re(w,F(u),t)),f=t.defaultView;if(!f)return()=>{m.forEach(w=>w())};let g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),S=[[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 g&&g.set&&m.push(...S.map(w=>Et(w[0],w[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,f))),F(()=>{m.forEach(w=>w())})}function ft(e){let t=[];function r(o,i){if(st("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){let c=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(c)}else if(o.parentStyleSheet){let c=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(c)}return i}return r(e,t)}function Se(e,t,r){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:o}):{}}function za({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};let i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((s,u,l)=>{let[n,m]=l,{id:f,styleId:g}=Se(u,t,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&e({id:f,styleId:g,adds:[{rule:n,index:m}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.addRule=function(s,u,l=this.cssRules.length){let n=`${s} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};let a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,removes:[{index:n}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.removeRule=function(s){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[s])};let c;o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,replace:n}),s.apply(u,l)})}));let p;o.CSSStyleSheet.prototype.replaceSync&&(p=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,replaceSync:n}),s.apply(u,l)})}));let d={};it("CSSGroupingRule")?d.CSSGroupingRule=o.CSSGroupingRule:(it("CSSMediaRule")&&(d.CSSMediaRule=o.CSSMediaRule),it("CSSConditionRule")&&(d.CSSConditionRule=o.CSSConditionRule),it("CSSSupportsRule")&&(d.CSSSupportsRule=o.CSSSupportsRule));let h={};return Object.entries(d).forEach(([s,u])=>{h[s]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(h[s].insertRule,{apply:F((l,n,m)=>{let[f,g]=m,{id:S,styleId:w}=Se(n.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:f,index:[...ft(n),g||0]}]}),l.apply(n,m)})}),u.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:F((l,n,m)=>{let[f]=m,{id:g,styleId:S}=Se(n.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...ft(n),f]}]}),l.apply(n,m)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,c&&(o.CSSStyleSheet.prototype.replace=c),p&&(o.CSSStyleSheet.prototype.replaceSync=p),Object.entries(d).forEach(([s,u])=>{u.prototype.insertRule=h[s].insertRule,u.prototype.deleteRule=h[s].deleteRule})})}function Bn({mirror:e,stylesheetManager:t},r){var o,i,a;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(L.host(r));let p=r.nodeName==="#document"?(o=r.defaultView)==null?void 0:o.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!p||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var h;return(h=d.get)==null?void 0:h.call(this)},set(h){var s;let u=(s=d.set)==null?void 0:s.call(this,h);if(c!==null&&c!==-1)try{t.adoptStyleSheets(h,c)}catch{}return u}}),F(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function $a({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:o},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((p,d,h)=>{var s;let[u,l,n]=h;if(r.has(u))return a.apply(d,[u,l,n]);let{id:m,styleId:f}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,set:{property:u,value:l,priority:n},index:ft(d.parentRule)}),p.apply(d,h)})});let c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:F((p,d,h)=>{var s;let[u]=h;if(r.has(u))return c.apply(d,[u]);let{id:l,styleId:n}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:u},index:ft(d.parentRule)}),p.apply(d,h)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=c})}function qa({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:o,sampling:i,doc:a}){let c=F(d=>je(F(h=>{let s=Xe(h);if(!s||se(s,t,r,!0))return;let{currentTime:u,volume:l,muted:n,playbackRate:m,loop:f}=s;e({type:d,id:o.getId(s),currentTime:u,volume:l,muted:n,playbackRate:m,loop:f})}),i.media||500)),p=[re("play",c(_e.Play),a),re("pause",c(_e.Pause),a),re("seeked",c(_e.Seeked),a),re("volumechange",c(_e.VolumeChange),a),re("ratechange",c(_e.RateChange),a)];return F(()=>{p.forEach(d=>d())})}function ja({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,h,s){let u=new a(d,h,s);return i.set(u,{family:d,buffer:typeof h!="string",descriptors:s,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),u};let c=Oe(t.fonts,"add",function(p){return function(d){return setTimeout(F(()=>{let h=i.get(d);h&&(e(h),i.delete(d))}),0),p.apply(this,[d])}});return o.push(()=>{r.FontFace=a}),o.push(c),F(()=>{o.forEach(p=>p())})}function Va(e){let{doc:t,mirror:r,blockClass:o,blockSelector:i,selectionCb:a}=e,c=!0,p=F(()=>{let d=t.getSelection();if(!d||c&&d?.isCollapsed)return;c=d.isCollapsed||!1;let h=[],s=d.rangeCount||0;for(let u=0;u<s;u++){let l=d.getRangeAt(u),{startContainer:n,startOffset:m,endContainer:f,endOffset:g}=l;se(n,o,i,!0)||se(f,o,i,!0)||h.push({start:r.getId(n),startOffset:m,end:r.getId(f),endOffset:g})}a({ranges:h})});return p(),re("selectionchange",p)}function Ha({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Oe(r.customElements,"define",function(i){return function(a,c,p){try{t({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,c,p])}})}function Ga(e,t){let{mutationCb:r,mousemoveCb:o,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:c,inputCb:p,mediaInteractionCb:d,styleSheetRuleCb:h,styleDeclarationCb:s,canvasMutationCb:u,fontCb:l,selectionCb:n,customElementCb:m}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),r(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),o(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),i(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),a(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),c(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),p(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),d(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),h(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),s(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),u(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),l(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),n(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),m(...f)}}function Ya(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};Ga(e,t);let o;e.recordDOM&&(o=Pn(e,e.doc));let i=Pa(e),a=Fa(e),c=Fn(e),p=Ba(e,{win:r}),d=Wa(e),h=qa(e),s=()=>{},u=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(s=za(e,{win:r}),u=Bn(e,e.doc),l=$a(e,{win:r}),e.collectFonts&&(n=ja(e)));let m=Va(e),f=Ha(e),g=[];for(let S of e.plugins)g.push(S.observer(S.callback,r,S.options));return F(()=>{we.forEach(S=>S.destroy()),we.forEach(S=>S.reset()),o?.disconnect(),i(),a(),c(),p(),d(),h(),s(),u(),l(),n(),m(),f(),g.forEach(S=>S()),we.length=0})}function st(e){return typeof window[e]<"u"}function it(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var dt=class{constructor(t){I(this,"iframeIdToRemoteIdMap",new WeakMap),I(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,o,i){let a=o||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),c.set(p,r)),p}getIds(t,r){let o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,o,i))}getRemoteId(t,r,o){let i=o||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=i.get(r);return a||-1}getRemoteIds(t,r){let o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},qr=class{constructor(t){I(this,"iframes",new WeakMap),I(this,"crossOriginIframeMap",new WeakMap),I(this,"crossOriginIframeMirror",new dt(Ki)),I(this,"crossOriginIframeStyleMirror"),I(this,"crossOriginIframeRootIdMap",new WeakMap),I(this,"mirror"),I(this,"mutationCb"),I(this,"wrappedEmit"),I(this,"loadListener"),I(this,"stylesheetManager"),I(this,"recordCrossOriginIframes"),I(this,"messageHandler"),I(this,"nestedIframeListeners",new Map),I(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var o;this.attachedIframes.set(t,r),this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});let i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){let a=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,a),i.addEventListener("message",a)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let i=this.crossOriginIframeMap.get(t.source);if(!i)return;let a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var o;switch(r.type){case k.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),this.attachedIframes.set(t,r.data.node),{timestamp:r.timestamp,type:k.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case k.Meta:case k.Load:case k.DomContentLoaded:return!1;case k.Plugin:return r;case k.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case k.IncrementalSnapshot:switch(r.data.source){case _.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);let a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(r.data,t,["id"]),r;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case _.Font:return r;case _.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case _.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(o=r.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,o,i){for(let a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(o,r[a]):r[a]=t.getId(o,r[a]));return r}replaceIds(t,r,o){return this.replace(this.crossOriginIframeMirror,t,r,o)}replaceStyleIds(t,r,o){return this.replace(this.crossOriginIframeStyleMirror,t,r,o)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,r)})}patchRootIdOnNode(t,r){t.type!==kn.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,r)})}reattachIframes(){this.attachedIframes.forEach((t,r)=>{if(!r.isConnected){this.attachedIframes.delete(r);return}let o=this.mirror.getId(r);if(o===-1){this.attachedIframes.delete(r);return}this.mutationCb({adds:[{parentId:o,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear()}},jr=class{constructor(t){I(this,"shadowDoms",new WeakSet),I(this,"mutationCb"),I(this,"scrollCb"),I(this,"bypassOptions"),I(this,"mirror"),I(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!ze(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let o=Pn({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(Fn({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(L.host(t))),this.restoreHandlers.push(Bn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let o=this;this.restoreHandlers.push(Oe(t.prototype,"attachShadow",function(i){return function(a){let c=i.call(this,a),p=L.shadowRoot(this);return p&&_n(this)&&o.addShadowRoot(p,r),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ue=0;Ue<Pe.length;Ue++)Xa[Pe.charCodeAt(Ue)]=Ue;var Ue,Ja=function(e){var t=new Uint8Array(e),r,o=t.length,i="";for(r=0;r<o;r+=3)i+=Pe[t[r]>>2],i+=Pe[(t[r]&3)<<4|t[r+1]>>4],i+=Pe[(t[r+1]&15)<<2|t[r+2]>>6],i+=Pe[t[r+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var qi=new Map;function Za(e,t){let r=qi.get(e);return r||(r=new Map,qi.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Un=(e,t,r)=>{if(!e||!(zn(e,t)||typeof e=="object"))return;let o=e.constructor.name,i=Za(r,o),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function nt(e,t,r,o){if(e instanceof Array)return e.map(i=>nt(i,t,r,o));if(e===null)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){let i=e.constructor.name,a=Ja(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[nt(e.buffer,t,r,o),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",a=e.toDataURL(o.type,o.quality);return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[nt(e.data,t,r,o),e.width,e.height]};if(zn(e,t)||typeof e=="object"){let i=e.constructor.name,a=Un(e,t,r);return{rr_type:i,index:a}}}}return e}var Wn=(e,t,r,o)=>e.map(i=>nt(i,t,r,o)),zn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Ka(e,t,r,o,i){let a=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let p of c)try{if(typeof t.CanvasRenderingContext2D.prototype[p]!="function")continue;let d=Oe(t.CanvasRenderingContext2D.prototype,p,function(h){return function(...s){return se(this.canvas,r,o,!0)||setTimeout(()=>{let u=Wn(s,t,this,i);e(this.canvas,{type:Fe["2D"],property:p,args:u})},0),h.apply(this,s)}});a.push(d)}catch{let d=Et(t.CanvasRenderingContext2D.prototype,p,{set(h){e(this.canvas,{type:Fe["2D"],property:p,args:[h],setter:!0})}});a.push(d)}return()=>{a.forEach(p=>p())}}function Qa(e){return e==="experimental-webgl"?"webgl":e}function ji(e,t,r,o){let i=[];try{let a=Oe(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(p,...d){if(!se(this,t,r,!0)){let h=Qa(p);if("__context"in this||(this.__context=h),o&&["webgl","webgl2"].includes(h))if(d[0]&&typeof d[0]=="object"){let s=d[0];s.preserveDrawingBuffer||(s.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[p,...d])}});i.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function Vi(e,t,r,o,i,a,c){let p=[],d=Object.getOwnPropertyNames(e);for(let h of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;let s=Oe(e,h,function(u){return function(...l){let n=u.apply(this,l);if(Un(n,a,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){let m=Wn(l,a,this,c),f={type:t,property:h,args:m};r(this.canvas,f)}return n}});p.push(s)}catch{let s=Et(e,h,{set(u){r(this.canvas,{type:t,property:h,args:[u],setter:!0})}});p.push(s)}return p}function el(e,t,r,o,i){let a=[];return a.push(...Vi(t.WebGLRenderingContext.prototype,Fe.WebGL,e,r,o,t,i)),typeof t.WebGL2RenderingContext<"u"&&a.push(...Vi(t.WebGL2RenderingContext.prototype,Fe.WebGL2,e,r,o,t,i)),()=>{a.forEach(c=>c())}}var $n=`(function() {
|
|
57
|
+
or you can use record.mirror to access the mirror instance during recording.`,Fi={map:{},getId(){return console.error(De),-1},getNode(){return console.error(De),null},removeNodeFromMap(){console.error(De)},has(){return console.error(De),!1},reset(){console.error(De)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fi=new Proxy(Fi,{get(e,t,r){return t==="map"&&console.error(De),Reflect.get(e,t,r)}}));function He(e,t,r={}){let o=null,i=0;return function(...a){let c=Date.now();!i&&r.leading===!1&&(i=c);let p=t-(c-i),d=this;p<=0||p>t?(o&&(clearTimeout(o),o=null),i=c,e.apply(d,a)):!o&&r.trailing!==!1&&(o=setTimeout(()=>{i=r.leading===!1?0:Date.now(),o=null,e.apply(d,a)},p))}}function Et(e,t,r,o,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),a&&a.set&&a.set.call(this,c)}}),()=>Et(e,t,a||{},!0)}var ft=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ft=()=>new Date().getTime());function Rn(e){var t,r,o,i;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=k.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((o=k.parentElement(a.body))==null?void 0:o.scrollTop)||((i=a?.body)==null?void 0:i.scrollTop)||0}}function Mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function On(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function se(e,t,r,o){if(!e)return!1;let i=Nn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ct(i,t,o))return!0}catch{}return!!(r&&(i.matches(r)||o&&i.closest(r)!==null))}function Ta(e,t){return t.getId(e)!==-1}function Pr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===$e}function Tn(e,t){if(qe(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let o=k.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?Tn(o,t):!0}function Ur(e){return!!e.changedTouches}function Ia(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)}function In(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function An(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function qr(e){return e?e instanceof Br&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}var zr=class{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let o;return r===void 0?o=this.id++:o=r,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Dn(e){var t;let r=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(r=k.host(k.getRootNode(e))),r}function Aa(e){let t=e,r;for(;r=Dn(t);)t=r;return t}function Da(e){let t=e.ownerDocument;if(!t)return!1;let r=Aa(e);return k.contains(t,r)}function _n(e){let t=e.ownerDocument;return t?k.contains(t,e)||Da(e):!1}var L=(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))(L||{}),_=(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))(_||{}),Q=(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))(Q||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{}),Fe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Fe||{}),_e=(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))(_e||{});var Ln=(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))(Ln||{});function Bi(e){return"__ln"in e}var Wr=class{constructor(){T(this,"length",0),T(this,"head",null),T(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let o=0;o<t;o++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Bi(t.previousSibling)){let o=t.previousSibling.__ln.next;r.next=o,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,o&&(o.previous=r)}else if(t.nextSibling&&Bi(t.nextSibling)&&t.nextSibling.__ln.previous){let o=t.nextSibling.__ln.previous;r.previous=o,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,o&&(o.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Ui=(e,t)=>`${e}@${t}`,$r=class{constructor(){T(this,"frozen",!1),T(this,"locked",!1),T(this,"texts",[]),T(this,"attributes",[]),T(this,"attributeMap",new WeakMap),T(this,"removes",[]),T(this,"mapRemoves",[]),T(this,"movedMap",{}),T(this,"addedSet",new Set),T(this,"movedSet",new Set),T(this,"droppedSet",new Set),T(this,"removesSubTreeCache",new Set),T(this,"mutationCb"),T(this,"blockClass"),T(this,"blockSelector"),T(this,"maskTextClass"),T(this,"maskTextSelector"),T(this,"inlineStylesheet"),T(this,"maskInputOptions"),T(this,"maskTextFn"),T(this,"maskInputFn"),T(this,"keepIframeSrcFn"),T(this,"recordCanvas"),T(this,"inlineImages"),T(this,"slimDOMOptions"),T(this,"dataURLOptions"),T(this,"doc"),T(this,"mirror"),T(this,"iframeManager"),T(this,"stylesheetManager"),T(this,"shadowDomManager"),T(this,"canvasManager"),T(this,"processedNodeManager"),T(this,"unattachedDoc"),T(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),T(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,o=new Wr,i=d=>{let f=d,s=$e;for(;s===$e;)f=f&&f.nextSibling,s=f&&this.mirror.getId(f);return s},a=d=>{let f=k.parentNode(d);if(!f||!_n(d)||f.tagName==="TEXTAREA")return;let s=qe(f)?this.mirror.getId(Dn(d)):this.mirror.getId(f),u=i(d);if(s===-1||u===-1)return o.addNode(d);let l=ke(d,{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:n=>{In(n,this.mirror)&&this.iframeManager.addIframe(n),An(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),qr(d)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(d),this.doc)},onIframeLoad:(n,m)=>{this.iframeManager.attachIframe(n,m),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,m)=>{this.stylesheetManager.attachLinkElement(n,m)}});l&&(t.push({parentId:s,nextId:u,node:l}),r.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let d of this.movedSet)qi(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(k.parentNode(d))||a(d);for(let d of this.addedSet)!zi(this.droppedSet,d)&&!qi(this.removesSubTreeCache,d,this.mirror)||zi(this.movedSet,d)?a(d):this.droppedSet.add(d);let c=null;for(;o.length;){let d=null;if(c){let f=this.mirror.getId(k.parentNode(c.value)),s=i(c.value);f!==-1&&s!==-1&&(d=c)}if(!d){let f=o.tail;for(;f;){let s=f;if(f=f.previous,s){let u=this.mirror.getId(k.parentNode(s.value));if(i(s.value)===-1)continue;if(u!==-1){d=s;break}else{let n=s.value,m=k.parentNode(n);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=k.host(m);if(this.mirror.getId(h)!==-1){d=s;break}}}}}}if(!d){for(;o.head;)o.removeNode(o.head.value);break}c=d.previous,o.removeNode(d.value),a(d.value)}let p={texts:this.texts.map(d=>{let f=d.node,s=k.parentNode(f);return s&&s.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(f),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{let{attributes:f}=d;if(typeof f.style=="string"){let s=JSON.stringify(d.styleDiff),u=JSON.stringify(d._unchangedStyles);s.length<f.style.length&&(s+u).split("var(").length===f.style.split("var(").length&&(f.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:f}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p))}),T(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(k.childNodes(t),o=>k.textContent(o)||"").join("")}),T(this,"processMutation",t=>{if(!Pr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=k.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:tn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Nn(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){let c=Kr(r);i=Zr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)o="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),o==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!en(r.tagName,o))if(a.attributes[o]=Qi(this.doc,Re(r.tagName),Re(o),i,r,this.dataURLOptions),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let d=r.style.getPropertyValue(p),f=r.style.getPropertyPriority(p);d!==c.style.getPropertyValue(p)||f!==c.style.getPropertyPriority(p)?f===""?a.styleDiff[p]=d:a.styleDiff[p]=[d,f]:a._unchangedStyles[p]=[d,f]}for(let p of Array.from(c.style))r.style.getPropertyValue(p)===""&&(a.styleDiff[p]=!1)}else o==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let o=this.mirror.getId(r),i=qe(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||Pr(r,this.mirror,this.slimDOMOptions)||!Ta(r,this.mirror)||(this.addedSet.has(r)?(Hr(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&o===-1||Tn(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ui(o,i)]?Hr(this.movedSet,r):(this.removes.push({parentId:i,id:o,isShadow:qe(t.target)&&ze(t.target)?!0:void 0}),_a(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),T(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Pr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;r&&this.mirror.hasNode(r)&&(o=this.mirror.getId(r)),o&&o!==-1&&(this.movedMap[Ui(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(o=>this.genAdds(o)),qr(t)&&k.childNodes(k.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}};function Hr(e,t){e.delete(t),k.childNodes(t).forEach(r=>Hr(e,r))}function _a(e,t){let r=[e];for(;r.length;){let o=r.pop();t.has(o)||(t.add(o),k.childNodes(o).forEach(i=>r.push(i)))}}function qi(e,t,r){return e.size===0?!1:La(e,t)}function La(e,t,r){let o=k.parentNode(t);return o?e.has(o):!1}function zi(e,t){return e.size===0?!1:kn(e,t)}function kn(e,t){let r=k.parentNode(t);return r?e.has(r)?!0:kn(e,r):!1}var We;function ka(e){We=e}function Pa(){We=void 0}var F=e=>We?(...r)=>{try{return e(...r)}catch(o){if(We&&We(o)===!0)return;throw o}}:e,be=[];function Xe(e){try{if("composedPath"in e){let 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 Pn(e,t){let r=new $r;be.push(r),r.init(e);let o=new(xn())(F(r.processMutations.bind(r)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Fa({mousemoveCb:e,sampling:t,doc:r,mirror:o}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,c=[],p,d=He(F(u=>{let l=Date.now()-p;e(c.map(n=>(n.timeOffset-=l,n)),u),c=[],p=null}),a),f=F(He(F(u=>{let l=Xe(u),{clientX:n,clientY:m}=Ur(u)?u.changedTouches[0]:u;p||(p=ft()),c.push({x:n,y:m,id:o.getId(l),timeOffset:ft()-p}),d(typeof DragEvent<"u"&&u instanceof DragEvent?_.Drag:u instanceof MouseEvent?_.MouseMove:_.TouchMove)}),i,{trailing:!1})),s=[re("mousemove",f,r),re("touchmove",f,r),re("drag",f,r)];return F(()=>{s.forEach(u=>u())})}function Ba({mouseInteractionCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],d=null,f=s=>u=>{let l=Xe(u);if(se(l,o,i,!0))return;let n=null,m=s;if("pointerType"in u){switch(u.pointerType){case"mouse":n=ye.Mouse;break;case"touch":n=ye.Touch;break;case"pen":n=ye.Pen;break}n===ye.Touch?Q[s]===Q.MouseDown?m="TouchStart":Q[s]===Q.MouseUp&&(m="TouchEnd"):ye.Pen}else Ur(u)&&(n=ye.Touch);n!==null?(d=n,(m.startsWith("Touch")&&n===ye.Touch||m.startsWith("Mouse")&&n===ye.Mouse)&&(n=null)):Q[s]===Q.Click&&(n=d,d=null);let h=Ur(u)?u.changedTouches[0]:u;if(!h)return;let g=r.getId(l),{clientX:S,clientY:b}=h;F(e)({type:Q[m],id:g,x:S,y:b,...n!==null&&{pointerType:n}})};return Object.keys(Q).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&c[s]!==!1).forEach(s=>{let u=Re(s),l=f(s);if(window.PointerEvent)switch(Q[s]){case Q.MouseDown:case Q.MouseUp:u=u.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}p.push(re(u,l,t))}),F(()=>{p.forEach(s=>s())})}function Fn({scrollCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){let c=F(He(F(p=>{let d=Xe(p);if(!d||se(d,o,i,!0))return;let f=r.getId(d);if(d===t&&t.defaultView){let s=Rn(t.defaultView);e({id:f,x:s.left,y:s.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return re("scroll",c,t)}function Ua({viewportResizeCb:e},{win:t}){let r=-1,o=-1,i=F(He(F(()=>{let a=Mn(),c=On();(r!==a||o!==c)&&(e({width:Number(c),height:Number(a)}),r=a,o=c)}),200));return re("resize",i,t)}var qa=["INPUT","TEXTAREA","SELECT"],Wi=new WeakMap;function za({inputCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,ignoreClass:a,ignoreSelector:c,maskInputOptions:p,maskInputFn:d,sampling:f,userTriggeredOnInput:s}){function u(b){let v=Xe(b),E=b.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=k.parentElement(v)),!v||!y||qa.indexOf(y)<0||se(v,o,i,!0)||v.classList.contains(a)||c&&v.matches(c))return;let w=v.value,C=!1,x=Kr(v)||"";x==="radio"||x==="checkbox"?C=v.checked:(p[y.toLowerCase()]||p[x])&&(w=Zr({element:v,maskInputOptions:p,tagName:y,type:x,value:w,maskInputFn:d})),l(v,s?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});let N=v.name;x==="radio"&&N&&C&&t.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(M=>{if(M!==v){let A=M.value;l(M,s?{text:A,isChecked:!C,userTriggered:!1}:{text:A,isChecked:!C})}})}function l(b,v){let E=Wi.get(b);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){Wi.set(b,v);let y=r.getId(b);F(e)({...v,id:y})}}let m=(f.input==="last"?["change"]:["input","change"]).map(b=>re(b,F(u),t)),h=t.defaultView;if(!h)return()=>{m.forEach(b=>b())};let g=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),S=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(b=>Et(b[0],b[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,h))),F(()=>{m.forEach(b=>b())})}function ht(e){let t=[];function r(o,i){if(st("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){let c=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(c)}else if(o.parentStyleSheet){let c=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(c)}return i}return r(e,t)}function Se(e,t,r){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:o}):{}}function Wa({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};let i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((s,u,l)=>{let[n,m]=l,{id:h,styleId:g}=Se(u,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,adds:[{rule:n,index:m}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.addRule=function(s,u,l=this.cssRules.length){let n=`${s} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};let a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:h}=Se(u,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,removes:[{index:n}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.removeRule=function(s){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[s])};let c;o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:h}=Se(u,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replace:n}),s.apply(u,l)})}));let p;o.CSSStyleSheet.prototype.replaceSync&&(p=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:h}=Se(u,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replaceSync:n}),s.apply(u,l)})}));let d={};it("CSSGroupingRule")?d.CSSGroupingRule=o.CSSGroupingRule:(it("CSSMediaRule")&&(d.CSSMediaRule=o.CSSMediaRule),it("CSSConditionRule")&&(d.CSSConditionRule=o.CSSConditionRule),it("CSSSupportsRule")&&(d.CSSSupportsRule=o.CSSSupportsRule));let f={};return Object.entries(d).forEach(([s,u])=>{f[s]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(f[s].insertRule,{apply:F((l,n,m)=>{let[h,g]=m,{id:S,styleId:b}=Se(n.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:h,index:[...ht(n),g||0]}]}),l.apply(n,m)})}),u.prototype.deleteRule=new Proxy(f[s].deleteRule,{apply:F((l,n,m)=>{let[h]=m,{id:g,styleId:S}=Se(n.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...ht(n),h]}]}),l.apply(n,m)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,c&&(o.CSSStyleSheet.prototype.replace=c),p&&(o.CSSStyleSheet.prototype.replaceSync=p),Object.entries(d).forEach(([s,u])=>{u.prototype.insertRule=f[s].insertRule,u.prototype.deleteRule=f[s].deleteRule})})}function Bn({mirror:e,stylesheetManager:t},r){var o,i,a;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(k.host(r));let p=r.nodeName==="#document"?(o=r.defaultView)==null?void 0:o.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!p||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var f;return(f=d.get)==null?void 0:f.call(this)},set(f){var s;let u=(s=d.set)==null?void 0:s.call(this,f);if(c!==null&&c!==-1)try{t.adoptStyleSheets(f,c)}catch{}return u}}),F(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function $a({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:o},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((p,d,f)=>{var s;let[u,l,n]=f;if(r.has(u))return a.apply(d,[u,l,n]);let{id:m,styleId:h}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,set:{property:u,value:l,priority:n},index:ht(d.parentRule)}),p.apply(d,f)})});let c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:F((p,d,f)=>{var s;let[u]=f;if(r.has(u))return c.apply(d,[u]);let{id:l,styleId:n}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:u},index:ht(d.parentRule)}),p.apply(d,f)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=c})}function Ha({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:o,sampling:i,doc:a}){let c=F(d=>He(F(f=>{let s=Xe(f);if(!s||se(s,t,r,!0))return;let{currentTime:u,volume:l,muted:n,playbackRate:m,loop:h}=s;e({type:d,id:o.getId(s),currentTime:u,volume:l,muted:n,playbackRate:m,loop:h})}),i.media||500)),p=[re("play",c(_e.Play),a),re("pause",c(_e.Pause),a),re("seeked",c(_e.Seeked),a),re("volumechange",c(_e.VolumeChange),a),re("ratechange",c(_e.RateChange),a)];return F(()=>{p.forEach(d=>d())})}function ja({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,f,s){let u=new a(d,f,s);return i.set(u,{family:d,buffer:typeof f!="string",descriptors:s,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),u};let c=Ne(t.fonts,"add",function(p){return function(d){return setTimeout(F(()=>{let f=i.get(d);f&&(e(f),i.delete(d))}),0),p.apply(this,[d])}});return o.push(()=>{r.FontFace=a}),o.push(c),F(()=>{o.forEach(p=>p())})}function Va(e){let{doc:t,mirror:r,blockClass:o,blockSelector:i,selectionCb:a}=e,c=!0,p=F(()=>{let d=t.getSelection();if(!d||c&&d?.isCollapsed)return;c=d.isCollapsed||!1;let f=[],s=d.rangeCount||0;for(let u=0;u<s;u++){let l=d.getRangeAt(u),{startContainer:n,startOffset:m,endContainer:h,endOffset:g}=l;se(n,o,i,!0)||se(h,o,i,!0)||f.push({start:r.getId(n),startOffset:m,end:r.getId(h),endOffset:g})}a({ranges:f})});return p(),re("selectionchange",p)}function Ga({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Ne(r.customElements,"define",function(i){return function(a,c,p){try{t({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,c,p])}})}function Ya(e,t){let{mutationCb:r,mousemoveCb:o,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:c,inputCb:p,mediaInteractionCb:d,styleSheetRuleCb:f,styleDeclarationCb:s,canvasMutationCb:u,fontCb:l,selectionCb:n,customElementCb:m}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),o(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),i(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),a(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),c(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),p(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),d(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),f(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),s(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),u(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),l(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),n(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),m(...h)}}function Xa(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};Ya(e,t);let o;e.recordDOM&&(o=Pn(e,e.doc));let i=Fa(e),a=Ba(e),c=Fn(e),p=Ua(e,{win:r}),d=za(e),f=Ha(e),s=()=>{},u=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(s=Wa(e,{win:r}),u=Bn(e,e.doc),l=$a(e,{win:r}),e.collectFonts&&(n=ja(e)));let m=Va(e),h=Ga(e),g=[];for(let S of e.plugins)g.push(S.observer(S.callback,r,S.options));return F(()=>{be.forEach(S=>S.destroy()),be.forEach(S=>S.reset()),o?.disconnect(),i(),a(),c(),p(),d(),f(),s(),u(),l(),n(),m(),h(),g.forEach(S=>S()),be.length=0})}function st(e){return typeof window[e]<"u"}function it(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var dt=class{constructor(t){T(this,"iframeIdToRemoteIdMap",new WeakMap),T(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,o,i){let a=o||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),c.set(p,r)),p}getIds(t,r){let o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,o,i))}getRemoteId(t,r,o){let i=o||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=i.get(r);return a||-1}getRemoteIds(t,r){let o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},jr=class{constructor(t){T(this,"iframes",new WeakMap),T(this,"crossOriginIframeMap",new WeakMap),T(this,"crossOriginIframeMirror",new dt(Ki)),T(this,"crossOriginIframeStyleMirror"),T(this,"crossOriginIframeRootIdMap",new WeakMap),T(this,"mirror"),T(this,"mutationCb"),T(this,"wrappedEmit"),T(this,"loadListener"),T(this,"stylesheetManager"),T(this,"recordCrossOriginIframes"),T(this,"messageHandler"),T(this,"nestedIframeListeners",new Map),T(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var o;this.attachedIframes.set(t,r),this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});let i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){let a=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,a),i.addEventListener("message",a)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let i=this.crossOriginIframeMap.get(t.source);if(!i)return;let a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var o;switch(r.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),this.attachedIframes.set(t,r.data.node),{timestamp:r.timestamp,type:L.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return r;case L.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case L.IncrementalSnapshot:switch(r.data.source){case _.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);let a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(r.data,t,["id"]),r;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case _.Font:return r;case _.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case _.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(o=r.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,o,i){for(let a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(o,r[a]):r[a]=t.getId(o,r[a]));return r}replaceIds(t,r,o){return this.replace(this.crossOriginIframeMirror,t,r,o)}replaceStyleIds(t,r,o){return this.replace(this.crossOriginIframeStyleMirror,t,r,o)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,r)})}patchRootIdOnNode(t,r){t.type!==Ln.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,r)})}reattachIframes(){this.attachedIframes.forEach((t,r)=>{if(!r.isConnected){this.attachedIframes.delete(r);return}let o=this.mirror.getId(r);if(o===-1){this.attachedIframes.delete(r);return}this.mutationCb({adds:[{parentId:o,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear()}},Vr=class{constructor(t){T(this,"shadowDoms",new WeakSet),T(this,"mutationCb"),T(this,"scrollCb"),T(this,"bypassOptions"),T(this,"mirror"),T(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!ze(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let o=Pn({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(Fn({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(Bn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let o=this;this.restoreHandlers.push(Ne(t.prototype,"attachShadow",function(i){return function(a){let c=i.call(this,a),p=k.shadowRoot(this);return p&&_n(this)&&o.addShadowRoot(p,r),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ja=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ue=0;Ue<Pe.length;Ue++)Ja[Pe.charCodeAt(Ue)]=Ue;var Ue,Za=function(e){var t=new Uint8Array(e),r,o=t.length,i="";for(r=0;r<o;r+=3)i+=Pe[t[r]>>2],i+=Pe[(t[r]&3)<<4|t[r+1]>>4],i+=Pe[(t[r+1]&15)<<2|t[r+2]>>6],i+=Pe[t[r+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var $i=new Map;function Ka(e,t){let r=$i.get(e);return r||(r=new Map,$i.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Un=(e,t,r)=>{if(!e||!(zn(e,t)||typeof e=="object"))return;let o=e.constructor.name,i=Ka(r,o),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function nt(e,t,r,o){if(e instanceof Array)return e.map(i=>nt(i,t,r,o));if(e===null)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){let i=e.constructor.name,a=Za(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[nt(e.buffer,t,r,o),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",a=e.toDataURL(o.type,o.quality);return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[nt(e.data,t,r,o),e.width,e.height]};if(zn(e,t)||typeof e=="object"){let i=e.constructor.name,a=Un(e,t,r);return{rr_type:i,index:a}}}}return e}var qn=(e,t,r,o)=>e.map(i=>nt(i,t,r,o)),zn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Qa(e,t,r,o,i){let a=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let p of c)try{if(typeof t.CanvasRenderingContext2D.prototype[p]!="function")continue;let d=Ne(t.CanvasRenderingContext2D.prototype,p,function(f){return function(...s){return se(this.canvas,r,o,!0)||setTimeout(()=>{let u=qn(s,t,this,i);e(this.canvas,{type:Fe["2D"],property:p,args:u})},0),f.apply(this,s)}});a.push(d)}catch{let d=Et(t.CanvasRenderingContext2D.prototype,p,{set(f){e(this.canvas,{type:Fe["2D"],property:p,args:[f],setter:!0})}});a.push(d)}return()=>{a.forEach(p=>p())}}function el(e){return e==="experimental-webgl"?"webgl":e}function Hi(e,t,r,o){let i=[];try{let a=Ne(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(p,...d){if(!se(this,t,r,!0)){let f=el(p);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){let s=d[0];s.preserveDrawingBuffer||(s.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[p,...d])}});i.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function ji(e,t,r,o,i,a,c){let p=[],d=Object.getOwnPropertyNames(e);for(let f of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;let s=Ne(e,f,function(u){return function(...l){let n=u.apply(this,l);if(Un(n,a,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){let m=qn(l,a,this,c),h={type:t,property:f,args:m};r(this.canvas,h)}return n}});p.push(s)}catch{let s=Et(e,f,{set(u){r(this.canvas,{type:t,property:f,args:[u],setter:!0})}});p.push(s)}return p}function tl(e,t,r,o,i){let a=[];return a.push(...ji(t.WebGLRenderingContext.prototype,Fe.WebGL,e,r,o,t,i)),typeof t.WebGL2RenderingContext<"u"&&a.push(...ji(t.WebGL2RenderingContext.prototype,Fe.WebGL2,e,r,o,t,i)),()=>{a.forEach(c=>c())}}var Wn=`(function() {
|
|
58
58
|
"use strict";
|
|
59
59
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
60
60
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -129,13 +129,13 @@ or you can use record.mirror to access the mirror instance during recording.`,Fi
|
|
|
129
129
|
};
|
|
130
130
|
})();
|
|
131
131
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
132
|
-
`,Hi=typeof self<"u"&&self.Blob&&new Blob([$n],{type:"text/javascript;charset=utf-8"});function tl(e){let t;try{if(t=Hi&&(self.URL||self.webkitURL).createObjectURL(Hi),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent($n),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Vr=class{constructor(t){I(this,"pendingCanvasMutations",new Map),I(this,"rafStamps",{latestId:0,invokeId:null}),I(this,"mirror"),I(this,"mutationCb"),I(this,"resetObservers"),I(this,"frozen",!1),I(this,"locked",!1),I(this,"rafIdTimestamp",null),I(this,"rafIdFlush",null),I(this,"processMutation",(d,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(h)});let{sampling:r="all",win:o,blockClass:i,blockSelector:a,recordCanvas:c,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&r==="all"&&this.initCanvasMutationObserver(o,i,a,p),c&&typeof r=="number"&&this.initCanvasFPSObserver(r,o,i,a,{dataURLOptions:p})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,o,i,a){let c=ji(r,o,i,!0),p=new Map,d=new tl;d.onmessage=m=>{let{id:f}=m.data;if(p.set(f,!1),!("base64"in m.data))return;let{base64:g,type:S,width:w,height:v}=m.data;this.mutationCb({id:f,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let h=1e3/t,s=0,u,l=()=>{let m=[],f=g=>{g.querySelectorAll("canvas").forEach(S=>{se(S,o,i,!0)||m.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&f(S.shadowRoot)})};return f(r.document),m},n=m=>{if(s&&m-s<h){u=requestAnimationFrame(n);return}s=m,l().forEach(async f=>{var g;let S=this.mirror.getId(f);if(p.get(S)||f.width===0||f.height===0)return;if(p.set(S,!0),["webgl","webgl2"].includes(f.__context)){let y=f.getContext(f.__context);((g=y?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let w=f.clientWidth||f.width,v=f.clientHeight||f.height,E=await createImageBitmap(f,{resizeWidth:w,resizeHeight:v});d.postMessage({id:S,bitmap:E,width:w,height:v,dataURLOptions:a.dataURLOptions},[E])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,r,o,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=ji(t,r,o,!1),c=Ka(this.processMutation.bind(this),t,r,o,i),p=el(this.processMutation.bind(this),t,r,o,i);this.resetObservers=()=>{a(),c(),p()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let o=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,o)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let o=this.pendingCanvasMutations.get(t);if(!o||r===-1)return;let i=o.map(c=>{let{type:p,...d}=c;return d}),{type:a}=o[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}},Hr=class{constructor(t){I(this,"trackedLinkElements",new WeakSet),I(this,"mutationCb"),I(this,"adoptedStyleSheetCb"),I(this,"styleMirror",new Ur),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let o={id:r,styleIds:[]},i=[];for(let a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),i.push({styleId:c,rules:Array.from(a.rules||CSSRule,(p,d)=>({rule:Ji(p,a.href),index:d}))})),o.styleIds.push(c)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Gr=class{constructor(){I(this,"nodeMap",new WeakMap),I(this,"active",!1)}inOtherBuffer(t,r){let o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},q,ot,Lr,pt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ws=e.contentWindow)==null?void 0:ws.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var le=go();function de(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:p=null,maskTextClass:d="rr-mask",maskTextSelector:h=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:l,slimDOMOptions:n,maskInputFn:m,maskTextFn:f,hooks:g,packFn:S,sampling:w={},dataURLOptions:v={},mousemoveWait:E,recordDOM:y=!0,recordCanvas:b=!1,recordCrossOriginIframes:C=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:D=!1,plugins:A,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:R}=e;ka(R);let X={type:"image/webp",quality:.4,maxBase64ImageLength:1048576,...v},P=C?window.parent===window:!0,B=!1;if(!P)try{window.parent.document&&(B=!1)}catch{B=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!B)return()=>{};E!==void 0&&w.mousemove===void 0&&(w.mousemove=E),le.reset();let J=u===!0?{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}:l!==void 0?l:{password:!0},j=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};Ia();let be,me=0,N=T=>{for(let Z of A||[])Z.eventProcessor&&(T=Z.eventProcessor(T));return S&&!B&&(T=S(T)),T};q=(T,Z)=>{var V;let H=T;if(H.timestamp=ht(),(V=we[0])!=null&&V.isFrozen()&&H.type!==k.FullSnapshot&&!(H.type===k.IncrementalSnapshot&&H.data.source===_.Mutation)&&we.forEach(ce=>ce.unfreeze()),P)t?.(N(H),Z);else if(B){let ce={type:"rrweb",event:N(H),origin:window.location.origin,isCheckout:Z};window.parent.postMessage(ce,"*")}if(H.type===k.FullSnapshot)be=H,me=0;else if(H.type===k.IncrementalSnapshot){if(H.data.source===_.Mutation&&H.data.isAttachIframe)return;me++;let ce=o&&me>=o,Ae=r&&H.timestamp-be.timestamp>r;(ce||Ae)&&ot(!0)}};let ne=T=>{q({type:k.IncrementalSnapshot,data:{source:_.Mutation,...T}})},oe=T=>q({type:k.IncrementalSnapshot,data:{source:_.Scroll,...T}}),Ie=T=>q({type:k.IncrementalSnapshot,data:{source:_.CanvasMutation,...T}}),ge=T=>q({type:k.IncrementalSnapshot,data:{source:_.AdoptedStyleSheet,...T}}),ue=new Hr({mutationCb:ne,adoptedStyleSheetCb:ge}),ie=new qr({mirror:le,mutationCb:ne,stylesheetManager:ue,recordCrossOriginIframes:C,wrappedEmit:q});for(let T of A||[])T.getMirror&&T.getMirror({nodeMirror:le,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let xe=new Gr;Lr=new Vr({recordCanvas:b,mutationCb:Ie,win:window,blockClass:i,blockSelector:a,mirror:le,sampling:w.canvas,dataURLOptions:X});let G=new jr({mutationCb:ne,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:s,maskInputOptions:J,dataURLOptions:X,maskTextFn:f,maskInputFn:m,recordCanvas:b,inlineImages:D,sampling:w,slimDOMOptions:j,iframeManager:ie,stylesheetManager:ue,canvasManager:Lr,keepIframeSrcFn:ee,processedNodeManager:xe},mirror:le});ot=(T=!1)=>{if(!y)return;q({type:k.Meta,data:{href:window.location.href,width:Nn(),height:Mn()}},T),ue.reset(),G.init(),we.forEach(V=>V.lock());let Z=$o(document,{mirror:le,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:s,maskAllInputs:J,maskTextFn:f,maskInputFn:m,slimDOM:j,dataURLOptions:X,recordCanvas:b,inlineImages:D,onSerialize:V=>{An(V,le)&&ie.addIframe(V),Dn(V,le)&&ue.trackLinkElement(V),Br(V)&&G.addShadowRoot(L.shadowRoot(V),document)},onIframeLoad:(V,H)=>{ie.attachIframe(V,H),G.observeAttachShadow(V)},onStylesheetLoad:(V,H)=>{ue.attachLinkElement(V,H)},keepIframeSrcFn:ee});if(!Z)return console.warn("Failed to snapshot the document");q({type:k.FullSnapshot,data:{node:Z,initialOffset:Rn(window)}},T),we.forEach(V=>V.unlock()),C&&ie.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{let T=[],Z=ce=>{var Ae;return F(Ya)({mutationCb:ne,mousemoveCb:(W,Rt)=>q({type:k.IncrementalSnapshot,data:{source:Rt,positions:W}}),mouseInteractionCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.MouseInteraction,...W}}),scrollCb:oe,viewportResizeCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.ViewportResize,...W}}),inputCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.Input,...W}}),mediaInteractionCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.MediaInteraction,...W}}),styleSheetRuleCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.StyleSheetRule,...W}}),styleDeclarationCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.StyleDeclaration,...W}}),canvasMutationCb:Ie,fontCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.Font,...W}}),selectionCb:W=>{q({type:k.IncrementalSnapshot,data:{source:_.Selection,...W}})},customElementCb:W=>{q({type:k.IncrementalSnapshot,data:{source:_.CustomElement,...W}})},blockClass:i,ignoreClass:c,ignoreSelector:p,maskTextClass:d,maskTextSelector:h,maskInputOptions:J,inlineStylesheet:s,sampling:w,recordDOM:y,recordCanvas:b,inlineImages:D,userTriggeredOnInput:O,collectFonts:M,doc:ce,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:j,dataURLOptions:X,mirror:le,iframeManager:ie,stylesheetManager:ue,shadowDomManager:G,processedNodeManager:xe,canvasManager:Lr,ignoreCSSAttributes:te,plugins:((Ae=A?.filter(W=>W.observer))==null?void 0:Ae.map(W=>({observer:W.observer,options:W.options,callback:Rt=>q({type:k.Plugin,data:{plugin:W.name,payload:Rt}})})))||[]},g)},V=ce=>{try{T.push(Z(ce.contentDocument))}catch(Ae){console.warn(Ae)}};ie.addLoadListener(V);let H=()=>{ot(),T.push(Z(document)),pt=!0};return document.readyState==="interactive"||document.readyState==="complete"?H():(T.push(re("DOMContentLoaded",()=>{q({type:k.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&H()})),T.push(re("load",()=>{q({type:k.Load,data:{}}),x==="load"&&H()},window))),()=>{T.forEach(ce=>ce()),xe.destroy(),ie.removeLoadListener(),ie.destroy(),le.reset(),pt=!1,La()}}catch(T){console.warn(T)}}de.addCustomEvent=(e,t)=>{if(!pt)throw new Error("please add custom event after start recording");q({type:k.Custom,data:{tag:e,payload:t}})};de.freezePage=()=>{we.forEach(e=>e.freeze())};de.takeFullSnapshot=e=>{if(!pt)throw new Error("please take full snapshot after start recording");ot(e)};de.mirror=le;var Gi;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Gi||(Gi={}));var Nl=5*1e3;var{addCustomEvent:Ol}=de,{freezePage:Il}=de,{takeFullSnapshot:Al}=de;var rl=Object.defineProperty,sl=(e,t,r)=>t in e?rl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>sl(e,typeof t!="symbol"?t+"":t,r);function il(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var Ee=class{constructor(t){xt(this,"fileName"),xt(this,"functionName"),xt(this,"lineNumber"),xt(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${r})`:`${this.fileName}:${t}:${r}`}},nl=/(^|@)\S+:\d+/,qn=/^\s*at .*(\S+:\d+|\(native\))/m,ol=/^(eval@)?(\[native code])?$/,ds={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(qn)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error(`Cannot parse given url: ${e}`);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
|
|
133
|
-
`).filter(function(r){return!!r.match(
|
|
134
|
-
`).filter(function(r){return!r.match(
|
|
132
|
+
`,Vi=typeof self<"u"&&self.Blob&&new Blob([Wn],{type:"text/javascript;charset=utf-8"});function rl(e){let t;try{if(t=Vi&&(self.URL||self.webkitURL).createObjectURL(Vi),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Wn),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Gr=class{constructor(t){T(this,"pendingCanvasMutations",new Map),T(this,"rafStamps",{latestId:0,invokeId:null}),T(this,"mirror"),T(this,"mutationCb"),T(this,"resetObservers"),T(this,"frozen",!1),T(this,"locked",!1),T(this,"rafIdTimestamp",null),T(this,"rafIdFlush",null),T(this,"processMutation",(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)});let{sampling:r="all",win:o,blockClass:i,blockSelector:a,recordCanvas:c,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&r==="all"&&this.initCanvasMutationObserver(o,i,a,p),c&&typeof r=="number"&&this.initCanvasFPSObserver(r,o,i,a,{dataURLOptions:p})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,o,i,a){let c=Hi(r,o,i,!0),p=new Map,d=new rl;d.onmessage=m=>{let{id:h}=m.data;if(p.set(h,!1),!("base64"in m.data))return;let{base64:g,type:S,width:b,height:v}=m.data;this.mutationCb({id:h,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,b,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let f=1e3/t,s=0,u,l=()=>{let m=[],h=g=>{g.querySelectorAll("canvas").forEach(S=>{se(S,o,i,!0)||m.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&h(S.shadowRoot)})};return h(r.document),m},n=m=>{if(s&&m-s<f){u=requestAnimationFrame(n);return}s=m,l().forEach(async h=>{var g;let S=this.mirror.getId(h);if(p.get(S)||h.width===0||h.height===0)return;if(p.set(S,!0),["webgl","webgl2"].includes(h.__context)){let y=h.getContext(h.__context);((g=y?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let b=h.clientWidth||h.width,v=h.clientHeight||h.height,E=await createImageBitmap(h,{resizeWidth:b,resizeHeight:v});d.postMessage({id:S,bitmap:E,width:b,height:v,dataURLOptions:a.dataURLOptions},[E])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,r,o,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=Hi(t,r,o,!1),c=Qa(this.processMutation.bind(this),t,r,o,i),p=tl(this.processMutation.bind(this),t,r,o,i);this.resetObservers=()=>{a(),c(),p()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let o=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,o)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let o=this.pendingCanvasMutations.get(t);if(!o||r===-1)return;let i=o.map(c=>{let{type:p,...d}=c;return d}),{type:a}=o[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}},Yr=class{constructor(t){T(this,"trackedLinkElements",new WeakSet),T(this,"mutationCb"),T(this,"adoptedStyleSheetCb"),T(this,"styleMirror",new zr),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let o={id:r,styleIds:[]},i=[];for(let a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),i.push({styleId:c,rules:Array.from(a.rules||CSSRule,(p,d)=>({rule:Ji(p,a.href),index:d}))})),o.styleIds.push(c)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Xr=class{constructor(){T(this,"nodeMap",new WeakMap),T(this,"active",!1)}inOtherBuffer(t,r){let o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},$,ot,Fr,pt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((bs=e.contentWindow)==null?void 0:bs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var le=yo();function de(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:p=null,maskTextClass:d="rr-mask",maskTextSelector:f=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:l,slimDOMOptions:n,maskInputFn:m,maskTextFn:h,hooks:g,packFn:S,sampling:b={},dataURLOptions:v={},mousemoveWait:E,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:N=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:I,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:R}=e;ka(R);let X={type:"image/webp",quality:.4,maxBase64ImageLength:1048576,...v},P=C?window.parent===window:!0,B=!1;if(!P)try{window.parent.document&&(B=!1)}catch{B=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!B)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),le.reset();let J=u===!0?{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}:l!==void 0?l:{password:!0},H=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};Ia();let we,me=0,O=D=>{for(let Z of I||[])Z.eventProcessor&&(D=Z.eventProcessor(D));return S&&!B&&(D=S(D)),D};$=(D,Z)=>{var j;let V=D;if(V.timestamp=ft(),(j=be[0])!=null&&j.isFrozen()&&V.type!==L.FullSnapshot&&!(V.type===L.IncrementalSnapshot&&V.data.source===_.Mutation)&&be.forEach(ce=>ce.unfreeze()),P)t?.(O(V),Z);else if(B){let ce={type:"rrweb",event:O(V),origin:window.location.origin,isCheckout:Z};window.parent.postMessage(ce,"*")}if(V.type===L.FullSnapshot)we=V,me=0;else if(V.type===L.IncrementalSnapshot){if(V.data.source===_.Mutation&&V.data.isAttachIframe)return;me++;let ce=o&&me>=o,Ie=r&&V.timestamp-we.timestamp>r;(ce||Ie)&&ot(!0)}};let ne=D=>{$({type:L.IncrementalSnapshot,data:{source:_.Mutation,...D}})},oe=D=>$({type:L.IncrementalSnapshot,data:{source:_.Scroll,...D}}),Te=D=>$({type:L.IncrementalSnapshot,data:{source:_.CanvasMutation,...D}}),ge=D=>$({type:L.IncrementalSnapshot,data:{source:_.AdoptedStyleSheet,...D}}),ue=new Yr({mutationCb:ne,adoptedStyleSheetCb:ge}),ie=new jr({mirror:le,mutationCb:ne,stylesheetManager:ue,recordCrossOriginIframes:C,wrappedEmit:$});for(let D of I||[])D.getMirror&&D.getMirror({nodeMirror:le,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let xe=new Xr;Fr=new Gr({recordCanvas:w,mutationCb:Te,win:window,blockClass:i,blockSelector:a,mirror:le,sampling:b.canvas,dataURLOptions:X});let G=new Vr({mutationCb:ne,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:s,maskInputOptions:J,dataURLOptions:X,maskTextFn:h,maskInputFn:m,recordCanvas:w,inlineImages:A,sampling:b,slimDOMOptions:H,iframeManager:ie,stylesheetManager:ue,canvasManager:Fr,keepIframeSrcFn:ee,processedNodeManager:xe},mirror:le});ot=(D=!1)=>{if(!y)return;$({type:L.Meta,data:{href:window.location.href,width:On(),height:Mn()}},D),ue.reset(),G.init(),be.forEach(j=>j.lock());let Z=$o(document,{mirror:le,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:s,maskAllInputs:J,maskTextFn:h,maskInputFn:m,slimDOM:H,dataURLOptions:X,recordCanvas:w,inlineImages:A,onSerialize:j=>{In(j,le)&&ie.addIframe(j),An(j,le)&&ue.trackLinkElement(j),qr(j)&&G.addShadowRoot(k.shadowRoot(j),document)},onIframeLoad:(j,V)=>{ie.attachIframe(j,V),G.observeAttachShadow(j)},onStylesheetLoad:(j,V)=>{ue.attachLinkElement(j,V)},keepIframeSrcFn:ee});if(!Z)return console.warn("Failed to snapshot the document");$({type:L.FullSnapshot,data:{node:Z,initialOffset:Rn(window)}},D),be.forEach(j=>j.unlock()),C&&ie.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{let D=[],Z=ce=>{var Ie;return F(Xa)({mutationCb:ne,mousemoveCb:(q,Ot)=>$({type:L.IncrementalSnapshot,data:{source:Ot,positions:q}}),mouseInteractionCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.MouseInteraction,...q}}),scrollCb:oe,viewportResizeCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.ViewportResize,...q}}),inputCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.Input,...q}}),mediaInteractionCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.MediaInteraction,...q}}),styleSheetRuleCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.StyleSheetRule,...q}}),styleDeclarationCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.StyleDeclaration,...q}}),canvasMutationCb:Te,fontCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.Font,...q}}),selectionCb:q=>{$({type:L.IncrementalSnapshot,data:{source:_.Selection,...q}})},customElementCb:q=>{$({type:L.IncrementalSnapshot,data:{source:_.CustomElement,...q}})},blockClass:i,ignoreClass:c,ignoreSelector:p,maskTextClass:d,maskTextSelector:f,maskInputOptions:J,inlineStylesheet:s,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:A,userTriggeredOnInput:N,collectFonts:M,doc:ce,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:H,dataURLOptions:X,mirror:le,iframeManager:ie,stylesheetManager:ue,shadowDomManager:G,processedNodeManager:xe,canvasManager:Fr,ignoreCSSAttributes:te,plugins:((Ie=I?.filter(q=>q.observer))==null?void 0:Ie.map(q=>({observer:q.observer,options:q.options,callback:Ot=>$({type:L.Plugin,data:{plugin:q.name,payload:Ot}})})))||[]},g)},j=ce=>{try{D.push(Z(ce.contentDocument))}catch(Ie){console.warn(Ie)}};ie.addLoadListener(j);let V=()=>{ot(),D.push(Z(document)),pt=!0};return document.readyState==="interactive"||document.readyState==="complete"?V():(D.push(re("DOMContentLoaded",()=>{$({type:L.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&V()})),D.push(re("load",()=>{$({type:L.Load,data:{}}),x==="load"&&V()},window))),()=>{D.forEach(ce=>ce()),xe.destroy(),ie.removeLoadListener(),ie.destroy(),le.reset(),pt=!1,Pa()}}catch(D){console.warn(D)}}de.addCustomEvent=(e,t)=>{if(!pt)throw new Error("please add custom event after start recording");$({type:L.Custom,data:{tag:e,payload:t}})};de.freezePage=()=>{be.forEach(e=>e.freeze())};de.takeFullSnapshot=e=>{if(!pt)throw new Error("please take full snapshot after start recording");ot(e)};de.mirror=le;var Gi;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Gi||(Gi={}));var Il=5*1e3;var{addCustomEvent:Al}=de,{freezePage:Dl}=de,{takeFullSnapshot:_l}=de;var sl=Object.defineProperty,il=(e,t,r)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>il(e,typeof t!="symbol"?t+"":t,r);function nl(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var Ee=class{constructor(t){xt(this,"fileName"),xt(this,"functionName"),xt(this,"lineNumber"),xt(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${r})`:`${this.fileName}:${t}:${r}`}},ol=/(^|@)\S+:\d+/,$n=/^\s*at .*(\S+:\d+|\(native\))/m,al=/^(eval@)?(\[native code])?$/,ms={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match($n)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error(`Cannot parse given url: ${e}`);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
|
|
133
|
+
`).filter(function(r){return!!r.match($n)},this).map(function(r){r.indexOf("(eval ")>-1&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let o=r.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=o.match(/ (\((.+):(\d+):(\d+)\)$)/);o=i?o.replace(i[0],""):o;let a=o.split(/\s+/).slice(1),c=this.extractLocation(i?i[1]:a.pop()),p=a.join(" ")||void 0,d=["eval","<anonymous>"].indexOf(c[0])>-1?void 0:c[0];return new Ee({functionName:p,fileName:d,lineNumber:c[1],columnNumber:c[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(`
|
|
134
|
+
`).filter(function(r){return!r.match(al)},this).map(function(r){if(r.indexOf(" > eval")>-1&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),r.indexOf("@")===-1&&r.indexOf(":")===-1)return new Ee({functionName:r});{let o=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=r.match(o),a=i&&i[1]?i[1]:void 0,c=this.extractLocation(r.replace(o,""));return new Ee({functionName:a,fileName:c[0],lineNumber:c[1],columnNumber:c[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
|
|
135
135
|
`)>-1&&e.message.split(`
|
|
136
136
|
`).length>e.stacktrace.split(`
|
|
137
137
|
`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split(`
|
|
138
138
|
`),o=[];for(let i=2,a=r.length;i<a;i+=2){let c=t.exec(r[i]);c&&o.push(new Ee({fileName:c[2],lineNumber:parseFloat(c[1])}))}return o},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split(`
|
|
139
139
|
`),o=[];for(let i=0,a=r.length;i<a;i+=2){let c=t.exec(r[i]);c&&o.push(new Ee({functionName:c[3]||void 0,fileName:c[2],lineNumber:parseFloat(c[1])}))}return o},parseOpera11:function(e){return e.stack.split(`
|
|
140
|
-
`).filter(function(r){return!!r.match(
|
|
141
|
-
End of stack for Error object`:d.name+": "+d.message}return d});function a(p){return!!(
|
|
140
|
+
`).filter(function(r){return!!r.match(ol)&&!r.match(/^Error created at/)},this).map(function(r){let o=r.split("@"),i=this.extractLocation(o.pop()),c=(o.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ee({functionName:c,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)}};function ll(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let o=e.parentElement,i=[];if(o.children&&o.children.length>0)for(let a=0;a<o.children.length;a++){let c=o.children[a];c.localName&&c.localName.toLowerCase&&c.localName.toLowerCase()===r&&i.push(c)}i.length>1&&(r+=`:eq(${i.indexOf(e)})`),t=r+(t?">"+t:""),e=o}return t}function gs(e){return Object.prototype.toString.call(e)==="[object Object]"}function jn(e,t){if(t===0)return!0;let r=Object.keys(e);for(let o of r)if(gs(e[o])&&jn(e[o],t-1))return!0;return!1}function Be(e,t){let r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);let o=[],i=[];return JSON.stringify(e,function(p,d){if(o.length>0){let f=o.indexOf(this);~f?o.splice(f+1):o.push(this),~f?i.splice(f,1/0,p):i.push(p),~o.indexOf(d)&&(o[0]===d?d="[Circular ~]":d="[Circular ~."+i.slice(0,o.indexOf(d)).join(".")+"]")}else o.push(d);if(d===null)return d;if(d===void 0)return"undefined";if(a(d))return c(d);if(typeof d=="bigint")return d.toString()+"n";if(d instanceof Event){let f={};for(let s in d){let u=d[s];Array.isArray(u)?f[s]=ll(u.length?u[0]:null):f[s]=u}return f}else{if(d instanceof Node)return d instanceof HTMLElement?d?d.outerHTML:"":d.nodeName;if(d instanceof Error)return d.stack?d.stack+`
|
|
141
|
+
End of stack for Error object`:d.name+": "+d.message}return d});function a(p){return!!(gs(p)&&Object.keys(p).length>r.numOfKeysLimit||typeof p=="function"||gs(p)&&jn(p,r.depthOfLimit))}function c(p){let d=p.toString();return r.stringLengthLimit&&d.length>r.stringLengthLimit&&(d=`${d.slice(0,r.stringLengthLimit)}...`),d}}var Hn={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 ul(e,t,r){let o=r?Object.assign({},Hn,r):Hn,i=o.logger;if(!i)return()=>{};let a;typeof i=="string"?a=t[i]:a=i;let c=0,p=!1,d=[];if(o.level.includes("error")){let s=l=>{let n=l.message,m=l.error,h=ms.parse(m).map(S=>S.toString()),g=[Be(n,o.stringifyOptions)];e({level:"error",trace:h,payload:g})};t.addEventListener("error",s),d.push(()=>{t.removeEventListener("error",s)});let u=l=>{let n,m;l.reason instanceof Error?(n=l.reason,m=[Be(`Uncaught (in promise) ${n.name}: ${n.message}`,o.stringifyOptions)]):(n=new Error,m=[Be("Uncaught (in promise)",o.stringifyOptions),Be(l.reason,o.stringifyOptions)]);let h=ms.parse(n).map(g=>g.toString());e({level:"error",trace:h,payload:m})};t.addEventListener("unhandledrejection",u),d.push(()=>{t.removeEventListener("unhandledrejection",u)})}for(let s of o.level)d.push(f(a,s));return()=>{d.forEach(s=>s())};function f(s,u){return s[u]?nl(s,u,l=>(...n)=>{if(l.apply(this,n),!(u==="assert"&&n[0])&&!p){p=!0;try{let m=ms.parse(new Error).map(S=>S.toString()).splice(1),g=(u==="assert"?n.slice(1):n).map(S=>Be(S,o.stringifyOptions));c++,c<o.lengthThreshold?e({level:u,trace:m,payload:g}):c===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Be("The number of log records reached the threshold.")]})}catch(m){l("rrweb logger error:",m,...n)}finally{p=!1}}}):()=>{}}}var cl="rrweb/console@1",Je=e=>({name:cl,observer:ul,options:e});var pe=Object.freeze({cubenest:Object.freeze({block:"cubenest-block",mask:"cubenest-mask",ignore:"cubenest-ignore",dataAttrs:Object.freeze(["data-cubenest-mask","data-cubenest-block","data-cubenest-ignore"])}),posthog:Object.freeze({block:"ph-no-capture",mask:"ph-mask",ignore:"ph-ignore-input",dataAttrs:Object.freeze(["data-ph-capture-attribute"])}),sentry:Object.freeze({block:"sentry-block",mask:"sentry-mask",ignore:"sentry-ignore",dataAttrs:Object.freeze(["data-sentry-block","data-sentry-mask","data-sentry-ignore"])}),rrweb:Object.freeze({block:"rr-block",mask:"rr-mask",ignore:"rr-ignore",dataAttrs:Object.freeze(["data-rr-block","data-rr-mask","data-rr-ignore"])}),datadog:Object.freeze({block:'data-dd-privacy="hidden"',mask:'data-dd-privacy="mask"',ignore:"data-private",dataAttrs:Object.freeze(["data-private","data-dd-privacy"])})}),zl=Object.freeze([pe.cubenest.block,pe.posthog.block,pe.sentry.block,pe.rrweb.block]),Wl=Object.freeze([pe.cubenest.mask,pe.posthog.mask,pe.sentry.mask,pe.rrweb.mask]);var Kl=1024*1024;var ys=Object.freeze({mousemoveWait:50,sampling:Object.freeze({scroll:100,input:"last"}),inlineImages:!1,collectFonts:!1,recordCanvas:!1,mutationLimit:1e4,mutationSoftWarnAt:750,dataUrlMaxBytes:5242880,singleEventMaxBytes:1048576,checkoutEveryMs:3e4});var Rl=Object.freeze([Object.freeze({url:"posthog.com",category:"developer-tools",status:"good",notes:"Recorded by PostHog themselves in production; canonical baseline for the fork. DOM-only, no canvas, no closed shadow roots in critical paths.",lastVerified:"2026-05-26"}),Object.freeze({url:"github.com",category:"developer-tools",status:"good",notes:"DOM-heavy SPA, no embedded canvas/WebGL; recording captures full session including code-review UIs and PR diff views.",lastVerified:"2026-05-26"}),Object.freeze({url:"cypress.io",category:"developer-tools",status:"good",notes:"Static marketing pages + dashboards; clean capture, no special handling required.",lastVerified:"2026-05-26"}),Object.freeze({url:"vercel.com",category:"developer-tools",status:"good",notes:"Dashboard SPA; Next.js + RSC; clean capture, streaming HTML islands settle predictably.",lastVerified:"2026-05-26"}),Object.freeze({url:"linear.app",category:"spa-framework",status:"good",notes:"Heavy React SPA with high mutation rates; rrweb's mutation guard (10k cap) recommended to bound replay size.",lastVerified:"2026-05-26"}),Object.freeze({url:"figma.com",category:"canvas-webgl",status:"poor",notes:"Canvas-based editor; rrweb sees the parent DOM but not the canvas contents. Use screenshot fallback for the canvas region.",lastVerified:"2026-05-26"}),Object.freeze({url:"youtube.com",category:"video-streaming",status:"caveats",notes:"<video> tags record but media playback is not part of the snapshot; replay shows poster frames + UI mutations only.",lastVerified:"2026-05-26"}),Object.freeze({url:"gmail.com",category:"email-webmail",status:"caveats",notes:"Heavy custom elements + shadow DOM; closed shadow roots in MAIN world are unreachable. ISOLATED-world relay via chrome.dom.openOrClosedShadowRoot (peek path) closes the gap.",lastVerified:"2026-05-26"}),Object.freeze({url:"notion.so",category:"rich-text-editor",status:"caveats",notes:"Slate-based editor with high mutation rates; rely on the mutation guard (10k cap) to avoid runaway recordings.",lastVerified:"2026-05-26"}),Object.freeze({url:"docs.google.com",category:"docs-collaboration",status:"poor",notes:"Custom rendering layer (not real DOM text nodes); rrweb captures empty containers. Use screenshot fallback for content. Selection state not recoverable.",lastVerified:"2026-05-26"})]);var Ml=Object.freeze({initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!0,capturePerformance:!0,performanceEntryTypeToObserve:Object.freeze(["first-input","navigation","paint","resource"]),payloadSizeLimitBytes:1e6,bodyByteLimit:5e3,maxRequestsPerBatch:1e3,payloadHostDenyList:Object.freeze([])});window.rrweb={record:de,getRecordConsolePlugin:Je};})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tracelane/wdio",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "WebdriverIO Service that records rrweb sessions and writes a self-contained HTML report on failed tests. The user-facing tracelane integration for WDIO.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tracelane/core": "0.1.0-alpha.
|
|
26
|
-
"@tracelane/report": "0.1.0-alpha.
|
|
25
|
+
"@tracelane/core": "0.1.0-alpha.5",
|
|
26
|
+
"@tracelane/report": "0.1.0-alpha.6"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@wdio/types": "^9.0.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"esbuild": "^0.28.0",
|
|
40
40
|
"tsx": "^4.19.0",
|
|
41
41
|
"webdriverio": "^9.0.0",
|
|
42
|
-
"@cubenest/rrweb-core": "0.1.0-alpha.
|
|
42
|
+
"@cubenest/rrweb-core": "0.1.0-alpha.2"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public",
|