blocfeed 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/chunk-E3YSP5LQ.cjs +884 -0
- package/dist/chunk-GJW5E4AF.js +884 -0
- package/dist/{controller-C5mxpGk4.d.cts → controller-BPGXlZKD.d.cts} +12 -1
- package/dist/{controller-C5mxpGk4.d.ts → controller-BPGXlZKD.d.ts} +12 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.d.cts +10 -3
- package/dist/main.d.ts +10 -3
- package/dist/main.js +1 -1
- package/dist/passive.cjs +1 -0
- package/dist/passive.d.cts +62 -0
- package/dist/passive.d.ts +62 -0
- package/dist/passive.js +1 -0
- package/dist/script.js +70 -0
- package/package.json +9 -1
- package/dist/chunk-XVMFV46F.js +0 -884
- package/dist/chunk-ZQDABCPT.cjs +0 -884
package/dist/script.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var BlocFeedScript=(function(exports){'use strict';var Pa={enabled:true,sampling:1,ignoreSelectors:["[data-blocfeed-ui]","[data-blocfeed-ignore]"],rageClick:{enabled:true,threshold:3,windowMs:1e3,streakIdleMs:1500},httpFail:{enabled:true,statusCodes:[400,401,403,404,408,409,422,429,500,502,503,504],ignoreUrls:["/api/behavioral-events","/api/feedback"],treatJsonErrorAsFail:false},redirectLoop:{enabled:true,threshold:3,windowMs:2e3},formDataLoss:{enabled:true},deadClick:{enabled:true,observationWindowMs:300,rateLimitPerSelector:5}};function bn(s){var t,r,n,i,o,l,a,c;let e=Pa;return {enabled:(t=s==null?void 0:s.enabled)!=null?t:e.enabled,sampling:(r=s==null?void 0:s.sampling)!=null?r:e.sampling,ignoreSelectors:(n=s==null?void 0:s.ignoreSelectors)!=null?n:e.ignoreSelectors,rageClick:{...e.rageClick,...(i=s==null?void 0:s.rageClick)!=null?i:{}},httpFail:{...e.httpFail,...(o=s==null?void 0:s.httpFail)!=null?o:{}},redirectLoop:{...e.redirectLoop,...(l=s==null?void 0:s.redirectLoop)!=null?l:{}},formDataLoss:{...e.formDataLoss,...(a=s==null?void 0:s.formDataLoss)!=null?a:{}},deadClick:{...e.deadClick,...(c=s==null?void 0:s.deadClick)!=null?c:{}}}}function wn(s){let e=[];async function t(){if(e.length===0)return;let n=e.splice(0,50);try{await fetch(s.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-blocfeed-id":s.blocfeedId},body:JSON.stringify({events:n}),keepalive:!0});}catch(i){}}function r(){if(e.length===0)return;if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function"){t();return}let n=e.splice(0,50),i=new Blob([JSON.stringify({events:n})],{type:"application/json"}),o=`${s.endpoint}?_bfid=${encodeURIComponent(s.blocfeedId)}`;try{navigator.sendBeacon(o,i);}catch(l){}}return {enqueue(n){e.push(n);},flush:t,flushBeacon:r,size(){return e.length}}}function vn(s){let e=globalThis.CSS;return typeof(e==null?void 0:e.escape)=="function"?e.escape(s):s.replace(/[^a-zA-Z0-9_-]/g,t=>{let r=t.codePointAt(0);return r===void 0?"":`\\${r.toString(16)} `})}function $a(s){return s.replace(/\s+/g," ").trim()}function Ae(s,e=140){let t=s.textContent;if(!t)return;let r=$a(t);if(r)return r.length<=e?r:`${r.slice(0,e-1)}\u2026`}function Fa(s){let e=1;for(let t=s.previousElementSibling;t;t=t.previousElementSibling)t.tagName===s.tagName&&(e+=1);return e}var Sn=["data-testid","data-test-id","data-test","data-qa","data-cy"],Pr="data-blocfeed-component";function je(s){let e=s.closest(`[${Pr}]`);if(!e)return;let t=e.getAttribute(Pr),r=t==null?void 0:t.trim();return r||void 0}function Te(s,e=5){let t=[],r=s,n=0;for(;r&&n<e*4;){let i=je(r);if(i&&t[t.length-1]!==i&&(t.push(i),t.length>=e))break;r=r.parentElement,n++;}return t}function _e(s,e=4){let t=s,r=0;for(;t&&r<e;){let n=t.getAttribute(Pr),i=n==null?void 0:n.trim();if(i)return `bf:component:${i}`;for(let a of Sn){let c=t.getAttribute(a),u=c==null?void 0:c.trim();if(u)return `bf:testid:${u}`}let o=t.getAttribute("id"),l=o==null?void 0:o.trim();if(l&&!/^\d/.test(l))return `bf:id:${l}`;t=t.parentElement,r+=1;}return null}function Ba(s){let e=s.tagName.toLowerCase(),t=s.getAttribute("id");if(t)return `#${vn(t)}`;for(let r of Sn){let n=s.getAttribute(r);if(n)return `${e}[${r}="${vn(n)}"]`}return `${e}:nth-of-type(${Fa(s)})`}function Oe(s,e=10){let t=[],r=s;for(;r&&t.length<e;){let n=Ba(r);if(t.unshift(n),n.startsWith("#"))break;r=r.parentElement;}return t.join(" > ")}var Ua=new Set(["button","link","tab","menuitem"]);function Cn(s){var t;if(s.tagName==="BUTTON")return s.disabled?null:"button";if(s.tagName==="A"||s.tagName==="a"){let r=(t=s.getAttribute("href"))==null?void 0:t.trim();return !r||r==="#"||r.toLowerCase().startsWith("javascript:")?null:"link"}let e=s.getAttribute("role");if(e&&Ua.has(e))return "role";try{if(window.getComputedStyle(s).cursor==="pointer")return "cursor_pointer"}catch(r){}return null}function bt(s,e){if(e.length===0)return false;for(let t of e)try{if(s.matches(t)||s.closest(t))return !0}catch(r){}return false}var En="bf_behavioral_session",wt=null;function X(){try{let s=sessionStorage.getItem(En);if(s)return s;let e=In();return sessionStorage.setItem(En,e),e}catch(s){return wt||(wt=In(),wt)}}function In(){let s=Math.random().toString(36).slice(2,10).padEnd(8,"0");return `bf_${Date.now()}_${s}`}function vt(s){let e=0;for(let t=0;t<s.length;t++)e=e*31+s.charCodeAt(t)|0;return Math.abs(e)}function xn(s,e){if(!s.rageClick.enabled)return ()=>{};let{threshold:t,windowMs:r,streakIdleMs:n}=s.rageClick,i=new Map;function o(f){var b,S;let d=f.target,g=d?Wa(d):false,m=d&&(b=Ae(d,200))!=null?b:null,p=d?d.tagName.toLowerCase():"",h=d&&d.id||null,y=d&&(S=je(d))!=null?S:null,v=d?Te(d,5):[];return {session_id:X(),event_type:"rage_click",page_url:typeof window=="undefined"?"":window.location.href,selector:f.selector,element_text:m,event_data:{click_count:f.timestamps.length,window_ms:r,final:true,...g?{disabled:true}:{},tag_name:p,...h?{element_id:h}:{},...y?{component_name:y}:{},...v.length>0?{parent_components:v}:{}},created_at:new Date().toISOString(),stable_key:f.stableKey}}function l(f){let d=i.get(f);d&&(d.idleTimer&&(clearTimeout(d.idleTimer),d.idleTimer=null),d.reached&&e(o(d)),i.delete(f));}function a(f){let d=i.get(f);d&&(d.idleTimer&&clearTimeout(d.idleTimer),d.idleTimer=setTimeout(()=>{l(f);},n));}function c(f){try{let d=f.target;if(!d||!(d instanceof Element)||bt(d,s.ignoreSelectors))return;let g=Oe(d,4);if(!g)return;let m=_e(d),p=m!=null?m:g,h=Date.now(),y=i.get(p);y?(y.target=d,y.selector=g):(y={selector:g,stableKey:m,timestamps:[],reached:!1,idleTimer:null,target:d},i.set(p,y)),y.reached||(y.timestamps=y.timestamps.filter(v=>h-v<=r)),y.timestamps.push(h),a(p),!y.reached&&y.timestamps.length>=t&&(y.reached=!0);}catch(d){}}function u(){for(let f of Array.from(i.keys()))l(f);}return document.addEventListener("click",c,{capture:true,passive:true}),typeof window!="undefined"&&window.addEventListener("pagehide",u),()=>{document.removeEventListener("click",c,{capture:true}),typeof window!="undefined"&&window.removeEventListener("pagehide",u);for(let f of i.values())f.idleTimer&&clearTimeout(f.idleTimer);i.clear();}}function Wa(s){if(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true")return true;try{if(window.getComputedStyle(s).pointerEvents==="none")return !0}catch(e){}return false}var Mn=0,Nn=null,Ct=null,Et=[],za=1500;function Ha(){function s(e){var t;try{let r=e.target;if(!r)return;let n=r.closest('button[type="submit"], input[type="submit"], [data-blocfeed-submit]');if(!n)return;Mn=Date.now();let i=n.closest("form");Nn=(i?Oe(i,3):"")||null,Ct=(t=Ae(n,100))!=null?t:null,Et=Te(n,5);}catch(r){}}return document.addEventListener("click",s,{capture:true,passive:true}),()=>document.removeEventListener("click",s,{capture:true})}function Rn(s,e){if(!s.httpFail.enabled)return ()=>{};let{statusCodes:t,ignoreUrls:r,treatJsonErrorAsFail:n}=s.httpFail,i=new Set(t),o=Ha(),l=globalThis.fetch,a=async(d,g)=>{var y,v,b;let m=typeof d=="string"?d:d instanceof URL?d.toString():d.url,p=((v=(y=g==null?void 0:g.method)!=null?y:d.method)!=null?v:"GET").toUpperCase(),h;try{h=await l.call(globalThis,d,g);}catch(S){try{if(!St(m,r)){let E=S&&typeof S=="object"&&S.name==="AbortError"?"abort":"network";e(f(0,m,p,E));}}catch(E){}throw S}try{if(!St(m,r)&&i.has(h.status))e(f(h.status,m,p));else if(n&&!St(m,r)&&h.status>=200&&h.status<300){let S=(b=h.headers.get("content-type"))!=null?b:"";(S.includes("application/json")||S.includes("+json"))&&h.clone().json().then(E=>{if(Va(E))try{e(f(h.status,m,p,"json_error"));}catch(I){}}).catch(()=>{});}}catch(S){}return h};globalThis.fetch=a;let c=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.open=function(d,g,...m){return this.__bf_url=g,this.__bf_method=d.toUpperCase(),c.call(this,d,g,...m)},XMLHttpRequest.prototype.send=function(d){let g=()=>{var m,p;try{let h=(m=this.__bf_url)!=null?m:"",y=(p=this.__bf_method)!=null?p:"GET";!St(h,r)&&i.has(this.status)&&e(f(this.status,h,y));}catch(h){}};return this.__bf_handler=g,this.addEventListener("loadend",g),u.call(this,d!=null?d:null)},()=>{globalThis.fetch=l,XMLHttpRequest.prototype.open=c,XMLHttpRequest.prototype.send=u,o(),Ct=null,Et=[];};function f(d,g,m,p){let y=Date.now()-Mn<za;return {session_id:X(),event_type:"error",page_url:typeof window=="undefined"?"":window.location.href,selector:null,element_text:null,event_data:{http_status:d,request_url:g,method:m,...p?{error_kind:p}:{},form_selector:y?Nn:null,...y&&Ct?{button_text:Ct}:{},...y&&Et.length>0?{parent_components:Et}:{}},created_at:new Date().toISOString(),stable_key:null}}}function Va(s){if(!s||typeof s!="object")return false;let e=s;return e.ok===false||e.success===false||"error"in e&&e.error!=null&&e.error!==false}function St(s,e){if(e.length===0)return false;for(let t of e)if(s.includes(t))return true;return false}var Ga=3e4;function An(s,e){if(!s.redirectLoop.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{threshold:t,windowMs:r}=s.redirectLoop,n=new Map,i=new Map,o=history.pushState,l=history.replaceState;function a(u){var f,d;try{let g=Date.now(),m=(f=i.get(u))!=null?f:0;if(g<m)return;let h=((d=n.get(u))!=null?d:[]).filter(y=>g-y<=r);if(h.push(g),n.set(u,h),h.length>=t){let y={session_id:X(),event_type:"thrashing",page_url:window.location.href,selector:null,element_text:null,event_data:{count:h.length,url:u,window_ms:r},created_at:new Date().toISOString(),stable_key:null};e(y),i.set(u,g+Ga),n.set(u,[]);}}catch(g){}}function c(){let u=window.location.pathname+window.location.search;a(u);}return history.pushState=function(...u){let f=o.apply(this,u);return c(),f},history.replaceState=function(...u){let f=l.apply(this,u);return c(),f},window.addEventListener("popstate",c),()=>{history.pushState=o,history.replaceState=l,window.removeEventListener("popstate",c);}}var ja=6e4;function Tn(s,e){if(!s.formDataLoss.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let t=new Set,r=new Map,n=new Map,i=new Map;function o(p){let h=p.closest("form");return h?h.id?`#${h.id}`:"form":null}function l(){let p=0;for(let h of r.values())p+=h;return p}function a(p){t.delete(p),r.delete(p),i.delete(p);}function c(p){var h;try{let y=p.target;if(!y||!(y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||y instanceof HTMLSelectElement))return;let v=o(y);if(!v)return;t.add(v),r.set(v,((h=r.get(v))!=null?h:0)+1);let b=y.closest("form");b&&i.set(v,b);}catch(y){}}function u(p){try{let h=p.target;if(!h||!(h instanceof HTMLFormElement))return;let y=h.id?`#${h.id}`:"form";n.set(y,Date.now()),a(y);}catch(h){}}function f(p){try{let h=p.target;if(!h||!(h instanceof HTMLFormElement))return;let y=h.id?`#${h.id}`:"form";a(y);}catch(h){}}function d(p){var E,I;if(t.size===0)return;let h=Array.from(t),y=(E=h[0])!=null?E:null,v=y&&(I=i.get(y))!=null?I:null,b=v?_e(v):null,S={session_id:X(),event_type:"form_abandonment",page_url:window.location.href,selector:y,element_text:null,event_data:{cause:p,field_count:l(),forms:h},created_at:new Date().toISOString(),stable_key:b};e(S);}function g(p){if(!p.persisted||t.size===0)return;let h=Date.now();for(let[,y]of n)if(h-y<ja)return;d("bfcache_restore");}function m(){d("beforeunload_after_edit");}return document.addEventListener("input",c,{capture:true,passive:true}),document.addEventListener("submit",u,{capture:true}),document.addEventListener("reset",f,{capture:true}),window.addEventListener("pageshow",g),window.addEventListener("beforeunload",m),()=>{document.removeEventListener("input",c,{capture:true}),document.removeEventListener("submit",u,{capture:true}),document.removeEventListener("reset",f,{capture:true}),window.removeEventListener("pageshow",g),window.removeEventListener("beforeunload",m);}}function Ya(){let s={urlChangeCount:0,networkCount:0,filePickerCount:0,uninstall:()=>{}},e=history.pushState,t=history.replaceState;history.pushState=function(...l){return s.urlChangeCount+=1,e.apply(this,l)},history.replaceState=function(...l){return s.urlChangeCount+=1,t.apply(this,l)};let r=()=>{s.urlChangeCount+=1;};window.addEventListener("popstate",r);let n=globalThis.fetch;if(n){let l=(a,c)=>(s.networkCount+=1,n.call(globalThis,a,c));globalThis.fetch=l;}let i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(l,a,...c){return s.networkCount+=1,i.call(this,l,a,...c)};let o=HTMLInputElement.prototype.click;return HTMLInputElement.prototype.click=function(){return this.type==="file"&&(s.filePickerCount+=1),o.call(this)},s.uninstall=()=>{history.pushState=e,history.replaceState=t,window.removeEventListener("popstate",r),n&&(globalThis.fetch=n),XMLHttpRequest.prototype.open=i,HTMLInputElement.prototype.click=o;},s}function _n(s,e){if(!s.deadClick.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{observationWindowMs:t,rateLimitPerSelector:r}=s.deadClick,n=new Map,i=Ya();function o(l){var a,c;try{let u=l.target;if(!u||!(u instanceof Element)||l.button!==0||l.metaKey||l.ctrlKey||l.altKey||l.shiftKey||bt(u,s.ignoreSelectors)||u.closest("label"))return;if(u instanceof HTMLInputElement){let D=u.type;if(D==="checkbox"||D==="radio"||D==="file")return}if(u instanceof HTMLSelectElement||u.closest("a[target='_blank'], a[download]")||u.closest('[contenteditable="true"]'))return;try{let D=window.getSelection();if(D&&D.toString().length>0)return}catch(D){}let f=Cn(u);if(!f)return;let d=Oe(u,4);if(!d)return;let g=_e(u),m=g!=null?g:d,p=i.urlChangeCount,h=i.networkCount,y=i.filePickerCount,v=new Date().toISOString(),b=(a=Ae(u,200))!=null?a:null,S=u.tagName.toLowerCase(),E=u.id||null,I=(c=je(u))!=null?c:null,P=Te(u,5),A=Xa(u),$=0,F=null;if(A){F=new MutationObserver(()=>{$+=1;});try{F.observe(A,{childList:!0,attributes:!0,characterData:!0,subtree:!0});}catch(D){F=null;}}setTimeout(()=>{var C;if(F)try{F.disconnect();}catch(ee){}if($>0||i.urlChangeCount!==p||i.networkCount!==h||i.filePickerCount!==y)return;let D=(C=n.get(m))!=null?C:0;if(D>=r)return;n.set(m,D+1);let J={session_id:X(),event_type:"dead_click",page_url:typeof window=="undefined"?"":window.location.href,selector:d,element_text:b,event_data:{tag_name:S,...E?{element_id:E}:{},...I?{component_name:I}:{},...P.length>0?{parent_components:P}:{},clickable_reason:f},created_at:v,stable_key:g};e(J);},t);}catch(u){}}return document.addEventListener("click",o,{capture:true,passive:true}),()=>{document.removeEventListener("click",o,{capture:true}),i.uninstall();}}function Xa(s){let e=s.closest('button, a, form, [role="button"]');return e||s.parentElement}var Za=Object.defineProperty,Ja=(s,e,t)=>e in s?Za(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,w=(s,e,t)=>Ja(s,typeof e!="symbol"?e+"":e,t),On,Ka=Object.defineProperty,qa=(s,e,t)=>e in s?Ka(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,kn=(s,e,t)=>qa(s,typeof e!="symbol"?e+"":e,t),Y=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Y||{}),Dn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},It={},Qa=()=>!!globalThis.Zone;function Us(s){if(It[s])return It[s];let e=globalThis[s],t=e.prototype,r=s in Dn?Dn[s]:void 0,n=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=s in Ln?Ln[s]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(n&&o&&!Qa())return It[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?It[s]=c:t}catch(l){return t}}var $r={};function ge(s,e,t){var r;let n=`${s}.${String(t)}`;if($r[n])return $r[n].call(e);let i=Us(s),o=(r=Object.getOwnPropertyDescriptor(i,t))==null?void 0:r.get;return o?($r[n]=o,o.call(e)):e[t]}var Fr={};function Ti(s,e,t){let r=`${s}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);let i=Us(s)[t];return typeof i!="function"?e[t]:(Fr[r]=i,i.bind(e))}function el(s){return ge("Node",s,"ownerDocument")}function tl(s){return ge("Node",s,"childNodes")}function rl(s){return ge("Node",s,"parentNode")}function sl(s){return ge("Node",s,"parentElement")}function nl(s){return ge("Node",s,"textContent")}function il(s,e){return Ti("Node",s,"contains")(e)}function ol(s){return Ti("Node",s,"getRootNode")()}function al(s){return !s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function ll(s){return s.styleSheets}function cl(s){return !s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function ul(s,e){return ge("Element",s,"querySelector")(e)}function fl(s,e){return ge("Element",s,"querySelectorAll")(e)}function hl(){return Us("MutationObserver").constructor}function dl(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],n=t(r);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=n,()=>{s[e]=r;}}catch(r){return ()=>{}}}var Z={ownerDocument:el,childNodes:tl,parentNode:rl,parentElement:sl,textContent:nl,contains:il,getRootNode:ol,host:al,styleSheets:ll,shadowRoot:cl,querySelector:ul,querySelectorAll:fl,mutationObserver:hl,patch:dl};function _i(s){return s.nodeType===s.ELEMENT_NODE}function qe(s){let e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return !!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Qe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function pl(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ml(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Kr(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,n=>Oi(n,t)).join("");return pl(r)}catch(e){return null}}function Oi(s,e){if(yl(s)){let t;try{t=Kr(s.styleSheet)||ml(s);}catch(r){t=s.cssText;}return s.styleSheet.href?rr(t,s.styleSheet.href):t}else {let t=s.cssText;return bl(s)&&s.selectorText.includes(":")&&(t=gl(t)),e?rr(t,e):t}}function gl(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function yl(s){return "styleSheet"in s}function bl(s){return "selectorText"in s}var Qt=class{constructor(){kn(this,"idNodeMap",new Map),kn(this,"nodeMetaMap",new WeakMap);}getId(e){var t;if(!e)return -1;let r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t);}replace(e,t){let r=this.getNode(e);if(r){let n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function wl(){return new Qt}function er({element:s,maskInputOptions:e,tagName:t,type:r,value:n,maskInputFn:i}){let o=n||"",l=r&&xe(r);return (e[t.toLowerCase()]||l&&e[l])&&(i?o=i(o,s):o="*".repeat(o.length)),o}function xe(s){return s.toLowerCase()}var Pn="__rrweb_original__";function vl(s){let e=s.getContext("2d");if(!e)return true;let t=50;for(let r=0;r<s.width;r+=t)for(let n=0;n<s.height;n+=t){let i=e.getImageData,o=Pn in i?i[Pn]:i;if(new Uint32Array(o.call(e,r,n,Math.min(t,s.width-r),Math.min(t,s.height-n)).data.buffer).some(a=>a!==0))return false}return true}function tr(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function ki(s,e){var i;let t;try{t=new URL(s,e!=null?e:window.location.href);}catch(o){return null}let r=/\.([0-9a-z]+)(?:$)/i,n=t.pathname.match(r);return (i=n==null?void 0:n[1])!=null?i:null}function Sl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var Cl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,El=/^(?:[a-z+]+:)?\/\//i,Il=/^www\..*/i,xl=/^(data:)([^,]*),(.*)/i;function rr(s,e){return (s||"").replace(Cl,(t,r,n,i,o,l)=>{let a=n||o||l,c=r||i||"";if(!a)return t;if(El.test(a)||Il.test(a))return `url(${c}${a}${c})`;if(xl.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${Sl(e)+a}${c})`;let u=e.split("/"),f=a.split("/");u.pop();for(let d of f)d!=="."&&(d===".."?u.pop():u.push(d));return `url(${c}${u.join("/")}${c})`})}function xt(s,e=false){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ml(s,e,t=false){let r=Array.from(e.childNodes),n=[],i=0;if(r.length>1&&s&&typeof s=="string"){let o=xt(s,t),l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){let c=xt(r[a].textContent,t),u=100,f=3;for(;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){let d=c.substring(0,f),g=o.split(d),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")m=o.indexOf(d,1);else if(g.length===1){if(d=d.substring(0,d.length-1),g=o.split(d),g.length<=1)return n.push(s),n;f=u+1;}else f===c.length-1&&(m=o.indexOf(d));if(g.length>=2&&f>u){let p=r[a-1].textContent;if(p&&typeof p=="string"){let h=xt(p).length;m=o.indexOf(d,h);}m===-1&&(m=g[0].length);}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<s.length;){if(i+=1,i>50*r.length)return n.push(s),n;let h=xt(s.substring(0,p),t);if(h.length===m){n.push(s.substring(0,p)),s=s.substring(p),o=o.substring(m);break}else h.length<m?p+=Math.max(1,Math.floor((m-h.length)/l)):p-=Math.max(1,Math.floor((h.length-m)*l));}break}}}}return n.push(s),n}function Nl(s,e){return Ml(s,e).join("/* rr_split */")}var Rl=1,Al=new RegExp("[^a-z0-9-_:]"),tt=-2;function Di(){return Rl++}function Tl(s){if(s instanceof HTMLFormElement)return "form";let e=xe(s.tagName);return Al.test(e)?"div":e}var ke,$n,_l=/^[^ \t\n\r\u000c]+/,Ol=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(i){let o,l=i.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let n=[];for(;r(Ol),!(t>=e.length);){let i=r(_l);if(i.slice(-1)===",")i=Pe(s,i.substring(0,i.length-1)),n.push(i);else {let o="";i=Pe(s,i);let l=false;for(;;){let a=e.charAt(t);if(a===""){n.push((i+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,n.push((i+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return n.join(", ")}var Fn=new WeakMap;function Pe(s,e){return !e||e.trim()===""?e:Ws(s,e)}function Dl(s){return !!(s.tagName==="svg"||s.ownerSVGElement)}function Ws(s,e){let t=Fn.get(s);if(t||(t=s.createElement("a"),Fn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Li(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Pe(s,r):t==="srcset"?kl(s,r):t==="style"?rr(r,Ws(s)):e==="object"&&t==="data"?Pe(s,r):r)}function Pi(s,e,t){return ["video","audio"].includes(s)&&e==="autoplay"}function Ll(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return !0}else for(let r=s.classList.length;r--;){let n=s.classList[r];if(e.test(n))return !0}if(t)return s.matches(t)}catch(r){}return false}function sr(s,e,t){if(!s)return false;if(s.nodeType!==s.ELEMENT_NODE)return t?sr(Z.parentNode(s),e,t):false;for(let r=s.classList.length;r--;){let n=s.classList[r];if(e.test(n))return true}return t?sr(Z.parentNode(s),e,t):false}function $i(s,e,t,r){let n;if(_i(s)){if(n=s,!Z.childNodes(n).length)return false}else {if(Z.parentElement(s)===null)return false;n=Z.parentElement(s);}try{if(typeof e=="string"){if(r){if(n.closest(`.${e}`))return !0}else if(n.classList.contains(e))return !0}else if(sr(n,e,r))return !0;if(t){if(r){if(n.closest(t))return !0}else if(n.matches(t))return !0}}catch(i){}return false}function Pl(s,e,t){let r=s.contentWindow;if(!r)return;let n=false,i;try{i=r.document.readyState;}catch(l){return}if(i!=="complete"){let l=setTimeout(()=>{n||(e(),n=true);},t);s.addEventListener("load",()=>{clearTimeout(l),n=true,e();});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e);}function $l(s,e,t){let r=false,n;try{n=s.sheet;}catch(o){return}if(n)return;let i=setTimeout(()=>{r||(e(),r=true);},t);s.addEventListener("load",()=>{clearTimeout(i),r=true,e();});}function Fl(s,e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=false,cssCaptured:h=false}=e,y=Bl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return {type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Wl(s,{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:d,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case s.TEXT_NODE:return Ul(s,{doc:t,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:h});case s.CDATA_SECTION_NODE:return {type:Y.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return {type:Y.Comment,textContent:Z.textContent(s)||"",rootId:y};default:return false}}function Bl(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Ul(s,e){let{needsMask:t,maskTextFn:r,rootId:n,cssCaptured:i}=e,o=Z.parentNode(s),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":i||(a=Z.textContent(s),c&&a&&(a=rr(a,Ws(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:n}}function Wl(s,e){let{doc:t,blockClass:r,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:d=false,rootId:g}=e,m=Ll(s,r,n),p=Tl(s),h={},y=s.attributes.length;for(let b=0;b<y;b++){let S=s.attributes[b];Pi(p,S.name,S.value)||(h[S.name]=Li(t,p,xe(S.name),S.value));}if(p==="link"&&i){let b=Array.from(t.styleSheets).find(E=>E.href===s.href),S=null;b&&(S=Kr(b)),S&&(delete h.rel,delete h.href,h._cssText=S);}if(p==="style"&&s.sheet){let b=Kr(s.sheet);b&&(s.childNodes.length>1&&(b=Nl(b,s)),h._cssText=b);}if(["input","textarea","select"].includes(p)){let b=s.value,S=s.checked;h.type!=="radio"&&h.type!=="checkbox"&&h.type!=="submit"&&h.type!=="button"&&b?h.value=er({element:s,type:tr(s),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):S&&(h.checked=S);}if(p==="option"&&(s.selected&&!o.select?h.selected=true:delete h.selected),p==="dialog"&&s.open&&(h.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){if(s.__context==="2d")vl(s)||(h.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let b=s.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;let E=S.toDataURL(a.type,a.quality);b!==E&&(h.rr_dataURL=b);}}if(p==="img"&&c){ke||(ke=t.createElement("canvas"),$n=ke.getContext("2d"));let b=s,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,I=()=>{b.removeEventListener("load",I);try{ke.width=b.naturalWidth,ke.height=b.naturalHeight,$n.drawImage(b,0,0),h.rr_dataURL=ke.toDataURL(a.type,a.quality);}catch(P){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${S}! Error: ${P}`);}b.crossOrigin==="anonymous"&&(E?h.crossOrigin=E:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);}if(["audio","video"].includes(p)){let b=h;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume;}if(d||(s.scrollLeft&&(h.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(h.rr_scrollTop=s.scrollTop)),m){let{width:b,height:S}=s.getBoundingClientRect();h={class:h.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(h.src)&&(s.contentDocument||(h.rr_src=h.src),delete h.src);let v;try{customElements.get(p)&&(v=!0);}catch(b){}return {type:Y.Element,tagName:p,attributes:h,childNodes:[],isSVG:Dl(s)||void 0,needBlock:m,rootId:g,isCustom:v}}function L(s){return s==null?"":s.toLowerCase()}function Fi(s){return s===true||s==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function zl(s,e){if(e.comment&&s.type===Y.Comment)return true;if(s.type===Y.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&ki(s.attributes.href)==="js"))return true;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return true;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function $e(s,e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:c=true,maskInputOptions:u={},maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=false,recordCanvas:h=false,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:I=()=>false,newlyAddedElement:P=false,cssCaptured:A=false}=e,{needsMask:$}=e,{preserveWhiteSpace:F=true}=e;$||($=$i(s,o,l,$===void 0));let D=Fl(s,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:h,keepIframeSrcFn:I,newlyAddedElement:P,cssCaptured:A});if(!D)return console.warn(s,"not serialized"),null;let J;r.hasNode(s)?J=r.getId(s):zl(D,g)||!F&&D.type===Y.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?J=tt:J=Di();let C=Object.assign(D,{id:J});if(r.add(s,C),J===tt)return null;y&&y(s);let ee=!a;if(C.type===Y.Element){ee=ee&&!C.needBlock,delete C.needBlock;let j=Z.shadowRoot(s);j&&Qe(j)&&(C.isShadowHost=true);}if((C.type===Y.Document||C.type===Y.Element)&&ee){g.headWhitespace&&C.type===Y.Element&&C.tagName==="head"&&(F=false);let j={doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I,cssCaptured:false};if(!(C.type===Y.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===Y.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(j.cssCaptured=true);for(let Se of Array.from(Z.childNodes(s))){let ce=$e(Se,j);ce&&C.childNodes.push(ce);}}let re=null;if(_i(s)&&(re=Z.shadowRoot(s)))for(let Se of Array.from(Z.childNodes(re))){let ce=$e(Se,j);ce&&(Qe(re)&&(ce.isShadow=true),C.childNodes.push(ce));}}let ve=Z.parentNode(s);return ve&&qe(ve)&&Qe(ve)&&(C.isShadow=true),C.type===Y.Element&&C.tagName==="iframe"&&Pl(s,()=>{let j=s.contentDocument;if(j&&v){let re=$e(j,{doc:j,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});re&&v(s,re);}},b),C.type===Y.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&ki(C.attributes.href)==="css")&&$l(s,()=>{if(S){let j=$e(s,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});j&&S(s,j);}},E),C}function Hl(s,e){let{mirror:t=new Qt,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:c=false,maskAllInputs:u=false,maskTextFn:f,maskInputFn:d,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>false}=e||{},I=u===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u===false?{password:true}:u,P=Fi(g);return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:P,dataURLOptions:m,inlineImages:a,recordCanvas:c,preserveWhiteSpace:p,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:false})}function Gl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function jl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(s).forEach(function(r){var n=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return s[r]}});}),t}var zs={exports:{}},B=String,Bi=function(){return {isColorSupported:false,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};zs.exports=Bi();zs.exports.createColors=Bi;var Yl=zs.exports,Xl={},Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ae=jl(Zl),Bn=Yl,Un=ae,qr=class Ui extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ui);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=Bn.isColorSupported),Un&&e&&(t=Un(t));let r=t.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=Bn.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return r.slice(n,i).map((c,u)=>{let f=n+1+u,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+c+`
|
|
2
|
+
`+g+l("^")}return " "+a(d)+c}).join(`
|
|
3
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
|
+
|
|
5
|
+
`+e+`
|
|
6
|
+
`),this.name+": "+this.message+e}},Hs=qr;qr.default=qr;var ft={};ft.isClean=Symbol("isClean");ft.my=Symbol("my");var Wn={after:`
|
|
7
|
+
`,beforeClose:`
|
|
8
|
+
`,beforeComment:`
|
|
9
|
+
`,beforeDecl:`
|
|
10
|
+
`,beforeOpen:" ",beforeRule:`
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Jl(s){return s[0].toUpperCase()+s.slice(1)}var Qr=class{constructor(e){this.builder=e;}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else {let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e);}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
|
12
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o;}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r);}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e);}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e);}document(e){this.body(e);}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return Wn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Jl(r);this[l]?n=this[l](o,e):o.walk(a=>{if(n=a.raws[t],typeof n!="undefined")return false});}return typeof n=="undefined"&&(n=Wn[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
13
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
|
|
14
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
|
|
15
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
16
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before!="undefined"){let i=r.raws.before.split(`
|
|
17
|
+
`);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after);}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end");}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t);}},Wi=Qr;Qr.default=Qr;var Kl=Wi;function es(s,e){new Kl(e).stringify(s);}var gr=es;es.default=es;var{isClean:Mt,my:ql}=ft,Ql=Hs,ec=Wi,tc=gr;function ts(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let n=s[r],i=typeof n;r==="parent"&&i==="object"?e&&(t[r]=e):r==="source"?t[r]=n:Array.isArray(n)?t[r]=n.map(o=>ts(o,t)):(i==="object"&&n!==null&&(n=ts(n)),t[r]=n);}return t}var rs=class{constructor(e={}){this.raws={},this[Mt]=false,this[ql]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r);}else this[t]=e[t];}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`);}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between;}clone(e={}){let t=ts(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Ql(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Mt]){this[Mt]=false;let e=this;for(;e=e.parent;)e[Mt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let n=t.indexOf(e.word);n!==-1&&(r=this.positionInside(n,t));}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
+
`?(n=1,i+=1):n+=1;return {column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);i!==-1&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return (r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new ec().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=false;for(let n of e)n===this?r=true:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},n=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),r[o]={end:l.end,inputId:a,start:l.start};}else r[o]=l;}return n&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=tc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(t,n)}get proxyOf(){return this}},yr=rs;rs.default=rs;var rc=yr,ss=class extends rc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},br=ss;ss.default=ss;var sc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ic=(s=21)=>{let e="",t=s;for(;t--;)e+=sc[Math.random()*64|0];return e},oc={nanoid:ic},{SourceMapConsumer:zn,SourceMapGenerator:Hn}=ae,{existsSync:ac,readFileSync:lc}=ae,{dirname:Br,join:cc}=ae;function uc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var ns=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Br(this.mapFile)),n&&(this.text=n);}consumer(){return this.consumerCache||(this.consumerCache=new zn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return uc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)));}loadFile(e){if(this.root=Br(e),ac(e))return this.mapFile=e,lc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else {if(t instanceof zn)return Hn.fromSourceMap(t).toString();if(t instanceof Hn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=cc(Br(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},zi=ns;ns.default=ns;var{SourceMapConsumer:fc,SourceMapGenerator:hc}=ae,{fileURLToPath:Vn,pathToFileURL:Nt}=ae,{isAbsolute:is,resolve:os}=ae,{nanoid:dc}=oc,Ur=ae,Gn=Hs,pc=zi,Wr=Symbol("fromOffsetCache"),mc=!!(fc&&hc),jn=!!(os&&is),nr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!jn||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=os(t.from)),jn&&mc){let r=new pc(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n));}}this.file||(this.id="<input css "+dc(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,n={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?i=new Gn(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):i=new Gn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Nt&&(i.input.url=Nt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[Wr])r=this[Wr];else {let i=this.css.split(`
|
|
19
|
+
`);r=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)r[l]=o,o+=i[l].length+1;this[Wr]=r;}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else {let i=r.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<r[o])i=o-1;else if(e>=r[o+1])n=o+1;else {n=o;break}}return {col:e-r[n]+1,line:n+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:os(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=i.originalPositionFor({column:n,line:r}));let a;is(o.source)?a=Nt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Nt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vn)c.file=Vn(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},wr=nr;nr.default=nr;Ur&&Ur.registerInput&&Ur.registerInput(nr);var{SourceMapConsumer:Hi,SourceMapGenerator:Yt}=ae,{dirname:Xt,relative:Vi,resolve:Gi,sep:ji}=ae,{pathToFileURL:Yn}=ae,gc=wr,yc=!!(Hi&&Yt),bc=!!(Xt&&Gi&&Vi&&ji),wc=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
20
|
+
`;this.css.includes(`\r
|
|
21
|
+
`)&&(t=`\r
|
|
22
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Xt(e.file),n;this.mapOpts.sourcesContent===false?(n=new Hi(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),bc&&yc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Yt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Yt({file:this.outputFile(),ignoreInvalidMapping:true}),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 Yt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(n.generated.line=e,n.generated.column=t-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
|
|
23
|
+
`),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(Gi(r,this.mapOpts.annotation)));let n=Vi(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t);}});else {let e=new gc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map);}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=true;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css);}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css);}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Yn){let r=Yn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ji==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Yi=wc,vc=yr,as=class extends vc{constructor(e){super(e),this.type="comment";}},vr=as;as.default=as;var{isClean:Xi,my:Zi}=ft,Ji=br,Ki=vr,Sc=yr,qi,Vs,Gs,Qi;function eo(s){return s.map(e=>(e.nodes&&(e.nodes=eo(e.nodes)),delete e.source,e))}function to(s){if(s[Xi]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)to(e);}var pe=class ro extends Sc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n);}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e);}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==false);)this.indexes[t]+=1;return delete this.indexes[t],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):t==="every"||t==="some"?r=>e[t]((n,...i)=>r(n.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=eo(qi(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ji(e)];}else if(e.selector)e=[new Vs(e)];else if(e.name)e=[new Gs(e)];else if(e.text)e=[new Ki(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Zi]||ro.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Xi]&&to(n),typeof n.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length;}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r);}catch(i){throw t.addToError(i)}return n!==false&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}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]}};pe.registerParse=s=>{qi=s;};pe.registerRule=s=>{Vs=s;};pe.registerAtRule=s=>{Gs=s;};pe.registerRoot=s=>{Qi=s;};var Me=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Gs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Vs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ji.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ki.prototype):s.type==="root"&&Object.setPrototypeOf(s,Qi.prototype),s[Zi]=true,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e);});};var Cc=Me,so,no,rt=class extends Cc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new so(new no,this,e).stringify()}};rt.registerLazyResult=s=>{so=s;};rt.registerProcessor=s=>{no=s;};var js=rt;rt.default=rt;var ls=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column;}for(let r in t)this[r]=t[r];}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}},io=ls;ls.default=ls;var Ec=io,cs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Ec(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ys=cs;cs.default=cs;var zr=39,Xn=34,Rt=92,Zn=47,At=10,Ye=32,Tt=12,_t=9,Ot=13,Ic=91,xc=93,Mc=40,Nc=41,Rc=123,Ac=125,Tc=59,_c=42,Oc=58,kc=64,kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,Jn=/[\da-f]/i,Lc=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,i,o,l,a,c,u,f,d,g,m,p=r.length,h=0,y=[],v=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return v.length===0&&h>=p}function I(A){if(v.length)return v.pop();if(h>=p)return;let $=A?A.ignoreUnclosed:false;switch(i=r.charCodeAt(h),i){case At:case Ye:case _t:case Ot:case Tt:{o=h;do o+=1,i=r.charCodeAt(o);while(i===Ye||i===At||i===_t||i===Ot||i===Tt);m=["space",r.slice(h,o)],h=o-1;break}case Ic:case xc:case Rc:case Ac:case Oc:case Tc:case Nc:{let F=String.fromCharCode(i);m=[F,F,h];break}case Mc:{if(d=y.length?y.pop()[1]:"",g=r.charCodeAt(h+1),d==="url"&&g!==zr&&g!==Xn&&g!==Ye&&g!==At&&g!==_t&&g!==Tt&&g!==Ot){o=h;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(n||$){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===Rt;)f-=1,u=!u;}while(u);m=["brackets",r.slice(h,o+1),h,o],h=o;}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Dc.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case zr:case Xn:{l=i===zr?"'":'"',o=h;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(n||$){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===Rt;)f-=1,u=!u;}while(u);m=["string",r.slice(h,o+1),h,o],h=o;break}case kc:{kt.lastIndex=h+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,m=["at-word",r.slice(h,o+1),h,o],h=o;break}case Rt:{for(o=h,c=true;r.charCodeAt(o+1)===Rt;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==Zn&&i!==Ye&&i!==At&&i!==_t&&i!==Ot&&i!==Tt&&(o+=1,Jn.test(r.charAt(o)))){for(;Jn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ye&&(o+=1);}m=["word",r.slice(h,o+1),h,o],h=o;break}default:{i===Zn&&r.charCodeAt(h+1)===_c?(o=r.indexOf("*/",h+2)+1,o===0&&(n||$?o=r.length:S("comment")),m=["comment",r.slice(h,o+1),h,o],h=o):(Dt.lastIndex=h+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,m=["word",r.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){v.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},oo=Me,ir=class extends oo{constructor(e){super(e),this.type="atrule";}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Xs=ir;ir.default=ir;oo.registerAtRule(ir);var ao=Me,lo,co,Be=class extends ao{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,r){let n=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of n)i.raws.before=t.raws.before;}return n}removeChild(e,t){let r=this.index(e);return !t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new lo(new co,this,e).stringify()}};Be.registerLazyResult=s=>{lo=s;};Be.registerProcessor=s=>{co=s;};var ht=Be;Be.default=Be;ao.registerRoot(Be);var st={comma(s){return st.split(s,[","],true)},space(s){let e=[" ",`
|
|
24
|
+
`," "];return st.split(s,e)},split(s,e,t){let r=[],n="",i=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(n!==""&&r.push(n.trim()),n="",i=false):n+=u;return (t||n!=="")&&r.push(n.trim()),r}},uo=st;st.default=st;var fo=Me,Pc=uo,or=class extends fo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Pc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r);}},Zs=or;or.default=or;fo.registerRule(or);var $c=br,Fc=Lc,Bc=vr,Uc=Xs,Wc=ht,Kn=Zs,qn={empty:true,space:true};function zc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var Hc=class{constructor(e){this.input=e,this.root=new Wc,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Uc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,n;for(let i=t-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,i;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!i)this.doubleColon(r);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r;}return false}comment(e){let t=new Bc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else {let n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3];}}createTokenizer(){this.tokenizer=Fc(this.input);}decl(e,t){let r=new $c;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||zc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let d=c;d>0;d--){let g=u[d][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(r.important=true,r.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Kn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,r=null,n=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(l&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=true;break}else r===":"&&(n=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&n){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,l=r.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)i=r[d],o=i[0],o==="space"&&d===l-1&&!n?c=false:o==="comment"?(f=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!qn[f]&&!qn[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let d=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new Kn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Vc=Hc,Gc=Me,jc=Vc,Yc=wr;function ar(s,e){let t=new Yc(s,e),r=new jc(t);try{r.parse();}catch(n){throw n}return r.root}var Js=ar;ar.default=ar;Gc.registerParse(ar);var{isClean:ue,my:Xc}=ft,Zc=Yi,Jc=gr,Kc=Me,qc=js;var Qn=Ys,Qc=Js,eu=ht,tu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ru={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},su={Once:true,postcssPlugin:true,prepare:true},Ue=0;function Xe(s){return typeof s=="object"&&typeof s.then=="function"}function ho(s){let e=false,t=tu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function ei(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=ho(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[ue]=false,s.nodes&&s.nodes.forEach(e=>us(e)),s}var fs={},We=class po{constructor(e,t,r){this.stringified=false,this.processed=false;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=us(t);else if(t instanceof po||t instanceof Qn)n=us(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let i=Qc;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(t,r);}catch(o){this.processed=true,this.error=o;}n&&!n[Xc]&&Kc.rebuild(n);}this.result=new Qn(e,n,r),this.helpers={...fs,postcss:fs,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion;}catch(n){console&&console.error&&console.error(n);}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n]);};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!ru[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!su[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);else typeof t[r]=="function"&&e(t,r,t[r]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Xe(r))try{await r;}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=true;let t=[ei(e)];for(;t.length>0;){let r=this.visitTick(t);if(Xe(r))try{await r;}catch(n){let i=t[t.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n);}else await r(e,this.helpers);}catch(n){throw this.handleError(n)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Xe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=Jc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new Zc(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Xe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(Xe(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[o,l]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=true,e.push(ei(l));return}t.iterator=0,delete r.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Ue){r.nodes&&r.nodes.length&&(r[ue]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[ue]=true;let t=ho(e);for(let r of t)if(r===Ue)e.nodes&&e.each(n=>{n[ue]||this.walkSync(n);});else {let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};We.registerPostcss=s=>{fs=s;};var mo=We;We.default=We;eu.registerLazyResult(We);qc.registerLazyResult(We);var nu=Yi,iu=gr;var ou=Js,au=Ys,hs=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n,i=iu;this.result=new au(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new nu(i,n,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ou;try{e=t(this._css,this._opts);}catch(r){this.error=r;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},lu=hs;hs.default=hs;var cu=lu,uu=mo,fu=js,hu=ht,nt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let r of e)if(r.postcss===true?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new cu(this,e,t):new uu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},du=nt;nt.default=nt;hu.registerProcessor(nt);fu.registerProcessor(nt);var pu=br,mu=zi,gu=vr,yu=Xs,bu=wr,wu=ht,vu=Zs;function it(s,e){if(Array.isArray(s))return s.map(n=>it(n));let{inputs:t,...r}=s;if(t){e=[];for(let n of t){let i={...n,__proto__:bu.prototype};i.map&&(i.map={...i.map,__proto__:mu.prototype}),e.push(i);}}if(r.nodes&&(r.nodes=s.nodes.map(n=>it(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n]);}if(r.type==="root")return new wu(r);if(r.type==="decl")return new pu(r);if(r.type==="rule")return new vu(r);if(r.type==="comment")return new gu(r);if(r.type==="atrule")return new yu(r);throw new Error("Unknown node type: "+s.type)}var Su=it;it.default=it;var Cu=Hs,go=br,Eu=mo,Iu=Me,Ks=du,xu=gr,Mu=Su,yo=js,Nu=io,bo=vr,wo=Xs,Ru=Ys,Au=wr,Tu=Js,_u=uo,vo=Zs,So=ht,Ou=yr;function _(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ks(s)}_.plugin=function(e,t){let r=false;function n(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
25
|
+
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:
|
|
26
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ks().version,l}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,l,a){return _([n(a)]).process(o,l)},n};_.stringify=xu;_.parse=Tu;_.fromJSON=Mu;_.list=_u;_.comment=s=>new bo(s);_.atRule=s=>new wo(s);_.decl=s=>new go(s);_.rule=s=>new vo(s);_.root=s=>new So(s);_.document=s=>new yo(s);_.CssSyntaxError=Cu;_.Declaration=go;_.Container=Iu;_.Processor=Ks;_.Document=yo;_.Comment=bo;_.Warning=Nu;_.AtRule=wo;_.Result=Ru;_.Input=Au;_.Rule=vo;_.Root=So;_.Node=Ou;Eu.registerPostcss(_);var ku=_;_.default=_;var W=Gl(ku);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 Du=Object.defineProperty,Lu=(s,e,t)=>e in s?Du(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,se=(s,e,t)=>Lu(s,typeof e!="symbol"?e+"":e,t);function Pu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function $u(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(s).forEach(function(r){var n=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return s[r]}});}),t}var qs={exports:{}},U=String,Co=function(){return {isColorSupported:false,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};qs.exports=Co();qs.exports.createColors=Co;var Fu=qs.exports,Bu={},Uu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),le=$u(Uu),ti=Fu,ri=le,ds=class Eo extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Eo);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=ti.isColorSupported),ri&&e&&(t=ri(t));let r=t.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=ti.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return r.slice(n,i).map((c,u)=>{let f=n+1+u,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+c+`
|
|
27
|
+
`+g+l("^")}return " "+a(d)+c}).join(`
|
|
28
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
29
|
+
|
|
30
|
+
`+e+`
|
|
31
|
+
`),this.name+": "+this.message+e}},Qs=ds;ds.default=ds;var dt={};dt.isClean=Symbol("isClean");dt.my=Symbol("my");var si={after:`
|
|
32
|
+
`,beforeClose:`
|
|
33
|
+
`,beforeComment:`
|
|
34
|
+
`,beforeDecl:`
|
|
35
|
+
`,beforeOpen:" ",beforeRule:`
|
|
36
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Wu(s){return s[0].toUpperCase()+s.slice(1)}var ps=class{constructor(e){this.builder=e;}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else {let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e);}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
|
37
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o;}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r);}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e);}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e);}document(e){this.body(e);}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return si[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Wu(r);this[l]?n=this[l](o,e):o.walk(a=>{if(n=a.raws[t],typeof n!="undefined")return false});}return typeof n=="undefined"&&(n=si[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
38
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
|
|
39
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
|
|
40
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
41
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before!="undefined"){let i=r.raws.before.split(`
|
|
42
|
+
`);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after);}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end");}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t);}},Io=ps;ps.default=ps;var zu=Io;function ms(s,e){new zu(e).stringify(s);}var Sr=ms;ms.default=ms;var{isClean:Lt,my:Hu}=dt,Vu=Qs,Gu=Io,ju=Sr;function gs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let n=s[r],i=typeof n;r==="parent"&&i==="object"?e&&(t[r]=e):r==="source"?t[r]=n:Array.isArray(n)?t[r]=n.map(o=>gs(o,t)):(i==="object"&&n!==null&&(n=gs(n)),t[r]=n);}return t}var ys=class{constructor(e={}){this.raws={},this[Lt]=false,this[Hu]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r);}else this[t]=e[t];}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`);}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between;}clone(e={}){let t=gs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Vu(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Lt]){this[Lt]=false;let e=this;for(;e=e.parent;)e[Lt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let n=t.indexOf(e.word);n!==-1&&(r=this.positionInside(n,t));}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
43
|
+
`?(n=1,i+=1):n+=1;return {column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);i!==-1&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return (r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Gu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=false;for(let n of e)n===this?r=true:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},n=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),r[o]={end:l.end,inputId:a,start:l.start};}else r[o]=l;}return n&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ju){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(t,n)}get proxyOf(){return this}},Cr=ys;ys.default=ys;var Yu=Cr,bs=class extends Yu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Er=bs;bs.default=bs;var Xu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ju=(s=21)=>{let e="",t=s;for(;t--;)e+=Xu[Math.random()*64|0];return e},Ku={nanoid:Ju},{SourceMapConsumer:ni,SourceMapGenerator:ii}=le,{existsSync:qu,readFileSync:Qu}=le,{dirname:Hr,join:ef}=le;function tf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var ws=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Hr(this.mapFile)),n&&(this.text=n);}consumer(){return this.consumerCache||(this.consumerCache=new ni(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return tf(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)));}loadFile(e){if(this.root=Hr(e),qu(e))return this.mapFile=e,Qu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else {if(t instanceof ni)return ii.fromSourceMap(t).toString();if(t instanceof ii)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=ef(Hr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},xo=ws;ws.default=ws;var{SourceMapConsumer:rf,SourceMapGenerator:sf}=le,{fileURLToPath:oi,pathToFileURL:Pt}=le,{isAbsolute:vs,resolve:Ss}=le,{nanoid:nf}=Ku,Vr=le,ai=Qs,of=xo,Gr=Symbol("fromOffsetCache"),af=!!(rf&&sf),li=!!(Ss&&vs),lr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!li||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=Ss(t.from)),li&&af){let r=new of(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n));}}this.file||(this.id="<input css "+nf(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,n={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?i=new ai(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):i=new ai(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Pt&&(i.input.url=Pt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[Gr])r=this[Gr];else {let i=this.css.split(`
|
|
44
|
+
`);r=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)r[l]=o,o+=i[l].length+1;this[Gr]=r;}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else {let i=r.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<r[o])i=o-1;else if(e>=r[o+1])n=o+1;else {n=o;break}}return {col:e-r[n]+1,line:n+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Ss(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=i.originalPositionFor({column:n,line:r}));let a;vs(o.source)?a=Pt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Pt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(oi)c.file=oi(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Ir=lr;lr.default=lr;Vr&&Vr.registerInput&&Vr.registerInput(lr);var{SourceMapConsumer:Mo,SourceMapGenerator:Zt}=le,{dirname:Jt,relative:No,resolve:Ro,sep:Ao}=le,{pathToFileURL:ci}=le,lf=Ir,cf=!!(Mo&&Zt),uf=!!(Jt&&Ro&&No&&Ao),ff=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
45
|
+
`;this.css.includes(`\r
|
|
46
|
+
`)&&(t=`\r
|
|
47
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Jt(e.file),n;this.mapOpts.sourcesContent===false?(n=new Mo(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),uf&&cf&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Zt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Zt({file:this.outputFile(),ignoreInvalidMapping:true}),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 Zt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(n.generated.line=e,n.generated.column=t-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
|
|
48
|
+
`),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Jt(Ro(r,this.mapOpts.annotation)));let n=No(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t);}});else {let e=new lf(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map);}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=true;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css);}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css);}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ci){let r=ci(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ao==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},To=ff,hf=Cr,Cs=class extends hf{constructor(e){super(e),this.type="comment";}},xr=Cs;Cs.default=Cs;var{isClean:_o,my:Oo}=dt,ko=Er,Do=xr,df=Cr,Lo,en,tn,Po;function $o(s){return s.map(e=>(e.nodes&&(e.nodes=$o(e.nodes)),delete e.source,e))}function Fo(s){if(s[_o]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Fo(e);}var me=class Bo extends df{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n);}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e);}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==false);)this.indexes[t]+=1;return delete this.indexes[t],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):t==="every"||t==="some"?r=>e[t]((n,...i)=>r(n.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=$o(Lo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ko(e)];}else if(e.selector)e=[new en(e)];else if(e.name)e=[new tn(e)];else if(e.text)e=[new Do(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Oo]||Bo.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[_o]&&Fo(n),typeof n.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length;}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r);}catch(i){throw t.addToError(i)}return n!==false&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}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]}};me.registerParse=s=>{Lo=s;};me.registerRule=s=>{en=s;};me.registerAtRule=s=>{tn=s;};me.registerRoot=s=>{Po=s;};var Ne=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,tn.prototype):s.type==="rule"?Object.setPrototypeOf(s,en.prototype):s.type==="decl"?Object.setPrototypeOf(s,ko.prototype):s.type==="comment"?Object.setPrototypeOf(s,Do.prototype):s.type==="root"&&Object.setPrototypeOf(s,Po.prototype),s[Oo]=true,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e);});};var pf=Ne,Uo,Wo,ot=class extends pf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Uo(new Wo,this,e).stringify()}};ot.registerLazyResult=s=>{Uo=s;};ot.registerProcessor=s=>{Wo=s;};var rn=ot;ot.default=ot;var Es=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column;}for(let r in t)this[r]=t[r];}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}},zo=Es;Es.default=Es;var mf=zo,Is=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new mf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},sn=Is;Is.default=Is;var jr=39,ui=34,$t=92,fi=47,Ft=10,Ze=32,Bt=12,Ut=9,Wt=13,gf=91,yf=93,bf=40,wf=41,vf=123,Sf=125,Cf=59,Ef=42,If=58,xf=64,zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ht=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mf=/.[\r\n"'(/\\]/,hi=/[\da-f]/i,Nf=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,i,o,l,a,c,u,f,d,g,m,p=r.length,h=0,y=[],v=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return v.length===0&&h>=p}function I(A){if(v.length)return v.pop();if(h>=p)return;let $=A?A.ignoreUnclosed:false;switch(i=r.charCodeAt(h),i){case Ft:case Ze:case Ut:case Wt:case Bt:{o=h;do o+=1,i=r.charCodeAt(o);while(i===Ze||i===Ft||i===Ut||i===Wt||i===Bt);m=["space",r.slice(h,o)],h=o-1;break}case gf:case yf:case vf:case Sf:case If:case Cf:case wf:{let F=String.fromCharCode(i);m=[F,F,h];break}case bf:{if(d=y.length?y.pop()[1]:"",g=r.charCodeAt(h+1),d==="url"&&g!==jr&&g!==ui&&g!==Ze&&g!==Ft&&g!==Ut&&g!==Bt&&g!==Wt){o=h;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(n||$){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u;}while(u);m=["brackets",r.slice(h,o+1),h,o],h=o;}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Mf.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case jr:case ui:{l=i===jr?"'":'"',o=h;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(n||$){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u;}while(u);m=["string",r.slice(h,o+1),h,o],h=o;break}case xf:{zt.lastIndex=h+1,zt.test(r),zt.lastIndex===0?o=r.length-1:o=zt.lastIndex-2,m=["at-word",r.slice(h,o+1),h,o],h=o;break}case $t:{for(o=h,c=true;r.charCodeAt(o+1)===$t;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==fi&&i!==Ze&&i!==Ft&&i!==Ut&&i!==Wt&&i!==Bt&&(o+=1,hi.test(r.charAt(o)))){for(;hi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1);}m=["word",r.slice(h,o+1),h,o],h=o;break}default:{i===fi&&r.charCodeAt(h+1)===Ef?(o=r.indexOf("*/",h+2)+1,o===0&&(n||$?o=r.length:S("comment")),m=["comment",r.slice(h,o+1),h,o],h=o):(Ht.lastIndex=h+1,Ht.test(r),Ht.lastIndex===0?o=r.length-1:o=Ht.lastIndex-2,m=["word",r.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){v.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},Ho=Ne,cr=class extends Ho{constructor(e){super(e),this.type="atrule";}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},nn=cr;cr.default=cr;Ho.registerAtRule(cr);var Vo=Ne,Go,jo,ze=class extends Vo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,r){let n=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of n)i.raws.before=t.raws.before;}return n}removeChild(e,t){let r=this.index(e);return !t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Go(new jo,this,e).stringify()}};ze.registerLazyResult=s=>{Go=s;};ze.registerProcessor=s=>{jo=s;};var pt=ze;ze.default=ze;Vo.registerRoot(ze);var at={comma(s){return at.split(s,[","],true)},space(s){let e=[" ",`
|
|
49
|
+
`," "];return at.split(s,e)},split(s,e,t){let r=[],n="",i=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(n!==""&&r.push(n.trim()),n="",i=false):n+=u;return (t||n!=="")&&r.push(n.trim()),r}},Yo=at;at.default=at;var Xo=Ne,Rf=Yo,ur=class extends Xo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Rf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r);}},on=ur;ur.default=ur;Xo.registerRule(ur);var Af=Er,Tf=Nf,_f=xr,Of=nn,kf=pt,di=on,pi={empty:true,space:true};function Df(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var Lf=class{constructor(e){this.input=e,this.root=new kf,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Of;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,n;for(let i=t-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,i;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!i)this.doubleColon(r);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r;}return false}comment(e){let t=new _f;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else {let n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3];}}createTokenizer(){this.tokenizer=Tf(this.input);}decl(e,t){let r=new Af;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Df(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let d=c;d>0;d--){let g=u[d][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(r.important=true,r.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new di;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,r=null,n=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(l&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=true;break}else r===":"&&(n=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&n){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,l=r.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)i=r[d],o=i[0],o==="space"&&d===l-1&&!n?c=false:o==="comment"?(f=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!pi[f]&&!pi[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let d=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new di;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Pf=Lf,$f=Ne,Ff=Pf,Bf=Ir;function fr(s,e){let t=new Bf(s,e),r=new Ff(t);try{r.parse();}catch(n){throw n}return r.root}var an=fr;fr.default=fr;$f.registerParse(fr);var{isClean:fe,my:Uf}=dt,Wf=To,zf=Sr,Hf=Ne,Vf=rn;var mi=sn,Gf=an,jf=pt,Yf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xf={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},Zf={Once:true,postcssPlugin:true,prepare:true},He=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Zo(s){let e=false,t=Yf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,He,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,He,t+"Exit"]:[t,t+"Exit"]}function gi(s){let e;return s.type==="document"?e=["Document",He,"DocumentExit"]:s.type==="root"?e=["Root",He,"RootExit"]:e=Zo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[fe]=false,s.nodes&&s.nodes.forEach(e=>xs(e)),s}var Ms={},Ve=class Jo{constructor(e,t,r){this.stringified=false,this.processed=false;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=xs(t);else if(t instanceof Jo||t instanceof mi)n=xs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let i=Gf;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(t,r);}catch(o){this.processed=true,this.error=o;}n&&!n[Uf]&&Hf.rebuild(n);}this.result=new mi(e,n,r),this.helpers={...Ms,postcss:Ms,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion;}catch(n){console&&console.error&&console.error(n);}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n]);};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Xf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Zf[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);else typeof t[r]=="function"&&e(t,r,t[r]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r;}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=true;let t=[gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r;}catch(n){let i=t[t.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n);}else await r(e,this.helpers);}catch(n){throw this.handleError(n)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=zf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new Wf(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(Je(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[o,l]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=true,e.push(gi(l));return}t.iterator=0,delete r.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===He){r.nodes&&r.nodes.length&&(r[fe]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[fe]=true;let t=Zo(e);for(let r of t)if(r===He)e.nodes&&e.each(n=>{n[fe]||this.walkSync(n);});else {let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};Ve.registerPostcss=s=>{Ms=s;};var Ko=Ve;Ve.default=Ve;jf.registerLazyResult(Ve);Vf.registerLazyResult(Ve);var Jf=To,Kf=Sr;var qf=an,Qf=sn,Ns=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n,i=Kf;this.result=new Qf(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Jf(i,n,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=qf;try{e=t(this._css,this._opts);}catch(r){this.error=r;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},eh=Ns;Ns.default=Ns;var th=eh,rh=Ko,sh=rn,nh=pt,lt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let r of e)if(r.postcss===true?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new th(this,e,t):new rh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ih=lt;lt.default=lt;nh.registerProcessor(lt);sh.registerProcessor(lt);var oh=Er,ah=xo,lh=xr,ch=nn,uh=Ir,fh=pt,hh=on;function ct(s,e){if(Array.isArray(s))return s.map(n=>ct(n));let{inputs:t,...r}=s;if(t){e=[];for(let n of t){let i={...n,__proto__:uh.prototype};i.map&&(i.map={...i.map,__proto__:ah.prototype}),e.push(i);}}if(r.nodes&&(r.nodes=s.nodes.map(n=>ct(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n]);}if(r.type==="root")return new fh(r);if(r.type==="decl")return new oh(r);if(r.type==="rule")return new hh(r);if(r.type==="comment")return new lh(r);if(r.type==="atrule")return new ch(r);throw new Error("Unknown node type: "+s.type)}var dh=ct;ct.default=ct;var ph=Qs,qo=Er,mh=Ko,gh=Ne,ln=ih,yh=Sr,bh=dh,Qo=rn,wh=zo,ea=xr,ta=nn,vh=sn,Sh=Ir,Ch=an,Eh=Yo,ra=on,sa=pt,Ih=Cr;function O(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ln(s)}O.plugin=function(e,t){let r=false;function n(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
50
|
+
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:
|
|
51
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ln().version,l}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,l,a){return O([n(a)]).process(o,l)},n};O.stringify=yh;O.parse=Ch;O.fromJSON=bh;O.list=Eh;O.comment=s=>new ea(s);O.atRule=s=>new ta(s);O.decl=s=>new qo(s);O.rule=s=>new ra(s);O.root=s=>new sa(s);O.document=s=>new Qo(s);O.CssSyntaxError=ph;O.Declaration=qo;O.Container=gh;O.Processor=ln;O.Document=Qo;O.Comment=ea;O.Warning=wh;O.AtRule=ta;O.Result=vh;O.Input=Sh;O.Rule=ra;O.Root=sa;O.Node=Ih;mh.registerPostcss(O);var xh=O;O.default=O;var z=Pu(xh);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 Rs=class s{constructor(...e){se(this,"parentElement",null),se(this,"parentNode",null),se(this,"ownerDocument"),se(this,"firstChild",null),se(this,"lastChild",null),se(this,"previousSibling",null),se(this,"nextSibling",null),se(this,"ELEMENT_NODE",1),se(this,"TEXT_NODE",3),se(this,"nodeType"),se(this,"nodeName"),se(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var yi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Vt={},Mh=()=>!!globalThis.Zone;function cn(s){if(Vt[s])return Vt[s];let e=globalThis[s],t=e.prototype,r=s in yi?yi[s]:void 0,n=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=s in bi?bi[s]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(n&&o&&!Mh())return Vt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?Vt[s]=c:t}catch(l){return t}}var Yr={};function ye(s,e,t){var r;let n=`${s}.${String(t)}`;if(Yr[n])return Yr[n].call(e);let i=cn(s),o=(r=Object.getOwnPropertyDescriptor(i,t))==null?void 0:r.get;return o?(Yr[n]=o,o.call(e)):e[t]}var Xr={};function na(s,e,t){let r=`${s}.${String(t)}`;if(Xr[r])return Xr[r].bind(e);let i=cn(s)[t];return typeof i!="function"?e[t]:(Xr[r]=i,i.bind(e))}function Nh(s){return ye("Node",s,"ownerDocument")}function Rh(s){return ye("Node",s,"childNodes")}function Ah(s){return ye("Node",s,"parentNode")}function Th(s){return ye("Node",s,"parentElement")}function _h(s){return ye("Node",s,"textContent")}function Oh(s,e){return na("Node",s,"contains")(e)}function kh(s){return na("Node",s,"getRootNode")()}function Dh(s){return !s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function Lh(s){return s.styleSheets}function Ph(s){return !s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function $h(s,e){return ye("Element",s,"querySelector")(e)}function Fh(s,e){return ye("Element",s,"querySelectorAll")(e)}function ia(){return cn("MutationObserver").constructor}function Re(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],n=t(r);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=n,()=>{s[e]=r;}}catch(r){return ()=>{}}}var x={ownerDocument:Nh,childNodes:Rh,parentNode:Ah,parentElement:Th,textContent:_h,contains:Oh,getRootNode:kh,host:Dh,styleSheets:Lh,shadowRoot:Ph,querySelector:$h,querySelectorAll:Fh,mutationObserver:ia,patch:Re};function K(s,e,t=document){let r={capture:true,passive:true};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}var De=`Please stop import mirror directly. Instead of that,\r
|
|
52
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
53
|
+
or you can use record.mirror to access the mirror instance during recording.`,wi={map:{},getId(){return console.error(De),-1},getNode(){return console.error(De),null},removeNodeFromMap(){console.error(De);},has(){return console.error(De),false},reset(){console.error(De);}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(wi=new Proxy(wi,{get(s,e,t){return e==="map"&&console.error(De),Reflect.get(s,e,t)}}));function ut(s,e,t={}){let r=null,n=0;return function(...i){let o=Date.now();!n&&t.leading===false&&(n=o);let l=e-(o-n),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),n=o,s.apply(a,i)):!r&&t.trailing!==false&&(r=setTimeout(()=>{n=t.leading===false?0:Date.now(),r=null,s.apply(a,i);},l));}}function Mr(s,e,t,r,n=window){let i=n.Object.getOwnPropertyDescriptor(s,e);return n.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),i&&i.set&&i.set.call(this,o);}}),()=>Mr(s,e,i||{},true)}var hr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(hr=()=>new Date().getTime());function oa(s){var e,t,r,n;let i=s.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((e=x.parentElement(i.body))==null?void 0:e.scrollLeft)||((t=i==null?void 0:i.body)==null?void 0:t.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((r=x.parentElement(i.body))==null?void 0:r.scrollTop)||((n=i==null?void 0:i.body)==null?void 0:n.scrollTop)||0}}function aa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function la(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ca(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function q(s,e,t,r){if(!s)return false;let n=ca(s);if(!n)return false;try{if(typeof e=="string"){if(n.classList.contains(e)||r&&n.closest("."+e)!==null)return !0}else if(sr(n,e,r))return !0}catch(i){}return !!(t&&(n.matches(t)||r&&n.closest(t)!==null))}function Bh(s,e){return e.getId(s)!==-1}function Zr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(s)===tt}function ua(s,e){if(qe(s))return false;let t=e.getId(s);if(!e.has(t))return true;let r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?false:r?ua(r,e):true}function As(s){return !!s.changedTouches}function Uh(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function fa(s,e){return !!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ha(s,e){return !!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ts(s){return s?s instanceof Rs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):false}var _s=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map);}getId(e){var t;return (t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function da(s){var e;let t=null;return "getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function Wh(s){let e=s,t;for(;t=da(e);)e=t;return e}function zh(s){let e=x.ownerDocument(s);if(!e)return false;let t=Wh(s);return x.contains(e,t)}function pa(s){let e=x.ownerDocument(s);return e?x.contains(e,s)||zh(s):false}var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),M=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(M||{}),Q=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(Q||{}),de=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(de||{}),Ge=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ge||{}),Le=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Le||{});var ma=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(ma||{});function vi(s){return "__ln"in s}var Os=class{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&vi(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t);}else if(e.nextSibling&&vi(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t);}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++;}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},Si=(s,e)=>`${s}@${e}`,ks=class{constructor(){w(this,"frozen",false),w(this,"locked",false),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),w(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Os,n=a=>{let c=a,u=tt;for(;u===tt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=a=>{let c=x.parentNode(a);if(!c||!pa(a))return;let u=false;if(a.nodeType===Node.TEXT_NODE){let m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=true);}let f=qe(c)?this.mirror.getId(da(a)):this.mirror.getId(c),d=n(a);if(f===-1||d===-1)return r.addNode(a);let g=$e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,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:m=>{fa(m,this.mirror)&&this.iframeManager.addIframe(m),ha(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ts(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc);},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p);},cssCaptured:u});g&&(e.push({parentId:f,nextId:d,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Ci(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||i(a);for(let a of this.addedSet)!Ei(this.droppedSet,a)&&!Ci(this.removesSubTreeCache,a,this.mirror)||Ei(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=n(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=r.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(n(u.value)===-1)continue;if(f!==-1){a=u;break}else {let g=u.value,m=x.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=x.host(m);if(this.mirror.getId(p)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value);}let l={texts:this.texts.map(a=>{let c=a.node,u=x.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l));}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(x.childNodes(e),n=>x.textContent(n)||"").join("");t.attributes.value=er({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:tr(e),value:r,maskInputFn:this.maskInputFn});}),w(this,"processMutation",e=>{if(!Zr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:$i(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,ca(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if(r==="value"){let o=tr(t);n=er({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:n,maskInputFn:this.maskInputFn});}if(q(e.target,this.blockClass,this.blockSelector,false)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(n))if(!t.contentDocument)r="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Pi(t.tagName,r))if(i.attributes[r]=Li(this.doc,xe(t.tagName),xe(r),n),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch(l){this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?i.styleDiff[l]=a:i.styleDiff[l]=[a,c]:i._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(i.styleDiff[l]=false);}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(q(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=qe(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,false)||Zr(t,this.mirror,this.slimDOMOptions)||!Bh(t,this.mirror)||(this.addedSet.has(t)?(Ds(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ua(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Si(r,n)]?Ds(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:qe(e.target)&&Qe(e.target)?true:void 0}),Hh(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Zr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Si(this.mirror.getId(e),r)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(r=>this.genAdds(r)),Ts(e)&&x.childNodes(x.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e);}));}});}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Ds(s,e){s.delete(e),x.childNodes(e).forEach(t=>Ds(s,t));}function Hh(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(n=>t.push(n)));}}function Ci(s,e,t){return s.size===0?false:Vh(s,e)}function Vh(s,e,t){let r=x.parentNode(e);return r?s.has(r):false}function Ei(s,e){return s.size===0?false:ga(s,e)}function ga(s,e){let t=x.parentNode(e);return t?s.has(t)?true:ga(s,t):false}var et;function Gh(s){et=s;}function jh(){et=void 0;}var N=s=>et?(...t)=>{try{return s(...t)}catch(r){if(et&&et(r)===true)return;throw r}}:s,Ie=[];function mt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function ya(s,e){let t=new ks;Ie.push(t),t.init(s);let r=new(ia())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),r}function Yh({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===false)return ()=>{};let n=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=ut(N(f=>{let d=Date.now()-l;s(o.map(g=>(g.timeOffset-=d,g)),f),o=[],l=null;}),i),c=N(ut(N(f=>{let d=mt(f),{clientX:g,clientY:m}=As(f)?f.changedTouches[0]:f;l||(l=hr()),o.push({x:g,y:m,id:r.getId(d),timeOffset:hr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?M.Drag:f instanceof MouseEvent?M.MouseMove:M.TouchMove);}),n,{trailing:!1})),u=[K("mousemove",c,t),K("touchmove",c,t),K("drag",c,t)];return N(()=>{u.forEach(f=>f());})}function Xh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let o=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[],a=null,c=u=>f=>{let d=mt(f);if(q(d,r,n,true))return;let g=null,m=u;if("pointerType"in f){switch(f.pointerType){case "mouse":g=de.Mouse;break;case "touch":g=de.Touch;break;case "pen":g=de.Pen;break}g===de.Touch?Q[u]===Q.MouseDown?m="TouchStart":Q[u]===Q.MouseUp&&(m="TouchEnd"):de.Pen;}else As(f)&&(g=de.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===de.Touch||m.startsWith("Mouse")&&g===de.Mouse)&&(g=null)):Q[u]===Q.Click&&(g=a,a=null);let p=As(f)?f.changedTouches[0]:f;if(!p)return;let h=t.getId(d),{clientX:y,clientY:v}=p;N(s)({type:Q[m],id:h,x:y,y:v,...g!==null&&{pointerType:g}});};return Object.keys(Q).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let f=xe(u),d=c(u);if(window.PointerEvent)switch(Q[u]){case Q.MouseDown:case Q.MouseUp:f=f.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}l.push(K(f,d,e));}),N(()=>{l.forEach(u=>u());})}function ba({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,sampling:i}){let o=N(ut(N(l=>{let a=mt(l);if(!a||q(a,r,n,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=oa(e.defaultView);s({id:c,x:u.left,y:u.top});}else s({id:c,x:a.scrollLeft,y:a.scrollTop});}),i.scroll||100));return K("scroll",o,e)}function Zh({viewportResizeCb:s},{win:e}){let t=-1,r=-1,n=N(ut(N(()=>{let i=aa(),o=la();(t!==i||r!==o)&&(s({width:Number(o),height:Number(i)}),t=i,r=o);}),200));return K("resize",n,e)}var Jh=["INPUT","TEXTAREA","SELECT"],Ii=new WeakMap;function Kh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function f(v){let b=mt(v),S=v.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=x.parentElement(b)),!b||!E||Jh.indexOf(E)<0||q(b,r,n,true)||b.classList.contains(i)||o&&b.matches(o))return;let I=b.value,P=false,A=tr(b)||"";A==="radio"||A==="checkbox"?P=b.checked:(l[E.toLowerCase()]||l[A])&&(I=er({element:b,maskInputOptions:l,tagName:E,type:A,value:I,maskInputFn:a})),d(b,u?{text:I,isChecked:P,userTriggered:S}:{text:I,isChecked:P});let $=b.name;A==="radio"&&$&&P&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(F=>{if(F!==b){let D=F.value;d(F,u?{text:D,isChecked:!P,userTriggered:false}:{text:D,isChecked:!P});}});}function d(v,b){let S=Ii.get(v);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Ii.set(v,b);let E=t.getId(v);N(s)({...b,id:E});}}let m=(c.input==="last"?["change"]:["input","change"]).map(v=>K(v,N(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(v=>v());};let h=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return h&&h.set&&m.push(...y.map(v=>Mr(v[0],v[1],{set(){N(f)({target:this,isTrusted:false});}},false,p))),N(()=>{m.forEach(v=>v());})}function dr(s){let e=[];function t(r,n){if(Gt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);n.unshift(o);}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);n.unshift(o);}return n}return t(s,e)}function we(s,e,t){let r,n;return s?(s.ownerNode?r=e.getId(s.ownerNode):n=t.getId(s),{styleId:n,id:r}):{}}function qh({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return ()=>{};let n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:N((u,f,d)=>{let[g,m]=d,{id:p,styleId:h}=we(f,e,t.styleMirror);return (p&&p!==-1||h&&h!==-1)&&s({id:p,styleId:h,adds:[{rule:g,index:m}]}),u.apply(f,d)})}),r.CSSStyleSheet.prototype.addRule=function(u,f,d=this.cssRules.length){let g=`${u} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,removes:[{index:g}]}),u.apply(f,d)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replace:g}),u.apply(f,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replaceSync:g}),u.apply(f,d)})}));let a={};jt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(jt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),jt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),jt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,f])=>{c[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(c[u].insertRule,{apply:N((d,g,m)=>{let[p,h]=m,{id:y,styleId:v}=we(g.parentStyleSheet,e,t.styleMirror);return (y&&y!==-1||v&&v!==-1)&&s({id:y,styleId:v,adds:[{rule:p,index:[...dr(g),h||0]}]}),d.apply(g,m)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:N((d,g,m)=>{let[p]=m,{id:h,styleId:y}=we(g.parentStyleSheet,e,t.styleMirror);return (h&&h!==-1||y&&y!==-1)&&s({id:h,styleId:y,removes:[{index:[...dr(g),p]}]}),d.apply(g,m)})});}),N(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule;});})}function wa({mirror:s,stylesheetManager:e},t){var r,n,i;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(x.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(i=(n=t.ownerDocument)==null?void 0:n.defaultView)==null?void 0:i.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return (c=a.get)==null?void 0:c.call(this)},set(c){var u;let f=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o);}catch(d){}return f}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function Qh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:n}){let i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:N((l,a,c)=>{var u;let[f,d,g]=c;if(t.has(f))return i.apply(a,[f,d,g]);let{id:m,styleId:p}=we((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,set:{property:f,value:d,priority:g},index:dr(a.parentRule)}),l.apply(a,c)})});let o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:N((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:d,styleId:g}=we((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,remove:{property:f},index:dr(a.parentRule)}),l.apply(a,c)})}),N(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o;})}function ed({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:n,doc:i}){let o=N(a=>ut(N(c=>{let u=mt(c);if(!u||q(u,e,t,!0))return;let{currentTime:f,volume:d,muted:g,playbackRate:m,loop:p}=u;s({type:a,id:r.getId(u),currentTime:f,volume:d,muted:g,playbackRate:m,loop:p});}),n.media||500)),l=[K("play",o(Le.Play),i),K("pause",o(Le.Pause),i),K("seeked",o(Le.Seeked),i),K("volumechange",o(Le.VolumeChange),i),K("ratechange",o(Le.RateChange),i)];return N(()=>{l.forEach(a=>a());})}function td({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let r=[],n=new WeakMap,i=t.FontFace;t.FontFace=function(a,c,u){let f=new i(a,c,u);return n.set(f,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),f};let o=Re(e.fonts,"add",function(l){return function(a){return setTimeout(N(()=>{let c=n.get(a);c&&(s(c),n.delete(a));}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=i;}),r.push(o),N(()=>{r.forEach(l=>l());})}function rd(s){let{doc:e,mirror:t,blockClass:r,blockSelector:n,selectionCb:i}=s,o=true,l=N(()=>{let a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let f=0;f<u;f++){let d=a.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:p,endOffset:h}=d;q(g,r,n,!0)||q(p,r,n,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:h});}i({ranges:c});});return l(),K("selectionchange",l)}function sd({doc:s,customElementCb:e}){let t=s.defaultView;return !t||!t.customElements?()=>{}:Re(t.customElements,"define",function(n){return function(i,o,l){try{e({define:{name:i}});}catch(a){console.warn(`Custom element callback failed for ${i}`);}return n.apply(this,[i,o,l])}})}function nd(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:d,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p);},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p);},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),n(...p);},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p);},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p);},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p);},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p);},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p);},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},s.fontCb=(...p)=>{e.font&&e.font(...p),d(...p);},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p);},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function id(s,e={}){let t=s.doc.defaultView;if(!t)return ()=>{};nd(s,e);let r;s.recordDOM&&(r=ya(s,s.doc));let n=Yh(s),i=Xh(s),o=ba(s),l=Zh(s,{win:t}),a=Kh(s),c=ed(s),u=()=>{},f=()=>{},d=()=>{},g=()=>{};s.recordDOM&&(u=qh(s,{win:t}),f=wa(s,s.doc),d=Qh(s,{win:t}),s.collectFonts&&(g=td(s)));let m=rd(s),p=sd(s),h=[];for(let y of s.plugins)h.push(y.observer(y.callback,t,y.options));return N(()=>{Ie.forEach(y=>y.reset()),r==null||r.disconnect(),n(),i(),o(),l(),a(),c(),u(),f(),d(),g(),m(),p(),h.forEach(y=>y());})}function Gt(s){return typeof window[s]!="undefined"}function jt(s){return !!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var pr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),l=i.get(t);return l||(l=this.generateIdFn(),i.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(n=>this.getRemoteId(e,n,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e);}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ls=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new pr(Di)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(e){this.iframes.set(e,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument));}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let i=this.transformCrossOriginEvent(n,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout);}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case R.Meta:case R.Load:case R.DomContentLoaded:return false;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case M.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(n.node,i);}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"]);}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"]);}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"]);}),t;case M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"]);}),t;case M.ViewportResize:return false;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"]);}),t;case M.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(n=>{this.replaceStyleIds(n,e,["styleId"]);}),t}}return false}replace(e,t,r,n){for(let i of n)!Array.isArray(t[i])&&typeof t[i]!="number"||(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t);});}patchRootIdOnNode(e,t){e.type!==ma.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t);});}},Ps=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init();}init(){this.reset(),this.patchAttachShadow(Element,document);}addShadowRoot(e,t){if(!Qe(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ya({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ba({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(wa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Re(e.prototype,"attachShadow",function(n){return function(i){let o=n.call(this,i),l=x.shadowRoot(this);return l&&pa(this)&&r.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",od=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(Ke=0;Ke<Fe.length;Ke++)od[Fe.charCodeAt(Ke)]=Ke;var Ke,ad=function(s){var e=new Uint8Array(s),t,r=e.length,n="";for(t=0;t<r;t+=3)n+=Fe[e[t]>>2],n+=Fe[(e[t]&3)<<4|e[t+1]>>4],n+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],n+=Fe[e[t+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var xi=new Map;function ld(s,e){let t=xi.get(s);return t||(t=new Map,xi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var va=(s,e,t)=>{if(!s||!(Ca(s,e)||typeof s=="object"))return;let r=s.constructor.name,n=ld(t,r),i=n.indexOf(s);return i===-1&&(i=n.length,n.push(s)),i};function Kt(s,e,t){if(s instanceof Array)return s.map(r=>Kt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return {rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,n=ad(s);return {rr_type:r,base64:n}}else {if(s instanceof DataView)return {rr_type:s.constructor.name,args:[Kt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:n}=s;return {rr_type:r,src:n}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",n=s.toDataURL();return {rr_type:r,src:n}}else {if(s instanceof ImageData)return {rr_type:s.constructor.name,args:[Kt(s.data,e,t),s.width,s.height]};if(Ca(s,e)||typeof s=="object"){let r=s.constructor.name,n=va(s,e,t);return {rr_type:r,index:n}}}}return s}var Sa=(s,e,t)=>s.map(r=>Kt(r,e,t)),Ca=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>s instanceof e[n]);function cd(s,e,t,r){let n=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of i)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Re(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return q(this.canvas,t,r,!0)||setTimeout(()=>{let u=Sa(c,e,this);s(this.canvas,{type:Ge["2D"],property:o,args:u});},0),a.apply(this,c)}});n.push(l);}catch(l){let a=Mr(e.CanvasRenderingContext2D.prototype,o,{set(c){s(this.canvas,{type:Ge["2D"],property:o,args:[c],setter:true});}});n.push(a);}return ()=>{n.forEach(o=>o());}}function ud(s){return s==="experimental-webgl"?"webgl":s}function Mi(s,e,t,r){let n=[];try{let i=Re(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){let c=ud(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});n.push(i);}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(i=>i());}}function Ni(s,e,t,r,n,i){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let c=Re(s,a,function(u){return function(...f){let d=u.apply(this,f);if(va(d,i,this),"tagName"in this.canvas&&!q(this.canvas,r,n,!0)){let g=Sa(f,i,this),m={type:e,property:a,args:g};t(this.canvas,m);}return d}});o.push(c);}catch(c){let u=Mr(s,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:true});}});o.push(u);}return o}function fd(s,e,t,r){let n=[];return n.push(...Ni(e.WebGLRenderingContext.prototype,Ge.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&n.push(...Ni(e.WebGL2RenderingContext.prototype,Ge.WebGL2,s,t,r,e)),()=>{n.forEach(i=>i());}}var Ea="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hd=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Ri=typeof window!="undefined"&&window.Blob&&new Blob([hd(Ea)],{type:"text/javascript;charset=utf-8"});function dd(s){let e;try{if(e=Ri&&(window.URL||window.webkitURL).createObjectURL(Ri),!e)throw "";let t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ea,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var $s=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",false),w(this,"locked",false),w(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c);});let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,n,i),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:l});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,t,r,n,i){let o=Mi(t,r,n,true),l=new Map,a=new dd;a.onmessage=m=>{let{id:p}=m.data;if(l.set(p,false),!("base64"in m.data))return;let{base64:h,type:y,width:v,height:b}=m.data;this.mutationCb({id:p,type:Ge["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:y}]},0,0]}]});};let c=1e3/e,u=0,f,d=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{q(p,r,n,true)||m.push(p);}),m},g=m=>{if(u&&m-u<c){f=requestAnimationFrame(g);return}u=m,d().forEach(async p=>{var h;let y=this.mirror.getId(p);if(l.get(y)||p.width===0||p.height===0)return;if(l.set(y,true),["webgl","webgl2"].includes(p.__context)){let b=p.getContext(p.__context);((h=b==null?void 0:b.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let v=await createImageBitmap(p);a.postMessage({id:y,bitmap:v,width:p.width,height:p.height,dataURLOptions:i.dataURLOptions},[v]);}),f=requestAnimationFrame(g);};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=Mi(e,t,r,false),i=cd(this.processMutation.bind(this),e,t,r),o=fd(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let n=r.map(o=>{let{type:l,...a}=o;return a}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e);}},Fs=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new _s),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},n=[];for(let i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),n.push({styleId:o,rules:Array.from(i.rules||CSSRule,(l,a)=>({rule:Oi(l,i.href),index:a}))})),r.styleIds.push(o);}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},Bs=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",false);}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(n=>n!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},G,qt,Jr,mr=false;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((On=s.contentWindow)==null?void 0:On.Array.from)||Array.from,document.body.removeChild(s);}}catch(s){console.debug("Unable to override Array.from",s);}var oe=wl();function be(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=true,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:h,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:S,recordDOM:E=true,recordCanvas:I=false,recordCrossOriginIframes:P=false,recordAfter:A=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:$=false,collectFonts:F=false,inlineImages:D=false,plugins:J,keepIframeSrcFn:C=()=>false,ignoreCSSAttributes:ee=new Set([]),errorHandler:ve}=s;Gh(ve);let j=P?window.parent===window:true,re=false;if(!j)try{window.parent.document&&(re=!1);}catch(T){re=true;}if(j&&!e)throw new Error("emit function is required");if(!j&&!re)return ()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),oe.reset();let Se=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:d!==void 0?d:{password:true},ce=Fi(g);Uh();let pn,kr=0,mn=T=>{for(let ie of J||[])ie.eventProcessor&&(T=ie.eventProcessor(T));return y&&!re&&(T=y(T)),T};G=(T,ie)=>{var H;let V=T;if(V.timestamp=hr(),(H=Ie[0])!=null&&H.isFrozen()&&V.type!==R.FullSnapshot&&!(V.type===R.IncrementalSnapshot&&V.data.source===M.Mutation)&&Ie.forEach(te=>te.unfreeze()),j)e==null||e(mn(V),ie);else if(re){let te={type:"rrweb",event:mn(V),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(te,"*");}if(V.type===R.FullSnapshot)pn=V,kr=0;else if(V.type===R.IncrementalSnapshot){if(V.data.source===M.Mutation&&V.data.isAttachIframe)return;kr++;let te=r&&kr>=r,k=t&&V.timestamp-pn.timestamp>t;(te||k)&&qt(true);}};let gt=T=>{G({type:R.IncrementalSnapshot,data:{source:M.Mutation,...T}});},gn=T=>G({type:R.IncrementalSnapshot,data:{source:M.Scroll,...T}}),yn=T=>G({type:R.IncrementalSnapshot,data:{source:M.CanvasMutation,...T}}),La=T=>G({type:R.IncrementalSnapshot,data:{source:M.AdoptedStyleSheet,...T}}),Ce=new Fs({mutationCb:gt,adoptedStyleSheetCb:La}),Ee=new Ls({mirror:oe,mutationCb:gt,stylesheetManager:Ce,recordCrossOriginIframes:P,wrappedEmit:G});for(let T of J||[])T.getMirror&&T.getMirror({nodeMirror:oe,crossOriginIframeMirror:Ee.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ee.crossOriginIframeStyleMirror});let Dr=new Bs;Jr=new $s({recordCanvas:I,mutationCb:yn,win:window,blockClass:n,blockSelector:i,mirror:oe,sampling:v.canvas,dataURLOptions:b});let yt=new Ps({mutationCb:gt,scrollCb:gn,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:Se,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:I,inlineImages:D,sampling:v,slimDOMOptions:ce,iframeManager:Ee,stylesheetManager:Ce,canvasManager:Jr,keepIframeSrcFn:C,processedNodeManager:Dr},mirror:oe});qt=(T=false)=>{if(!E)return;G({type:R.Meta,data:{href:window.location.href,width:la(),height:aa()}},T),Ce.reset(),yt.init(),Ie.forEach(H=>H.lock());let ie=Hl(document,{mirror:oe,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:Se,maskTextFn:p,maskInputFn:m,slimDOM:ce,dataURLOptions:b,recordCanvas:I,inlineImages:D,onSerialize:H=>{fa(H,oe)&&Ee.addIframe(H),ha(H,oe)&&Ce.trackLinkElement(H),Ts(H)&&yt.addShadowRoot(x.shadowRoot(H),document);},onIframeLoad:(H,V)=>{Ee.attachIframe(H,V),yt.observeAttachShadow(H);},onStylesheetLoad:(H,V)=>{Ce.attachLinkElement(H,V);},keepIframeSrcFn:C});if(!ie)return console.warn("Failed to snapshot the document");G({type:R.FullSnapshot,data:{node:ie,initialOffset:oa(window)}},T),Ie.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document));};try{let T=[],ie=V=>{var te;return N(id)({mutationCb:gt,mousemoveCb:(k,Lr)=>G({type:R.IncrementalSnapshot,data:{source:Lr,positions:k}}),mouseInteractionCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.MouseInteraction,...k}}),scrollCb:gn,viewportResizeCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.ViewportResize,...k}}),inputCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.Input,...k}}),mediaInteractionCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.MediaInteraction,...k}}),styleSheetRuleCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.StyleSheetRule,...k}}),styleDeclarationCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.StyleDeclaration,...k}}),canvasMutationCb:yn,fontCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.Font,...k}}),selectionCb:k=>{G({type:R.IncrementalSnapshot,data:{source:M.Selection,...k}});},customElementCb:k=>{G({type:R.IncrementalSnapshot,data:{source:M.CustomElement,...k}});},blockClass:n,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:Se,inlineStylesheet:u,sampling:v,recordDOM:E,recordCanvas:I,inlineImages:D,userTriggeredOnInput:$,collectFonts:F,doc:V,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:C,blockSelector:i,slimDOMOptions:ce,dataURLOptions:b,mirror:oe,iframeManager:Ee,stylesheetManager:Ce,shadowDomManager:yt,processedNodeManager:Dr,canvasManager:Jr,ignoreCSSAttributes:ee,plugins:((te=J==null?void 0:J.filter(k=>k.observer))==null?void 0:te.map(k=>({observer:k.observer,options:k.options,callback:Lr=>G({type:R.Plugin,data:{plugin:k.name,payload:Lr}})})))||[]},h)};Ee.addLoadListener(V=>{try{T.push(ie(V.contentDocument));}catch(te){console.warn(te);}});let H=()=>{qt(),T.push(ie(document)),mr=!0;};return ["interactive","complete"].includes(document.readyState)?H():(T.push(K("DOMContentLoaded",()=>{G({type:R.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&H();})),T.push(K("load",()=>{G({type:R.Load,data:{}}),A==="load"&&H();},window))),()=>{T.forEach(V=>{try{V();}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te);}}),Dr.destroy(),mr=!1,jh();}}catch(T){console.warn(T);}}be.addCustomEvent=(s,e)=>{if(!mr)throw new Error("please add custom event after start recording");G({type:R.Custom,data:{tag:s,payload:e}});};be.freezePage=()=>{Ie.forEach(s=>s.freeze());};be.takeFullSnapshot=s=>{if(!mr)throw new Error("please take full snapshot after start recording");qt(s);};be.mirror=oe;var Ai;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped";})(Ai||(Ai={}));var pd="https://blocfeed.com/api/replay-events";function Ia(s){var J;if(!s.config.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=X();if(vt(e)%100/100>=s.config.sampling)return ()=>{};let r=Date.now(),n=(J=s.config.endpoint)!=null?J:pd,i=[],o=0,l=false,a=false,c=null,u=`bf_replay_chunkseq_${e}`,f=`bf_replay_pauses_${e}`,d=0,g=0;try{let C=sessionStorage.getItem(u);C&&(d=parseInt(C,10)||0);let ee=sessionStorage.getItem(f);ee&&(g=parseInt(ee,10)||0);}catch(C){}let m=(C=false)=>{if(i.length===0)return;let ee=C?gd(i):i;i=[],o=0;let ve=d++;try{sessionStorage.setItem(u,String(d));}catch(j){}yd({blocfeedId:s.blocfeedId,sessionId:e,sessionStartedAtMs:r,chunkSeq:ve,events:ee,endpoint:n,useBeacon:C,pauseCount:g});},p=setInterval(()=>{l||m();},s.config.flushIntervalMs),h=setTimeout(()=>{m(),D();},s.config.maxDurationMs),y=null,v=()=>{y&&clearTimeout(y),y=setTimeout(()=>{$();},s.config.inactivityTimeoutMs);},b=()=>{m(true);};window.addEventListener("pagehide",b);let S=s.config.masking,E={emit(C){l||(i.push(C),o+=md(C),v(),o>=s.config.flushSizeBytes&&m());},recordCanvas:false,sampling:{mousemove:50}};S.maskAllInputs!==void 0&&(E.maskAllInputs=S.maskAllInputs),S.maskTextSelector!==void 0&&(E.maskTextSelector=S.maskTextSelector),S.maskTextClass!==void 0&&(E.maskTextClass=S.maskTextClass),S.blockSelector!==void 0&&(E.blockSelector=S.blockSelector);let I=null,P=()=>{I&&(document.removeEventListener("pointerdown",I,true),document.removeEventListener("keydown",I,true),I=null);};function A(){var C;c=(C=be(E))!=null?C:null;}function $(){if(l||a)return;a=true,g++;try{sessionStorage.setItem(f,String(g));}catch(ee){}if(m(),c){try{c();}catch(ee){}c=null;}y&&(clearTimeout(y),y=null);let C=()=>{P(),F();};I=C,document.addEventListener("pointerdown",C,{capture:true,once:true}),document.addEventListener("keydown",C,{capture:true,once:true});}function F(){l||!a||(a=false,A(),v());}v(),A();function D(){if(!l&&(l=true,clearInterval(p),clearTimeout(h),y&&clearTimeout(y),P(),window.removeEventListener("pagehide",b),c)){try{c();}catch(C){}c=null;}}return D}function md(s){try{return JSON.stringify(s).length}catch(e){return 1024}}function gd(s){let t=JSON.stringify(s);if(t.length<=6e4)return s;let r=[...s];for(;r.length>1;)if(r.shift(),t=JSON.stringify(r),t.length<=6e4)return r;return r}async function yd(s){let e=JSON.stringify({blocfeed_id:s.blocfeedId,session_id:s.sessionId,session_started_at_ms:s.sessionStartedAtMs,chunk_seq:s.chunkSeq,pause_count:s.pauseCount,events:s.events,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:""});if(s.useBeacon&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=new Blob([e],{type:"application/json"});navigator.sendBeacon(s.endpoint,r);return}catch(r){}let t=!!s.useBeacon;try{await fetch(s.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:e,...t?{keepalive:!0}:{}});}catch(r){}}var bd={enabled:true,endpoint:null,maxDurationMs:144e5,flushIntervalMs:3e4,flushSizeBytes:1048576,inactivityTimeoutMs:18e5,sampling:1,masking:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}};function xa(s){var t,r,n,i,o,l,a,c;let e=bd;return {enabled:(t=s==null?void 0:s.enabled)!=null?t:e.enabled,endpoint:(r=s==null?void 0:s.endpoint)!=null?r:e.endpoint,maxDurationMs:(n=s==null?void 0:s.maxDurationMs)!=null?n:e.maxDurationMs,flushIntervalMs:(i=s==null?void 0:s.flushIntervalMs)!=null?i:e.flushIntervalMs,flushSizeBytes:(o=s==null?void 0:s.flushSizeBytes)!=null?o:e.flushSizeBytes,inactivityTimeoutMs:(l=s==null?void 0:s.inactivityTimeoutMs)!=null?l:e.inactivityTimeoutMs,sampling:(a=s==null?void 0:s.sampling)!=null?a:e.sampling,masking:{...e.masking,...(c=s==null?void 0:s.masking)!=null?c:{}}}}var wd="https://blocfeed.com/api/events/track",vd=5e3,Sd=50,Cd=1024,Ar="blocfeed-events-queue",Ma=500,Na=100,Ed=/^[a-z][a-z0-9_]{0,127}$/,Ra=50,Aa=1024,Ta;function un(s){Ta=s;}function Id(s){if(typeof s!="string"||!Ed.test(s))throw new Error(`[BlocFeed] track(): event_name "${s}" must match /^[a-z][a-z0-9_]{0,127}$/ (lowercase, start with a letter, only [a-z0-9_], \u2264128 chars).`)}function xd(s){if(s===void 0)return {};if(s===null||typeof s!="object"||Array.isArray(s))throw new Error("[BlocFeed] track(): properties must be a plain object.");let e=Object.keys(s);if(e.length>Ra)throw new Error(`[BlocFeed] track(): properties has ${e.length} keys, max ${Ra}.`);for(let r of e){let n=s[r];if(n!==null&&typeof n!="string"&&typeof n!="number"&&typeof n!="boolean")throw new Error(`[BlocFeed] track(): property "${r}" has unsupported type "${typeof n}". Allowed: string | number | boolean | null.`)}let t;try{t=JSON.stringify(s);}catch(r){throw new Error(`[BlocFeed] track(): properties is not JSON-serializable (${r.message}).`)}if(t.length>Aa)throw new Error(`[BlocFeed] track(): properties serialized to ${t.length} bytes, max ${Aa}. Server allows 8192 bytes \u2014 the client cap is defensive; trim down or split the event.`);return s}function fn(){if(typeof localStorage=="undefined")return [];try{let s=localStorage.getItem(Ar);if(!s)return [];let e=JSON.parse(s);return Array.isArray(e)?e:[]}catch(s){try{localStorage.removeItem(Ar);}catch(e){}return []}}function hn(s){if(typeof localStorage!="undefined")try{if(s.length===0)localStorage.removeItem(Ar);else {let e=s.length>Ma?s.slice(s.length-Ma):s;localStorage.setItem(Ar,JSON.stringify(e));}}catch(e){}}var ne=null;function Md(){if(ne)return ne;if(typeof window=="undefined")return null;let s=Nd();return s?(ne={blocfeedId:s,endpoint:wd,events:[],bytes:0,flushTimer:null,pageHideHandler:null,visibilityHandler:null},ne.flushTimer=setInterval(()=>{Rr(false);},vd),ne.pageHideHandler=()=>{Rr(true);},ne.visibilityHandler=()=>{document.visibilityState==="hidden"&&Rr(true);},window.addEventListener("pagehide",ne.pageHideHandler),document.addEventListener("visibilitychange",ne.visibilityHandler),ne):null}function Nd(){try{let e=window.__blocfeed_id__;return typeof e=="string"&&e.length>0?e:null}catch(s){return null}}function _a(s){try{window.__blocfeed_id__=s;}catch(e){}ne&&(ne.blocfeedId=s);}function dn(s,e,t){var f,d,g;Id(s);let r=xd(e),n=new Date().toISOString(),i={event_name:s,properties:r,occurred_at:n},o=(f=void 0)!=null?f:Ad();o&&(i.session_id=o);let l=(d=void 0)!=null?d:Ta;l&&(i.user_id=l);let a=(g=void 0)!=null?g:Td();a&&(i.page_url=a);let c=_d();c&&(i.user_agent=c);let u=Md();if(!u){let m=fn();m.push(i),hn(m);return}u.events.push(i),u.bytes+=Rd(i),(u.events.length>=Sd||u.bytes>=Cd)&&Rr(false);}async function Rr(s){let e=ne;if(!e)return;let r=fn().concat(e.events);if(e.events=[],e.bytes=0,hn([]),r.length!==0)for(let n=0;n<r.length;n+=Na){let i=r.slice(n,n+Na),o=JSON.stringify({blocfeed_id:e.blocfeedId,events:i});if(s&&kd())try{let l=new Blob([o],{type:"application/json"});navigator.sendBeacon(e.endpoint,l)||Nr(i);continue}catch(l){Nr(i);continue}try{(await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||Nr(i);}catch(l){Nr(i);}}}function Nr(s){let e=fn();hn(e.concat(s));}function Rd(s){try{return JSON.stringify(s).length}catch(e){return 256}}function Ad(){try{return X()}catch(s){return}}function Td(){try{return typeof window!="undefined"?window.location.href:void 0}catch(s){return}}function _d(){try{return typeof navigator!="undefined"?navigator.userAgent:void 0}catch(s){return}}function kd(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}var Dd="https://blocfeed.com/api/heartbeat",Ld=300*1e3;function Oa(s){var l,a,c;if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=(l=s.endpoint)!=null?l:Dd,t=(a=s.intervalMs)!=null?a:Ld,r=(c=s.features)!=null?c:["replay","behavioral","customEvents"],n=u=>{try{let f=JSON.stringify({blocfeed_id:s.blocfeedId,session_id:Pd(),version:s.version,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:"",sdk_features:r}),d={method:"POST",headers:{"Content-Type":"application/json"},body:f};u&&(d.keepalive=!0),fetch(e,d).catch(()=>{});}catch(f){}};try{n(!1);}catch(u){}let i=null;try{i=setInterval(()=>{try{n(!1);}catch(u){}},t);}catch(u){i=null;}let o=()=>{try{n(!0);}catch(u){}};try{window.addEventListener("pagehide",o);}catch(u){}return function(){try{i&&clearInterval(i);}catch(f){}i=null;try{window.removeEventListener("pagehide",o);}catch(f){}}}function Pd(){try{return X()}catch(s){return ""}}var Tr="0.21.0";var $d=5e3,_r=class{constructor(e){this.submitter=null;this.detectorUninstallers=[];this.flushTimer=null;this.pageHideHandler=null;this.installed=false;this.opts=e,this.resolved=bn(e.config);}install(){var l,a,c,u;if(this.installed||!this.resolved.enabled)return;let e=()=>{try{let f=X();return vt(f)%100/100<this.resolved.sampling}catch(f){return false}};if(!((l=this.opts.passiveSampler)!=null?l:e)())return;_a(this.opts.blocfeedId);let r=(a=this.opts.endpoint)!=null?a:"https://blocfeed.com/api/behavioral-events";this.submitter=(c=this.opts.submitter)!=null?c:wn({endpoint:r,blocfeedId:this.opts.blocfeedId});let n=f=>{var d;(d=this.submitter)==null||d.enqueue(f);};this.detectorUninstallers.push(xn(this.resolved,n)),this.detectorUninstallers.push(Rn(this.resolved,n)),this.detectorUninstallers.push(An(this.resolved,n)),this.detectorUninstallers.push(Tn(this.resolved,n)),this.detectorUninstallers.push(_n(this.resolved,n));let i=xa((u=this.opts.config)==null?void 0:u.sessionReplay);this.detectorUninstallers.push(Ia({blocfeedId:this.opts.blocfeedId,config:i}));let o=["behavioral","customEvents"];if(i.enabled&&o.unshift("replay"),this.opts.extraSdkFeatures)for(let f of this.opts.extraSdkFeatures)o.push(f);this.detectorUninstallers.push(Oa({blocfeedId:this.opts.blocfeedId,version:Tr,features:o})),this.flushTimer=setInterval(()=>{var f;(f=this.submitter)==null||f.flush();},$d),this.pageHideHandler=()=>{var f;(f=this.submitter)==null||f.flushBeacon();},typeof window!="undefined"&&window.addEventListener("pagehide",this.pageHideHandler),this.installed=true;}uninstall(){var e;if(this.installed){for(let t of [...this.detectorUninstallers].reverse())try{t();}catch(r){}this.detectorUninstallers=[],this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.pageHideHandler&&typeof window!="undefined"&&(window.removeEventListener("pagehide",this.pageHideHandler),this.pageHideHandler=null);try{(e=this.submitter)==null||e.flush();}catch(t){}this.submitter=null,this.installed=false;}}};var he=null;function ka(s){var e;he||((e=s.user)!=null&&e.id&&un(s.user.id),he=new _r({blocfeedId:s.blocfeed_id,...s.config!==void 0?{config:s.config}:{},extraSdkFeatures:["script-tag"]}),he.install());}function Fd(s,e){un(s);}function Bd(s,e){dn(s,e);}function Ud(){he&&(he.uninstall(),he=null);}var Wd={init:ka,identify:Fd,track:Bd,uninstall:Ud,SDK_VERSION:Tr};function zd(s){let e=(s!=null?s:"inputs").toLowerCase();return e==="none"?{maskAllInputs:false,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:e==="text"?{maskAllInputs:true,maskTextSelector:"*",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}}function Hd(s){var c,u;let e=s.blocfeedId;if(!e)return null;let t=parseFloat((c=s.sample)!=null?c:"1"),r=Number.isFinite(t)&&t>0?t:1,n=s.replay!=="false",i=s.signals!=="false",o=zd((u=s.mask)!=null?u:"inputs"),l={sampling:r,sessionReplay:{enabled:n,sampling:r,...o!==void 0?{masking:o}:{}},rageClick:{enabled:i},deadClick:{enabled:i},httpFail:{enabled:i},redirectLoop:{enabled:i},formDataLoss:{enabled:i}},a=s.userId||s.userEmail||s.userName?{...s.userId!==void 0?{id:s.userId}:{},...s.userEmail!==void 0?{email:s.userEmail}:{},...s.userName!==void 0?{name:s.userName}:{}}:void 0;return {blocfeedId:e,...a!==void 0?{user:a}:{},config:l,trackClicks:s.trackClicks==="true"}}var Vd=60;function Gd(){if(typeof document=="undefined")return ()=>{};let s=[],e=t=>{var o,l;let r=Date.now();if(s=s.filter(a=>r-a<6e4),s.length>=Vd)return;s.push(r);let n=t.target;if(!n||!(n instanceof Element))return;let i=null;try{i=(l=(o=n.innerText)==null?void 0:o.trim().slice(0,80))!=null?l:null;}catch(a){i=null;}try{dn("click",{tag:n.tagName.toLowerCase(),text:i||null,url:window.location.href});}catch(a){}};return document.addEventListener("click",e,{capture:true,passive:true}),()=>{try{document.removeEventListener("click",e,{capture:!0});}catch(t){}}}function Da(){if(typeof document=="undefined")return null;let s=document.currentScript;return s&&s.dataset&&s.dataset.blocfeedId?s:document.querySelector("script[data-blocfeed-id]")}function Or(){if(typeof window=="undefined"||typeof document=="undefined")return;let s=Da();if(!s)return;let e=Hd(s.dataset);if(!e){console.warn("[BlocFeed] script-tag init: data-blocfeed-id missing");return}ka({blocfeed_id:e.blocfeedId,...e.user!==void 0?{user:e.user}:{},config:e.config}),e.trackClicks&&Gd();}typeof window!="undefined"&&(window.BlocFeed=Wd,Da()?Or():typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Or,{once:true}):Or()));function Sm(){return he}function Cm(){he&&(he.uninstall(),he=null);}function Em(){Or();}/*! Bundled license information:
|
|
54
|
+
|
|
55
|
+
rrweb/dist/rrweb.js:
|
|
56
|
+
(*! *****************************************************************************
|
|
57
|
+
Copyright (c) Microsoft Corporation.
|
|
58
|
+
|
|
59
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
60
|
+
purpose with or without fee is hereby granted.
|
|
61
|
+
|
|
62
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
63
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
64
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
65
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
66
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
67
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
68
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
69
|
+
***************************************************************************** *)
|
|
70
|
+
*/exports.BlocFeed=Wd;exports.__autoInitForTesting=Em;exports.__getInstalledTrackerForTesting=Sm;exports.__resetForTesting=Cm;exports.parseMasking=zd;exports.parseScriptTagAttrs=Hd;return exports;})({});
|