blocfeed 0.21.0 → 0.23.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 +80 -0
- package/dist/{chunk-GJW5E4AF.js → chunk-NMH3WM6Y.js} +1 -1
- package/dist/{chunk-E3YSP5LQ.cjs → chunk-SJE73TVR.cjs} +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.d.cts +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/passive.cjs +1 -1
- package/dist/passive.js +1 -1
- package/dist/script.js +32 -31
- package/package.json +1 -1
package/dist/script.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
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+`
|
|
1
|
+
var BlocFeedScript=(function(exports){'use strict';var tc=Object.defineProperty;var pe=(r,e)=>()=>(r&&(e=r(r=0)),e);var rc=(r,e)=>{for(var t in e)tc(r,t,{get:e[t],enumerable:true});};function bl(r,e){if(r.match(/^[a-z]+:\/\//i))return r;if(r.match(/^\/\//))return window.location.protocol+r;if(r.match(/^[a-z]+:/i))return r;let t=document.implementation.createHTMLDocument(),n=t.createElement("base"),i=t.createElement("a");return t.head.appendChild(n),t.body.appendChild(i),e&&(n.href=e),i.href=r,i.href}function de(r){let e=[];for(let t=0,n=r.length;t<n;t++)e.push(r[t]);return e}function qr(r={}){return Qe||(r.includeStyleProperties?(Qe=r.includeStyleProperties,Qe):(Qe=de(window.getComputedStyle(document.documentElement)),Qe))}function Kr(r,e){let n=(r.ownerDocument.defaultView||window).getComputedStyle(r).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function sm(r){let e=Kr(r,"border-left-width"),t=Kr(r,"border-right-width");return r.clientWidth+e+t}function om(r){let e=Kr(r,"border-top-width"),t=Kr(r,"border-bottom-width");return r.clientHeight+e+t}function Qr(r,e={}){let t=e.width||sm(r),n=e.height||om(r);return {width:t,height:n}}function vl(){let r,e;try{e=process;}catch(n){}let t=e&&e.env?e.env.devicePixelRatio:null;return t&&(r=parseInt(t,10),Number.isNaN(r)&&(r=1)),r||window.devicePixelRatio||1}function Sl(r){(r.width>ie||r.height>ie)&&(r.width>ie&&r.height>ie?r.width>r.height?(r.height*=ie/r.width,r.width=ie):(r.width*=ie/r.height,r.height=ie):r.width>ie?(r.height*=ie/r.width,r.width=ie):(r.width*=ie/r.height,r.height=ie));}function Cl(r,e={}){return r.toBlob?new Promise(t=>{r.toBlob(t,e.type?e.type:"image/png",e.quality?e.quality:1);}):new Promise(t=>{let n=window.atob(r.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),i=n.length,s=new Uint8Array(i);for(let o=0;o<i;o+=1)s[o]=n.charCodeAt(o);t(new Blob([s],{type:e.type?e.type:"image/png"}));})}function et(r){return new Promise((e,t)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n));});},n.onerror=t,n.crossOrigin="anonymous",n.decoding="async",n.src=r;})}async function am(r){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(r)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function El(r,e,t){let n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${t}`),i.setAttribute("viewBox",`0 0 ${e} ${t}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(r),am(i)}var wl,Qe,ie,K,Le=pe(()=>{wl=(()=>{let r=0,e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return ()=>(r+=1,`u${e()}${r}`)})();Qe=null;ie=16384;K=(r,e)=>{if(r instanceof e)return true;let t=Object.getPrototypeOf(r);return t===null?false:t.constructor.name===e.name||K(t,e)};});function lm(r){let e=r.getPropertyValue("content");return `${r.cssText} content: '${e.replace(/'|"/g,"")}';`}function cm(r,e){return qr(e).map(t=>{let n=r.getPropertyValue(t),i=r.getPropertyPriority(t);return `${t}: ${n}${i?" !important":""};`}).join(" ")}function um(r,e,t,n){let i=`.${r}:${e}`,s=t.cssText?lm(t):cm(t,n);return document.createTextNode(`${i}{${s}}`)}function Il(r,e,t,n){let i=window.getComputedStyle(r,t),s=i.getPropertyValue("content");if(s===""||s==="none")return;let o=wl();try{e.className=`${e.className} ${o}`;}catch(a){return}let l=document.createElement("style");l.appendChild(um(o,t,i,n)),e.appendChild(l);}function xl(r,e,t){Il(r,e,":before",t),Il(r,e,":after",t);}var Rl=pe(()=>{Le();});function dm(r){let e=/\.([^./]*?)$/g.exec(r);return e?e[1]:""}function tt(r){let e=dm(r).toLowerCase();return fm[e]||""}var Ml,Tl,fm,en=pe(()=>{Ml="application/font-woff",Tl="image/jpeg",fm={woff:Ml,woff2:Ml,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Tl,jpeg:Tl,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};});function hm(r){return r.split(/,/)[1]}function Tt(r){return r.search(/^(data:)/)!==-1}function Ui(r,e){return `data:${e};base64,${r}`}async function Wi(r,e,t){let n=await fetch(r,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);let i=await n.blob();return new Promise((s,o)=>{let l=new FileReader;l.onerror=o,l.onloadend=()=>{try{s(t({res:n,result:l.result}));}catch(a){o(a);}},l.readAsDataURL(i);})}function pm(r,e,t){let n=r.replace(/\?.*/,"");return t&&(n=r),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function rt(r,e,t){let n=pm(r,e,t.includeQueryParams);if(Bi[n]!=null)return Bi[n];t.cacheBust&&(r+=(/\?/.test(r)?"&":"?")+new Date().getTime());let i;try{let s=await Wi(r,t.fetchRequestInit,({res:o,result:l})=>(e||(e=o.headers.get("Content-Type")||""),hm(l)));i=Ui(s,e);}catch(s){i=t.imagePlaceholder||"";let o=`Failed to fetch resource: ${r}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o);}return Bi[n]=i,i}var Bi,At=pe(()=>{Bi={};});async function mm(r){let e=r.toDataURL();return e==="data:,"?r.cloneNode(false):et(e)}async function gm(r,e){if(r.currentSrc){let s=document.createElement("canvas"),o=s.getContext("2d");s.width=r.clientWidth,s.height=r.clientHeight,o==null||o.drawImage(r,0,0,s.width,s.height);let l=s.toDataURL();return et(l)}let t=r.poster,n=tt(t),i=await rt(t,n,e);return et(i)}async function ym(r,e){var t;try{if(!((t=r==null?void 0:r.contentDocument)===null||t===void 0)&&t.body)return await kt(r.contentDocument.body,e,!0)}catch(n){}return r.cloneNode(false)}async function bm(r,e){return K(r,HTMLCanvasElement)?mm(r):K(r,HTMLVideoElement)?gm(r,e):K(r,HTMLIFrameElement)?ym(r,e):r.cloneNode(Al(r))}async function vm(r,e,t){var n,i;if(Al(e))return e;let s=[];return wm(r)&&r.assignedNodes?s=de(r.assignedNodes()):K(r,HTMLIFrameElement)&&(!((n=r.contentDocument)===null||n===void 0)&&n.body)?s=de(r.contentDocument.body.childNodes):s=de(((i=r.shadowRoot)!==null&&i!==void 0?i:r).childNodes),s.length===0||K(r,HTMLVideoElement)||await s.reduce((o,l)=>o.then(()=>kt(l,t)).then(a=>{a&&e.appendChild(a);}),Promise.resolve()),e}function Sm(r,e,t){let n=e.style;if(!n)return;let i=window.getComputedStyle(r);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):qr(t).forEach(s=>{let o=i.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),K(r,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(s,o,i.getPropertyPriority(s));});}function Cm(r,e){K(r,HTMLTextAreaElement)&&(e.innerHTML=r.value),K(r,HTMLInputElement)&&e.setAttribute("value",r.value);}function Em(r,e){if(K(r,HTMLSelectElement)){let n=Array.from(e.children).find(i=>r.value===i.getAttribute("value"));n&&n.setAttribute("selected","");}}function Im(r,e,t){return K(e,Element)&&(Sm(r,e,t),xl(r,e,t),Cm(r,e),Em(r,e)),e}async function xm(r,e){let t=r.querySelectorAll?r.querySelectorAll("use"):[];if(t.length===0)return r;let n={};for(let s=0;s<t.length;s++){let l=t[s].getAttribute("xlink:href");if(l){let a=r.querySelector(l),c=document.querySelector(l);!a&&c&&!n[l]&&(n[l]=await kt(c,e,true));}}let i=Object.values(n);if(i.length){let s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";let l=document.createElementNS(s,"defs");o.appendChild(l);for(let a=0;a<i.length;a++)l.appendChild(i[a]);r.appendChild(o);}return r}async function kt(r,e,t){return !t&&e.filter&&!e.filter(r)?null:Promise.resolve(r).then(n=>bm(n,e)).then(n=>vm(r,n,e)).then(n=>Im(r,n,e)).then(n=>xm(n,e))}var wm,Al,kl=pe(()=>{Rl();Le();en();At();wm=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SLOT",Al=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SVG";});function Tm(r){let e=r.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function Am(r){let e=[];return r.replace(Nl,(t,n,i)=>(e.push(i),t)),e.filter(t=>!Tt(t))}async function km(r,e,t,n,i){try{let s=t?bl(e,t):e,o=tt(e),l;if(i);else l=await rt(s,o,n);return r.replace(Tm(e),`$1${l}$3`)}catch(s){}return r}function Nm(r,{preferredFontFormat:e}){return e?r.replace(Mm,t=>{for(;;){let[n,,i]=Rm.exec(t)||[];if(!i)return "";if(i===e)return `src: ${n};`}}):r}function Hi(r){return r.search(Nl)!==-1}async function tn(r,e,t){if(!Hi(r))return r;let n=Nm(r,t);return Am(n).reduce((s,o)=>s.then(l=>km(l,o,e,t)),Promise.resolve(n))}var Nl,Rm,Mm,zi=pe(()=>{Le();en();At();Nl=/url\((['"]?)([^'"]+?)\1\)/g,Rm=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Mm=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;});async function nt(r,e,t){var n;let i=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(r);if(i){let s=await tn(i,null,t);return e.style.setProperty(r,s,e.style.getPropertyPriority(r)),true}return false}async function _m(r,e){await nt("background",r,e)||await nt("background-image",r,e),await nt("mask",r,e)||await nt("-webkit-mask",r,e)||await nt("mask-image",r,e)||await nt("-webkit-mask-image",r,e);}async function Om(r,e){let t=K(r,HTMLImageElement);if(!(t&&!Tt(r.src))&&!(K(r,SVGImageElement)&&!Tt(r.href.baseVal)))return;let n=t?r.src:r.href.baseVal,i=await rt(n,tt(n),e);await new Promise((s,o)=>{r.onload=s,r.onerror=e.onImageErrorHandler?(...a)=>{try{s(e.onImageErrorHandler(...a));}catch(c){o(c);}}:o;let l=r;l.decode&&(l.decode=s),l.loading==="lazy"&&(l.loading="eager"),t?(r.srcset="",r.src=i):r.href.baseVal=i;});}async function Dm(r,e){let n=de(r.childNodes).map(i=>Vi(i,e));await Promise.all(n).then(()=>r);}async function Vi(r,e){K(r,Element)&&(await _m(r,e),await Om(r,e),await Dm(r,e));}var _l=pe(()=>{zi();Le();At();en();});function Ol(r,e){let{style:t}=r;e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.width&&(t.width=`${e.width}px`),e.height&&(t.height=`${e.height}px`);let n=e.style;return n!=null&&Object.keys(n).forEach(i=>{t[i]=n[i];}),r}var Dl=pe(()=>{});async function Pl(r){let e=Ll[r];if(e!=null)return e;let n=await(await fetch(r)).text();return e={url:r,cssText:n},Ll[r]=e,e}async function Fl(r,e){let t=r.cssText,n=/url\(["']?([^"')]+)["']?\)/g,s=(t.match(/url\([^)]+\)/g)||[]).map(async o=>{let l=o.replace(n,"$1");return l.startsWith("https://")||(l=new URL(l,r.url).href),Wi(l,e.fetchRequestInit,({result:a})=>(t=t.replace(o,`url(${a})`),[o,a]))});return Promise.all(s).then(()=>t)}function $l(r){if(r==null)return [];let e=[],t=/(\/\*[\s\S]*?\*\/)/gi,n=r.replace(t,""),i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=i.exec(n);if(a===null)break;e.push(a[0]);}n=n.replace(i,"");let s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(o,"gi");for(;;){let a=s.exec(n);if(a===null){if(a=l.exec(n),a===null)break;s.lastIndex=l.lastIndex;}else l.lastIndex=s.lastIndex;e.push(a[0]);}return e}async function Lm(r,e){let t=[],n=[];return r.forEach(i=>{if("cssRules"in i)try{de(i.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let l=o+1,a=s.href,c=Pl(a).then(u=>Fl(u,e)).then(u=>$l(u).forEach(f=>{try{i.insertRule(f,f.startsWith("@import")?l+=1:i.cssRules.length);}catch(d){console.error("Error inserting rule from remote css",{rule:f,error:d});}})).catch(u=>{console.error("Error loading remote css",u.toString());});n.push(c);}});}catch(s){let o=r.find(l=>l.href==null)||document.styleSheets[0];i.href!=null&&n.push(Pl(i.href).then(l=>Fl(l,e)).then(l=>$l(l).forEach(a=>{o.insertRule(a,o.cssRules.length);})).catch(l=>{console.error("Error loading remote stylesheet",l);})),console.error("Error inlining remote css file",s);}}),Promise.all(n).then(()=>(r.forEach(i=>{if("cssRules"in i)try{de(i.cssRules||[]).forEach(s=>{t.push(s);});}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s);}}),t))}function Pm(r){return r.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>Hi(e.style.getPropertyValue("src")))}async function Fm(r,e){if(r.ownerDocument==null)throw new Error("Provided element is not within a Document");let t=de(r.ownerDocument.styleSheets),n=await Lm(t,e);return Pm(n)}function Bl(r){return r.trim().replace(/["']/g,"")}function $m(r){let e=new Set;function t(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{e.add(Bl(s));}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&t(s);});}return t(r),e}async function Gi(r,e){let t=await Fm(r,e),n=$m(r);return (await Promise.all(t.filter(s=>n.has(Bl(s.style.fontFamily))).map(s=>{let o=s.parentStyleSheet?s.parentStyleSheet.href:null;return tn(s.cssText,o,e)}))).join(`
|
|
2
|
+
`)}async function Ul(r,e){let t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Gi(r,e);if(t){let n=document.createElement("style"),i=document.createTextNode(t);n.appendChild(i),r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n);}}var Ll,Wl=pe(()=>{Le();At();zi();Ll={};});var zl={};rc(zl,{getFontEmbedCSS:()=>zm,toBlob:()=>Hm,toCanvas:()=>Nt,toJpeg:()=>Wm,toPixelData:()=>Bm,toPng:()=>Um,toSvg:()=>Hl});async function Hl(r,e={}){let{width:t,height:n}=Qr(r,e),i=await kt(r,e,true);return await Ul(i,e),await Vi(i,e),Ol(i,e),await El(i,t,n)}async function Nt(r,e={}){let{width:t,height:n}=Qr(r,e),i=await Hl(r,e),s=await et(i),o=document.createElement("canvas"),l=o.getContext("2d"),a=e.pixelRatio||vl(),c=e.canvasWidth||t,u=e.canvasHeight||n;return o.width=c*a,o.height=u*a,e.skipAutoScale||Sl(o),o.style.width=`${c}`,o.style.height=`${u}`,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(s,0,0,o.width,o.height),o}async function Bm(r,e={}){let{width:t,height:n}=Qr(r,e);return (await Nt(r,e)).getContext("2d").getImageData(0,0,t,n).data}async function Um(r,e={}){return (await Nt(r,e)).toDataURL()}async function Wm(r,e={}){return (await Nt(r,e)).toDataURL("image/jpeg",e.quality||1)}async function Hm(r,e={}){let t=await Nt(r,e);return await Cl(t)}async function zm(r,e={}){return Gi(r,e)}var Vl=pe(()=>{kl();_l();Dl();Wl();Le();});var nc={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 ns(r){var t,n,i,s,o,l,a,c;let e=nc;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,sampling:(n=r==null?void 0:r.sampling)!=null?n:e.sampling,ignoreSelectors:(i=r==null?void 0:r.ignoreSelectors)!=null?i:e.ignoreSelectors,rageClick:{...e.rageClick,...(s=r==null?void 0:r.rageClick)!=null?s:{}},httpFail:{...e.httpFail,...(o=r==null?void 0:r.httpFail)!=null?o:{}},redirectLoop:{...e.redirectLoop,...(l=r==null?void 0:r.redirectLoop)!=null?l:{}},formDataLoss:{...e.formDataLoss,...(a=r==null?void 0:r.formDataLoss)!=null?a:{}},deadClick:{...e.deadClick,...(c=r==null?void 0:r.deadClick)!=null?c:{}}}}function is(r){let e=[];async function t(){if(e.length===0)return;let i=e.splice(0,50);try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-blocfeed-id":r.blocfeedId},body:JSON.stringify({events:i}),keepalive:!0});}catch(s){}}function n(){if(e.length===0)return;if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function"){t();return}let i=e.splice(0,50),s=new Blob([JSON.stringify({events:i})],{type:"application/json"}),o=`${r.endpoint}?_bfid=${encodeURIComponent(r.blocfeedId)}`;try{navigator.sendBeacon(o,s);}catch(l){}}return {enqueue(i){e.push(i);},flush:t,flushBeacon:n,size(){return e.length}}}function ss(r){let e=globalThis.CSS;return typeof(e==null?void 0:e.escape)=="function"?e.escape(r):r.replace(/[^a-zA-Z0-9_-]/g,t=>{let n=t.codePointAt(0);return n===void 0?"":`\\${n.toString(16)} `})}function ic(r){return r.replace(/\s+/g," ").trim()}function Pe(r,e=140){let t=r.textContent;if(!t)return;let n=ic(t);if(n)return n.length<=e?n:`${n.slice(0,e-1)}\u2026`}function sc(r){let e=1;for(let t=r.previousElementSibling;t;t=t.previousElementSibling)t.tagName===r.tagName&&(e+=1);return e}var os=["data-testid","data-test-id","data-test","data-qa","data-cy"],cn="data-blocfeed-component";function it(r){let e=r.closest(`[${cn}]`);if(!e)return;let t=e.getAttribute(cn),n=t==null?void 0:t.trim();return n||void 0}function Fe(r,e=5){let t=[],n=r,i=0;for(;n&&i<e*4;){let s=it(n);if(s&&t[t.length-1]!==s&&(t.push(s),t.length>=e))break;n=n.parentElement,i++;}return t}function $e(r,e=4){let t=r,n=0;for(;t&&n<e;){let i=t.getAttribute(cn),s=i==null?void 0:i.trim();if(s)return `bf:component:${s}`;for(let a of os){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,n+=1;}return null}function oc(r){let e=r.tagName.toLowerCase(),t=r.getAttribute("id");if(t)return `#${ss(t)}`;for(let n of os){let i=r.getAttribute(n);if(i)return `${e}[${n}="${ss(i)}"]`}return `${e}:nth-of-type(${sc(r)})`}function Be(r,e=10){let t=[],n=r;for(;n&&t.length<e;){let i=oc(n);if(t.unshift(i),i.startsWith("#"))break;n=n.parentElement;}return t.join(" > ")}var ac=new Set(["button","link","tab","menuitem"]);function as(r){var t;if(r.tagName==="BUTTON")return r.disabled?null:"button";if(r.tagName==="A"||r.tagName==="a"){let n=(t=r.getAttribute("href"))==null?void 0:t.trim();return !n||n==="#"||n.toLowerCase().startsWith("javascript:")?null:"link"}let e=r.getAttribute("role");if(e&&ac.has(e))return "role";try{if(window.getComputedStyle(r).cursor==="pointer")return "cursor_pointer"}catch(n){}return null}function Pt(r,e){if(e.length===0)return false;for(let t of e)try{if(r.matches(t)||r.closest(t))return !0}catch(n){}return false}var ls="bf_behavioral_session",Ft=null;function Y(){try{let r=sessionStorage.getItem(ls);if(r)return r;let e=cs();return sessionStorage.setItem(ls,e),e}catch(r){return Ft||(Ft=cs(),Ft)}}function cs(){let r=Math.random().toString(36).slice(2,10).padEnd(8,"0");return `bf_${Date.now()}_${r}`}function $t(r){let e=0;for(let t=0;t<r.length;t++)e=e*31+r.charCodeAt(t)|0;return Math.abs(e)}function us(r,e){if(!r.rageClick.enabled)return ()=>{};let{threshold:t,windowMs:n,streakIdleMs:i}=r.rageClick,s=new Map;function o(f){var b,S;let d=f.target,g=d?lc(d):false,m=d&&(b=Pe(d,200))!=null?b:null,p=d?d.tagName.toLowerCase():"",h=d&&d.id||null,y=d&&(S=it(d))!=null?S:null,w=d?Fe(d,5):[];return {session_id:Y(),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:n,final:true,...g?{disabled:true}:{},tag_name:p,...h?{element_id:h}:{},...y?{component_name:y}:{},...w.length>0?{parent_components:w}:{}},created_at:new Date().toISOString(),stable_key:f.stableKey}}function l(f){let d=s.get(f);d&&(d.idleTimer&&(clearTimeout(d.idleTimer),d.idleTimer=null),d.reached&&e(o(d)),s.delete(f));}function a(f){let d=s.get(f);d&&(d.idleTimer&&clearTimeout(d.idleTimer),d.idleTimer=setTimeout(()=>{l(f);},i));}function c(f){try{let d=f.target;if(!d||!(d instanceof Element)||Pt(d,r.ignoreSelectors))return;let g=Be(d,4);if(!g)return;let m=$e(d),p=m!=null?m:g,h=Date.now(),y=s.get(p);y?(y.target=d,y.selector=g):(y={selector:g,stableKey:m,timestamps:[],reached:!1,idleTimer:null,target:d},s.set(p,y)),y.reached||(y.timestamps=y.timestamps.filter(w=>h-w<=n)),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(s.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 s.values())f.idleTimer&&clearTimeout(f.idleTimer);s.clear();}}function lc(r){if(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true")return true;try{if(window.getComputedStyle(r).pointerEvents==="none")return !0}catch(e){}return false}var fs=0,ds=null,Ut=null,Wt=[],cc=1500;function uc(){function r(e){var t;try{let n=e.target;if(!n)return;let i=n.closest('button[type="submit"], input[type="submit"], [data-blocfeed-submit]');if(!i)return;fs=Date.now();let s=i.closest("form");ds=(s?Be(s,3):"")||null,Ut=(t=Pe(i,100))!=null?t:null,Wt=Fe(i,5);}catch(n){}}return document.addEventListener("click",r,{capture:true,passive:true}),()=>document.removeEventListener("click",r,{capture:true})}function hs(r,e){if(!r.httpFail.enabled)return ()=>{};let{statusCodes:t,ignoreUrls:n,treatJsonErrorAsFail:i}=r.httpFail,s=new Set(t),o=uc(),l=globalThis.fetch,a=async(d,g)=>{var y,w,b;let m=typeof d=="string"?d:d instanceof URL?d.toString():d.url,p=((w=(y=g==null?void 0:g.method)!=null?y:d.method)!=null?w:"GET").toUpperCase(),h;try{h=await l.call(globalThis,d,g);}catch(S){try{if(!Bt(m,n)){let E=S&&typeof S=="object"&&S.name==="AbortError"?"abort":"network";e(f(0,m,p,E));}}catch(E){}throw S}try{if(!Bt(m,n)&&s.has(h.status))e(f(h.status,m,p));else if(i&&!Bt(m,n)&&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(fc(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";!Bt(h,n)&&s.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(),Ut=null,Wt=[];};function f(d,g,m,p){let y=Date.now()-fs<cc;return {session_id:Y(),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?ds:null,...y&&Ut?{button_text:Ut}:{},...y&&Wt.length>0?{parent_components:Wt}:{}},created_at:new Date().toISOString(),stable_key:null}}}function fc(r){if(!r||typeof r!="object")return false;let e=r;return e.ok===false||e.success===false||"error"in e&&e.error!=null&&e.error!==false}function Bt(r,e){if(e.length===0)return false;for(let t of e)if(r.includes(t))return true;return false}var dc=3e4;function ps(r,e){if(!r.redirectLoop.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{threshold:t,windowMs:n}=r.redirectLoop,i=new Map,s=new Map,o=history.pushState,l=history.replaceState;function a(u){var f,d;try{let g=Date.now(),m=(f=s.get(u))!=null?f:0;if(g<m)return;let h=((d=i.get(u))!=null?d:[]).filter(y=>g-y<=n);if(h.push(g),i.set(u,h),h.length>=t){let y={session_id:Y(),event_type:"thrashing",page_url:window.location.href,selector:null,element_text:null,event_data:{count:h.length,url:u,window_ms:n},created_at:new Date().toISOString(),stable_key:null};e(y),s.set(u,g+dc),i.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 hc=6e4;function ms(r,e){if(!r.formDataLoss.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let t=new Set,n=new Map,i=new Map,s=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 n.values())p+=h;return p}function a(p){t.delete(p),n.delete(p),s.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 w=o(y);if(!w)return;t.add(w),n.set(w,((h=n.get(w))!=null?h:0)+1);let b=y.closest("form");b&&s.set(w,b);}catch(y){}}function u(p){try{let h=p.target;if(!h||!(h instanceof HTMLFormElement))return;let y=h.id?`#${h.id}`:"form";i.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,w=y&&(I=s.get(y))!=null?I:null,b=w?$e(w):null,S={session_id:Y(),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 i)if(h-y<hc)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 pc(){let r={urlChangeCount:0,networkCount:0,filePickerCount:0,uninstall:()=>{}},e=history.pushState,t=history.replaceState;history.pushState=function(...l){return r.urlChangeCount+=1,e.apply(this,l)},history.replaceState=function(...l){return r.urlChangeCount+=1,t.apply(this,l)};let n=()=>{r.urlChangeCount+=1;};window.addEventListener("popstate",n);let i=globalThis.fetch;if(i){let l=(a,c)=>(r.networkCount+=1,i.call(globalThis,a,c));globalThis.fetch=l;}let s=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(l,a,...c){return r.networkCount+=1,s.call(this,l,a,...c)};let o=HTMLInputElement.prototype.click;return HTMLInputElement.prototype.click=function(){return this.type==="file"&&(r.filePickerCount+=1),o.call(this)},r.uninstall=()=>{history.pushState=e,history.replaceState=t,window.removeEventListener("popstate",n),i&&(globalThis.fetch=i),XMLHttpRequest.prototype.open=s,HTMLInputElement.prototype.click=o;},r}function gs(r,e){if(!r.deadClick.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{observationWindowMs:t,rateLimitPerSelector:n}=r.deadClick,i=new Map,s=pc();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||Pt(u,r.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=as(u);if(!f)return;let d=Be(u,4);if(!d)return;let g=$e(u),m=g!=null?g:d,p=s.urlChangeCount,h=s.networkCount,y=s.filePickerCount,w=new Date().toISOString(),b=(a=Pe(u,200))!=null?a:null,S=u.tagName.toLowerCase(),E=u.id||null,I=(c=it(u))!=null?c:null,P=Fe(u,5),A=mc(u),F=0,$=null;if(A){$=new MutationObserver(()=>{F+=1;});try{$.observe(A,{childList:!0,attributes:!0,characterData:!0,subtree:!0});}catch(D){$=null;}}setTimeout(()=>{var C;if($)try{$.disconnect();}catch(re){}if(F>0||s.urlChangeCount!==p||s.networkCount!==h||s.filePickerCount!==y)return;let D=(C=i.get(m))!=null?C:0;if(D>=n)return;i.set(m,D+1);let q={session_id:Y(),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:w,stable_key:g};e(q);},t);}catch(u){}}return document.addEventListener("click",o,{capture:true,passive:true}),()=>{document.removeEventListener("click",o,{capture:true}),s.uninstall();}}function mc(r){let e=r.closest('button, a, form, [role="button"]');return e||r.parentElement}var gc=Object.defineProperty,yc=(r,e,t)=>e in r?gc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,v=(r,e,t)=>yc(r,typeof e!="symbol"?e+"":e,t),ys,bc=Object.defineProperty,wc=(r,e,t)=>e in r?bc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,bs=(r,e,t)=>wc(r,typeof e!="symbol"?e+"":e,t),Z=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(Z||{}),ws={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ht={},vc=()=>!!globalThis.Zone;function hi(r){if(Ht[r])return Ht[r];let e=globalThis[r],t=e.prototype,n=r in ws?ws[r]:void 0,i=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),s=r in vs?vs[r]:void 0,o=!!(s&&s.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!vc())return Ht[r]=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[r].prototype;return document.body.removeChild(l),c?Ht[r]=c:t}catch(l){return t}}var un={};function ve(r,e,t){var n;let i=`${r}.${String(t)}`;if(un[i])return un[i].call(e);let s=hi(r),o=(n=Object.getOwnPropertyDescriptor(s,t))==null?void 0:n.get;return o?(un[i]=o,o.call(e)):e[t]}var fn={};function go(r,e,t){let n=`${r}.${String(t)}`;if(fn[n])return fn[n].bind(e);let s=hi(r)[t];return typeof s!="function"?e[t]:(fn[n]=s,s.bind(e))}function Sc(r){return ve("Node",r,"ownerDocument")}function Cc(r){return ve("Node",r,"childNodes")}function Ec(r){return ve("Node",r,"parentNode")}function Ic(r){return ve("Node",r,"parentElement")}function xc(r){return ve("Node",r,"textContent")}function Rc(r,e){return go("Node",r,"contains")(e)}function Mc(r){return go("Node",r,"getRootNode")()}function Tc(r){return !r||!("host"in r)?null:ve("ShadowRoot",r,"host")}function Ac(r){return r.styleSheets}function kc(r){return !r||!("shadowRoot"in r)?null:ve("Element",r,"shadowRoot")}function Nc(r,e){return ve("Element",r,"querySelector")(e)}function _c(r,e){return ve("Element",r,"querySelectorAll")(e)}function Oc(){return hi("MutationObserver").constructor}function Dc(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n;}}catch(n){return ()=>{}}}var J={ownerDocument:Sc,childNodes:Cc,parentNode:Ec,parentElement:Ic,textContent:xc,contains:Rc,getRootNode:Mc,host:Tc,styleSheets:Ac,shadowRoot:kc,querySelector:Nc,querySelectorAll:_c,mutationObserver:Oc,patch:Dc};function yo(r){return r.nodeType===r.ELEMENT_NODE}function ut(r){let e=r&&"host"in r&&"mode"in r&&J.host(r)||null;return !!(e&&"shadowRoot"in e&&J.shadowRoot(e)===r)}function ft(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function Lc(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function Pc(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function In(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&(t=r.ownerNode.baseURI);let n=Array.from(e,i=>bo(i,t)).join("");return Lc(n)}catch(e){return null}}function bo(r,e){if($c(r)){let t;try{t=In(r.styleSheet)||Pc(r);}catch(n){t=r.cssText;}return r.styleSheet.href?vr(t,r.styleSheet.href):t}else {let t=r.cssText;return Bc(r)&&r.selectorText.includes(":")&&(t=Fc(t)),e?vr(t,e):t}}function Fc(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function $c(r){return "styleSheet"in r}function Bc(r){return "selectorText"in r}var yr=class{constructor(){bs(this,"idNodeMap",new Map),bs(this,"nodeMetaMap",new WeakMap);}getId(e){var t;if(!e)return -1;let n=(t=this.getMeta(e))==null?void 0:t.id;return n!=null?n:-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(n=>this.removeNodeFromMap(n));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t);}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function Uc(){return new yr}function br({element:r,maskInputOptions:e,tagName:t,type:n,value:i,maskInputFn:s}){let o=i||"",l=n&&Ne(n);return (e[t.toLowerCase()]||l&&e[l])&&(s?o=s(o,r):o="*".repeat(o.length)),o}function Ne(r){return r.toLowerCase()}var Ss="__rrweb_original__";function Wc(r){let e=r.getContext("2d");if(!e)return true;let t=50;for(let n=0;n<r.width;n+=t)for(let i=0;i<r.height;i+=t){let s=e.getImageData,o=Ss in s?s[Ss]:s;if(new Uint32Array(o.call(e,n,i,Math.min(t,r.width-n),Math.min(t,r.height-i)).data.buffer).some(a=>a!==0))return false}return true}function wr(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?Ne(e):null}function wo(r,e){var s;let t;try{t=new URL(r,e!=null?e:window.location.href);}catch(o){return null}let n=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(n);return (s=i==null?void 0:i[1])!=null?s:null}function Hc(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}var zc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Vc=/^(?:[a-z+]+:)?\/\//i,Gc=/^www\..*/i,jc=/^(data:)([^,]*),(.*)/i;function vr(r,e){return (r||"").replace(zc,(t,n,i,s,o,l)=>{let a=i||o||l,c=n||s||"";if(!a)return t;if(Vc.test(a)||Gc.test(a))return `url(${c}${a}${c})`;if(jc.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${Hc(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 zt(r,e=false){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Yc(r,e,t=false){let n=Array.from(e.childNodes),i=[],s=0;if(n.length>1&&r&&typeof r=="string"){let o=zt(r,t),l=o.length/r.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&typeof n[a].textContent=="string"){let c=zt(n[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]===""&&n[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 i.push(r),i;f=u+1;}else f===c.length-1&&(m=o.indexOf(d));if(g.length>=2&&f>u){let p=n[a-1].textContent;if(p&&typeof p=="string"){let h=zt(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<r.length;){if(s+=1,s>50*n.length)return i.push(r),i;let h=zt(r.substring(0,p),t);if(h.length===m){i.push(r.substring(0,p)),r=r.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 i.push(r),i}function Xc(r,e){return Yc(r,e).join("/* rr_split */")}var Zc=1,Jc=new RegExp("[^a-z0-9-_:]"),ht=-2;function vo(){return Zc++}function Kc(r){if(r instanceof HTMLFormElement)return "form";let e=Ne(r.tagName);return Jc.test(e)?"div":e}var Ue,Cs,qc=/^[^ \t\n\r\u000c]+/,Qc=/^[, \t\n\r\u000c]+/;function eu(r,e){if(e.trim()==="")return e;let t=0;function n(s){let o,l=s.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;n(Qc),!(t>=e.length);){let s=n(qc);if(s.slice(-1)===",")s=ze(r,s.substring(0,s.length-1)),i.push(s);else {let o="";s=ze(r,s);let l=false;for(;;){let a=e.charAt(t);if(a===""){i.push((s+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,i.push((s+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return i.join(", ")}var Es=new WeakMap;function ze(r,e){return !e||e.trim()===""?e:pi(r,e)}function tu(r){return !!(r.tagName==="svg"||r.ownerSVGElement)}function pi(r,e){let t=Es.get(r);if(t||(t=r.createElement("a"),Es.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function So(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?ze(r,n):t==="srcset"?eu(r,n):t==="style"?vr(n,pi(r)):e==="object"&&t==="data"?ze(r,n):n)}function Co(r,e,t){return ["video","audio"].includes(r)&&e==="autoplay"}function ru(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return !0}else for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return !0}if(t)return r.matches(t)}catch(n){}return false}function Sr(r,e,t){if(!r)return false;if(r.nodeType!==r.ELEMENT_NODE)return t?Sr(J.parentNode(r),e,t):false;for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return true}return t?Sr(J.parentNode(r),e,t):false}function Eo(r,e,t,n){let i;if(yo(r)){if(i=r,!J.childNodes(i).length)return false}else {if(J.parentElement(r)===null)return false;i=J.parentElement(r);}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return !0}else if(i.classList.contains(e))return !0}else if(Sr(i,e,n))return !0;if(t){if(n){if(i.closest(t))return !0}else if(i.matches(t))return !0}}catch(s){}return false}function nu(r,e,t){let n=r.contentWindow;if(!n)return;let i=false,s;try{s=n.document.readyState;}catch(l){return}if(s!=="complete"){let l=setTimeout(()=>{i||(e(),i=true);},t);r.addEventListener("load",()=>{clearTimeout(l),i=true,e();});return}let o="about:blank";if(n.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e);}function iu(r,e,t){let n=false,i;try{i=r.sheet;}catch(o){return}if(i)return;let s=setTimeout(()=>{n||(e(),n=true);},t);r.addEventListener("load",()=>{clearTimeout(s),n=true,e();});}function su(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:s,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=ou(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:Z.Document,childNodes:[],compatMode:r.compatMode}:{type:Z.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return {type:Z.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:y};case r.ELEMENT_NODE:return lu(r,{doc:t,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:d,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case r.TEXT_NODE:return au(r,{doc:t,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:h});case r.CDATA_SECTION_NODE:return {type:Z.CDATA,textContent:"",rootId:y};case r.COMMENT_NODE:return {type:Z.Comment,textContent:J.textContent(r)||"",rootId:y};default:return false}}function ou(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}function au(r,e){let{needsMask:t,maskTextFn:n,rootId:i,cssCaptured:s}=e,o=J.parentNode(r),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":s||(a=J.textContent(r),c&&a&&(a=vr(a,pi(e.doc)))),!c&&!u&&a&&t&&(a=n?n(a,J.parentElement(r)):a.replace(/[\S]/g,"*")),{type:Z.Text,textContent:a||"",rootId:i}}function lu(r,e){let{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:d=false,rootId:g}=e,m=ru(r,n,i),p=Kc(r),h={},y=r.attributes.length;for(let b=0;b<y;b++){let S=r.attributes[b];Co(p,S.name,S.value)||(h[S.name]=So(t,p,Ne(S.name),S.value));}if(p==="link"&&s){let b=Array.from(t.styleSheets).find(E=>E.href===r.href),S=null;b&&(S=In(b)),S&&(delete h.rel,delete h.href,h._cssText=S);}if(p==="style"&&r.sheet){let b=In(r.sheet);b&&(r.childNodes.length>1&&(b=Xc(b,r)),h._cssText=b);}if(["input","textarea","select"].includes(p)){let b=r.value,S=r.checked;h.type!=="radio"&&h.type!=="checkbox"&&h.type!=="submit"&&h.type!=="button"&&b?h.value=br({element:r,type:wr(r),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):S&&(h.checked=S);}if(p==="option"&&(r.selected&&!o.select?h.selected=true:delete h.selected),p==="dialog"&&r.open&&(h.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){if(r.__context==="2d")Wc(r)||(h.rr_dataURL=r.toDataURL(a.type,a.quality));else if(!("__context"in r)){let b=r.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=r.width,S.height=r.height;let E=S.toDataURL(a.type,a.quality);b!==E&&(h.rr_dataURL=b);}}if(p==="img"&&c){Ue||(Ue=t.createElement("canvas"),Cs=Ue.getContext("2d"));let b=r,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,I=()=>{b.removeEventListener("load",I);try{Ue.width=b.naturalWidth,Ue.height=b.naturalHeight,Cs.drawImage(b,0,0),h.rr_dataURL=Ue.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=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume;}if(d||(r.scrollLeft&&(h.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(h.rr_scrollTop=r.scrollTop)),m){let{width:b,height:S}=r.getBoundingClientRect();h={class:h.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(h.src)&&(r.contentDocument||(h.rr_src=h.src),delete h.src);let w;try{customElements.get(p)&&(w=!0);}catch(b){}return {type:Z.Element,tagName:p,attributes:h,childNodes:[],isSVG:tu(r)||void 0,needBlock:m,rootId:g,isCustom:w}}function L(r){return r==null?"":r.toLowerCase()}function Io(r){return r===true||r==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:r==="all",headMetaDescKeywords:r==="all",headTitleMutations:r==="all"}:r||{}}function cu(r,e){if(e.comment&&r.type===Z.Comment)return true;if(r.type===Z.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&wo(r.attributes.href)==="js"))return true;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(L(r.attributes.name).match(/^msapplication-tile(image|color)$/)||L(r.attributes.name)==="application-name"||L(r.attributes.rel)==="icon"||L(r.attributes.rel)==="apple-touch-icon"||L(r.attributes.rel)==="shortcut icon")))return true;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&L(r.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(r.attributes.property).match(/^(og|twitter|fb):/)||L(r.attributes.name).match(/^(og|twitter):/)||L(r.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(r.attributes.name)==="robots"||L(r.attributes.name)==="googlebot"||L(r.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(r.attributes.name)==="author"||L(r.attributes.name)==="generator"||L(r.attributes.name)==="framework"||L(r.attributes.name)==="publisher"||L(r.attributes.name)==="progid"||L(r.attributes.property).match(/^article:/)||L(r.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(r.attributes.name)==="google-site-verification"||L(r.attributes.name)==="yandex-verification"||L(r.attributes.name)==="csrf-token"||L(r.attributes.name)==="p:domain_verify"||L(r.attributes.name)==="verify-v1"||L(r.attributes.name)==="verification"||L(r.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function Ve(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:s,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:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:I=()=>false,newlyAddedElement:P=false,cssCaptured:A=false}=e,{needsMask:F}=e,{preserveWhiteSpace:$=true}=e;F||(F=Eo(r,o,l,F===void 0));let D=su(r,{doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:F,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(r,"not serialized"),null;let q;n.hasNode(r)?q=n.getId(r):cu(D,g)||!$&&D.type===Z.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?q=ht:q=vo();let C=Object.assign(D,{id:q});if(n.add(r,C),q===ht)return null;y&&y(r);let re=!a;if(C.type===Z.Element){re=re&&!C.needBlock,delete C.needBlock;let j=J.shadowRoot(r);j&&ft(j)&&(C.isShadowHost=true);}if((C.type===Z.Document||C.type===Z.Element)&&re){g.headWhitespace&&C.type===Z.Element&&C.tagName==="head"&&($=false);let j={doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:F,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:$,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I,cssCaptured:false};if(!(C.type===Z.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===Z.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(j.cssCaptured=true);for(let Me of Array.from(J.childNodes(r))){let he=Ve(Me,j);he&&C.childNodes.push(he);}}let se=null;if(yo(r)&&(se=J.shadowRoot(r)))for(let Me of Array.from(J.childNodes(se))){let he=Ve(Me,j);he&&(ft(se)&&(he.isShadow=true),C.childNodes.push(he));}}let Re=J.parentNode(r);return Re&&ut(Re)&&ft(Re)&&(C.isShadow=true),C.type===Z.Element&&C.tagName==="iframe"&&nu(r,()=>{let j=r.contentDocument;if(j&&w){let se=Ve(j,{doc:j,mirror:n,blockClass:i,blockSelector:s,needsMask:F,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:$,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});se&&w(r,se);}},b),C.type===Z.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&wo(C.attributes.href)==="css")&&iu(r,()=>{if(S){let j=Ve(r,{doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:F,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:$,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});j&&S(r,j);}},E),C}function uu(r,e){let{mirror:t=new yr,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="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:w,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=Io(g);return Ve(r,{doc:r,mirror:t,blockClass:n,blockSelector:i,maskTextClass:s,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:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:false})}function du(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function hu(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?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(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:true,get:function(){return r[n]}});}),t}var mi={exports:{}},B=String,xo=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}};mi.exports=xo();mi.exports.createColors=xo;var pu=mi.exports,mu={},gu=Object.freeze(Object.defineProperty({__proto__:null,default:mu},Symbol.toStringTag,{value:"Module"})),ue=hu(gu),Is=pu,xs=ue,xn=class Ro extends Error{constructor(e,t,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ro);}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=Is.isColorSupported),xs&&e&&(t=xs(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,l,a;if(e){let{bold:c,gray:u,red:f}=Is.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return n.slice(i,s).map((c,u)=>{let f=i+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
3
|
`+g+l("^")}return " "+a(d)+c}).join(`
|
|
3
4
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
5
|
|
|
5
6
|
`+e+`
|
|
6
|
-
`),this.name+": "+this.message+e}},
|
|
7
|
+
`),this.name+": "+this.message+e}},gi=xn;xn.default=xn;var Et={};Et.isClean=Symbol("isClean");Et.my=Symbol("my");var Rs={after:`
|
|
7
8
|
`,beforeClose:`
|
|
8
9
|
`,beforeComment:`
|
|
9
10
|
`,beforeDecl:`
|
|
10
11
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function
|
|
12
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<
|
|
13
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let
|
|
14
|
-
`)&&(
|
|
15
|
-
`)&&(
|
|
16
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(
|
|
17
|
-
`);return t=
|
|
18
|
-
`?(
|
|
19
|
-
`);
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function yu(r){return r[0].toUpperCase()+r.slice(1)}var Rn=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else {let s=(e.raws.between||"")+(t?";":"");this.builder(n+i+s,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(`
|
|
13
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<s;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==i||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e);}document(e){this.body(e);}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return "";if(!s)return Rs[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+yu(n);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return false});}return typeof i=="undefined"&&(i=Rs[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
|
|
14
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return n=i.raws.before,n.includes(`
|
|
15
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return n=i.raws.before,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
|
|
17
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before!="undefined"){let s=n.raws.before.split(`
|
|
18
|
+
`);return t=s[s.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}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);}},Mo=Rn;Rn.default=Rn;var bu=Mo;function Mn(r,e){new bu(e).stringify(r);}var Dr=Mn;Mn.default=Mn;var{isClean:Vt,my:wu}=Et,vu=gi,Su=Mo,Cu=Dr;function Tn(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],s=typeof i;n==="parent"&&s==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(o=>Tn(o,t)):(s==="object"&&i!==null&&(i=Tn(i)),t[n]=i);}return t}var An=class{constructor(e={}){this.raws={},this[Vt]=false,this[wu]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}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=Tn(this);for(let n in e)t[n]=e[n];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:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.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,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Vt]){this[Vt]=false;let e=this;for(;e=e.parent;)e[Vt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t));}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
|
|
19
|
+
`?(i=1,s+=1):i+=1;return {column:i,line:s}}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},n=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 i=this.toString(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),n=this.positionInside(s+e.word.length,i));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new Su().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,n=false;for(let i of e)i===this?n=true:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let s=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))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=s,t.set(l.input,s),s++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return i&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Cu){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(t,i)}get proxyOf(){return this}},Lr=An;An.default=An;var Eu=Lr,kn=class extends Eu{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]==="$"}},Pr=kn;kn.default=kn;var Iu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ru=(r=21)=>{let e="",t=r;for(;t--;)e+=Iu[Math.random()*64|0];return e},Mu={nanoid:Ru},{SourceMapConsumer:Ms,SourceMapGenerator:Ts}=ue,{existsSync:Tu,readFileSync:Au}=ue,{dirname:dn,join:ku}=ue;function Nu(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var Nn=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=dn(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new Ms(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return Nu(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 n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)));}loadFile(e){if(this.root=dn(e),Tu(e))return this.mapFile=e,Au(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 n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else {if(t instanceof Ms)return Ts.fromSourceMap(t).toString();if(t instanceof Ts)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 n=this.annotation;return e&&(n=ku(dn(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},To=Nn;Nn.default=Nn;var{SourceMapConsumer:_u,SourceMapGenerator:Ou}=ue,{fileURLToPath:As,pathToFileURL:Gt}=ue,{isAbsolute:_n,resolve:On}=ue,{nanoid:Du}=Mu,hn=ue,ks=gi,Lu=To,pn=Symbol("fromOffsetCache"),Pu=!!(_u&&Ou),Ns=!!(On&&_n),Cr=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&&(!Ns||/^\w+:\/\//.test(t.from)||_n(t.from)?this.file=t.from:this.file=On(t.from)),Ns&&Pu){let n=new Lu(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i));}}this.file||(this.id="<input css "+Du(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,i={}){let s,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=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(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?s=new ks(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,i.plugin):s=new ks(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Gt&&(s.input.url=Gt(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[pn])n=this[pn];else {let s=this.css.split(`
|
|
20
|
+
`);n=new Array(s.length);let o=0;for(let l=0,a=s.length;l<a;l++)n[l]=o,o+=s[l].length+1;this[pn]=n;}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else {let s=n.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<n[o])s=o-1;else if(e>=n[o+1])i=o+1;else {i=o;break}}return {col:e-n[i]+1,line:i+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:On(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return false;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=s.originalPositionFor({column:i,line:n}));let a;_n(o.source)?a=Gt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Gt(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(As)c.file=As(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=s.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}},Fr=Cr;Cr.default=Cr;hn&&hn.registerInput&&hn.registerInput(Cr);var{SourceMapConsumer:Ao,SourceMapGenerator:fr}=ue,{dirname:dr,relative:ko,resolve:No,sep:_o}=ue,{pathToFileURL:_s}=ue,Fu=Fr,$u=!!(Ao&&fr),Bu=!!(dr&&No&&ko&&_o),Uu=class{constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){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
21
|
`;this.css.includes(`\r
|
|
21
22
|
`)&&(t=`\r
|
|
22
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),
|
|
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:
|
|
23
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||dr(e.file),i;this.mapOpts.sourcesContent===false?(i=new Ao(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)));}}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(),Bu&&$u&&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=fr.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new fr({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 fr({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=l.match(/\n/g),s?(e+=s.length,o=l.lastIndexOf(`
|
|
24
|
+
`),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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)));}});}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 n=this.opts.to?dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=dr(No(n,this.mapOpts.annotation)));let i=ko(n,e);return this.memoizedPaths.set(e,i),i}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 Fu(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 n=t.source.input.from;if(n&&!e[n]){e[n]=true;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,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(_s){let n=_s(e).toString();return this.memoizedFileURLs.set(e,n),n}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;_o==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Oo=Uu,Wu=Lr,Dn=class extends Wu{constructor(e){super(e),this.type="comment";}},$r=Dn;Dn.default=Dn;var{isClean:Do,my:Lo}=Et,Po=Pr,Fo=$r,Hu=Lr,$o,yi,bi,Bo;function Uo(r){return r.map(e=>(e.nodes&&(e.nodes=Uo(e.nodes)),delete e.source,e))}function Wo(r){if(r[Do]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Wo(e);}var be=class Ho extends Hu{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i);}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(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==false);)this.indexes[t]+=1;return delete this.indexes[t],i}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")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?n=>e[t]((i,...s)=>n(i.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(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 n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":false,s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let l of s)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Uo($o(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 Po(e)];}else if(e.selector)e=[new yi(e)];else if(e.name)e=[new bi(e)];else if(e.text)e=[new Fo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Lo]||Ho.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Do]&&Wo(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.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 n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n);}catch(s){throw t.addToError(s)}return i!==false&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}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]}};be.registerParse=r=>{$o=r;};be.registerRule=r=>{yi=r;};be.registerAtRule=r=>{bi=r;};be.registerRoot=r=>{Bo=r;};var _e=be;be.default=be;be.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,bi.prototype):r.type==="rule"?Object.setPrototypeOf(r,yi.prototype):r.type==="decl"?Object.setPrototypeOf(r,Po.prototype):r.type==="comment"?Object.setPrototypeOf(r,Fo.prototype):r.type==="root"&&Object.setPrototypeOf(r,Bo.prototype),r[Lo]=true,r.nodes&&r.nodes.forEach(e=>{be.rebuild(e);});};var zu=_e,zo,Vo,pt=class extends zu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new zo(new Vo,this,e).stringify()}};pt.registerLazyResult=r=>{zo=r;};pt.registerProcessor=r=>{Vo=r;};var wi=pt;pt.default=pt;var Ln=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}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}},Go=Ln;Ln.default=Ln;var Vu=Go,Pn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new Vu(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},vi=Pn;Pn.default=Pn;var mn=39,Os=34,jt=92,Ds=47,Yt=10,st=32,Xt=12,Zt=9,Jt=13,Gu=91,ju=93,Yu=40,Xu=41,Zu=123,Ju=125,Ku=59,qu=42,Qu=58,ef=64,Kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tf=/.[\r\n"'(/\\]/,Ls=/[\da-f]/i,rf=function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,s,o,l,a,c,u,f,d,g,m,p=n.length,h=0,y=[],w=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return w.length===0&&h>=p}function I(A){if(w.length)return w.pop();if(h>=p)return;let F=A?A.ignoreUnclosed:false;switch(s=n.charCodeAt(h),s){case Yt:case st:case Zt:case Jt:case Xt:{o=h;do o+=1,s=n.charCodeAt(o);while(s===st||s===Yt||s===Zt||s===Jt||s===Xt);m=["space",n.slice(h,o)],h=o-1;break}case Gu:case ju:case Zu:case Ju:case Qu:case Ku:case Xu:{let $=String.fromCharCode(s);m=[$,$,h];break}case Yu:{if(d=y.length?y.pop()[1]:"",g=n.charCodeAt(h+1),d==="url"&&g!==mn&&g!==Os&&g!==st&&g!==Yt&&g!==Zt&&g!==Xt&&g!==Jt){o=h;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(i||F){o=h;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===jt;)f-=1,u=!u;}while(u);m=["brackets",n.slice(h,o+1),h,o],h=o;}else o=n.indexOf(")",h+1),a=n.slice(h,o+1),o===-1||tf.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case mn:case Os:{l=s===mn?"'":'"',o=h;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(i||F){o=h+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===jt;)f-=1,u=!u;}while(u);m=["string",n.slice(h,o+1),h,o],h=o;break}case ef:{Kt.lastIndex=h+1,Kt.test(n),Kt.lastIndex===0?o=n.length-1:o=Kt.lastIndex-2,m=["at-word",n.slice(h,o+1),h,o],h=o;break}case jt:{for(o=h,c=true;n.charCodeAt(o+1)===jt;)o+=1,c=!c;if(s=n.charCodeAt(o+1),c&&s!==Ds&&s!==st&&s!==Yt&&s!==Zt&&s!==Jt&&s!==Xt&&(o+=1,Ls.test(n.charAt(o)))){for(;Ls.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===st&&(o+=1);}m=["word",n.slice(h,o+1),h,o],h=o;break}default:{s===Ds&&n.charCodeAt(h+1)===qu?(o=n.indexOf("*/",h+2)+1,o===0&&(i||F?o=n.length:S("comment")),m=["comment",n.slice(h,o+1),h,o],h=o):(qt.lastIndex=h+1,qt.test(n),qt.lastIndex===0?o=n.length-1:o=qt.lastIndex-2,m=["word",n.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){w.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},jo=_e,Er=class extends jo{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)}},Si=Er;Er.default=Er;jo.registerAtRule(Er);var Yo=_e,Xo,Zo,je=class extends Yo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of i)s.raws.before=t.raws.before;}return i}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Xo(new Zo,this,e).stringify()}};je.registerLazyResult=r=>{Xo=r;};je.registerProcessor=r=>{Zo=r;};var It=je;je.default=je;Yo.registerRoot(je);var mt={comma(r){return mt.split(r,[","],true)},space(r){let e=[" ",`
|
|
25
|
+
`," "];return mt.split(r,e)},split(r,e,t){let n=[],i="",s=false,o=0,l=false,a="",c=false;for(let u of r)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)&&(s=true),s?(i!==""&&n.push(i.trim()),i="",s=false):i+=u;return (t||i!=="")&&n.push(i.trim()),n}},Jo=mt;mt.default=mt;var Ko=_e,nf=Jo,Ir=class extends Ko{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return nf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},Ci=Ir;Ir.default=Ir;Ko.registerRule(Ir);var sf=Pr,of=rf,af=$r,lf=Si,cf=It,Ps=Ci,Fs={empty:true,space:true};function uf(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var ff=class{constructor(e){this.input=e,this.root=new cf,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 lf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,s,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];i&&(t.source.end=this.getPosition(i[3]||i[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 n=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,s;for(let[o,l]of e.entries()){if(n=l,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(n);else {if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n;}return false}comment(e){let t=new af;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3];}}createTokenizer(){this.tokenizer=of(this.input);}decl(e,t){let n=new sf;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||uf(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.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(s=e[c],s[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(s[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&&(n.important=true,n.raws.important=f,e=u);}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.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 Ps;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,n=null,i=false,s=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")s||(s=c),o.push(n==="("?")":"]");else if(l&&i&&n==="{")s||(s=c),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(i=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(s),t&&i){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,n,i){let s,o,l=n.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)s=n[d],o=s[0],o==="space"&&d===l-1&&!i?c=false:o==="comment"?(f=n[d-1]?n[d-1][0]:"empty",u=n[d+1]?n[d+1][0]:"empty",!Fs[f]&&!Fs[u]?a.slice(-1)===","?c=false:a+=s[1]:c=false):a+=s[1];if(!c){let d=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new Ps;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}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})}},df=ff,hf=_e,pf=df,mf=Fr;function xr(r,e){let t=new mf(r,e),n=new pf(t);try{n.parse();}catch(i){throw i}return n.root}var Ei=xr;xr.default=xr;hf.registerParse(xr);var{isClean:me,my:gf}=Et,yf=Oo,bf=Dr,wf=_e,vf=wi;var $s=vi,Sf=Ei,Cf=It,Ef={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},If={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},xf={Once:true,postcssPlugin:true,prepare:true},Ye=0;function ot(r){return typeof r=="object"&&typeof r.then=="function"}function qo(r){let e=false,t=Ef[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Ye,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Ye,t+"Exit"]:[t,t+"Exit"]}function Bs(r){let e;return r.type==="document"?e=["Document",Ye,"DocumentExit"]:r.type==="root"?e=["Root",Ye,"RootExit"]:e=qo(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Fn(r){return r[me]=false,r.nodes&&r.nodes.forEach(e=>Fn(e)),r}var $n={},Xe=class Qo{constructor(e,t,n){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Fn(t);else if(t instanceof Qo||t instanceof $s)i=Fn(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let s=Sf;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(t,n);}catch(o){this.processed=true,this.error=o;}i&&!i[gf]&&wf.rebuild(i);}this.result=new $s(e,i,n),this.helpers={...$n,postcss:$n,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s);}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 n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(i){console&&console.error&&console.error(i);}return e}prepareVisitors(){this.listeners={};let e=(t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!If[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xf[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n]);}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],n=this.runOnRoot(t);if(ot(n))try{await n;}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=true;let t=[Bs(e)];for(;t.length>0;){let n=this.visitTick(t);if(ot(n))try{await n;}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i);}else await n(e,this.helpers);}catch(i){throw this.handleError(i)}}}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(n=>e.Once(n,this.helpers));return ot(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=bf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new yf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=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[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(ot(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[me]){l[me]=true,e.push(Bs(l));return}t.iterator=0,delete n.indexes[o];}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Ye){n.nodes&&n.nodes.length&&(n[me]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[me]=true;let t=qo(e);for(let n of t)if(n===Ye)e.nodes&&e.each(i=>{i[me]||this.walkSync(i);});else {let i=this.listeners[n];if(i&&this.visitSync(i,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"}};Xe.registerPostcss=r=>{$n=r;};var ea=Xe;Xe.default=Xe;Cf.registerLazyResult(Xe);vf.registerLazyResult(Xe);var Rf=Oo,Mf=Dr;var Tf=Ei,Af=vi,Bn=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,s=Mf;this.result=new Af(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Rf(s,i,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=Tf;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},kf=Bn;Bn.default=Bn;var Nf=kf,_f=ea,Of=wi,Df=It,gt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Nf(this,e,t):new _f(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Lf=gt;gt.default=gt;Df.registerProcessor(gt);Of.registerProcessor(gt);var Pf=Pr,Ff=To,$f=$r,Bf=Si,Uf=Fr,Wf=It,Hf=Ci;function yt(r,e){if(Array.isArray(r))return r.map(i=>yt(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let s={...i,__proto__:Uf.prototype};s.map&&(s.map={...s.map,__proto__:Ff.prototype}),e.push(s);}}if(n.nodes&&(n.nodes=r.nodes.map(i=>yt(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i]);}if(n.type==="root")return new Wf(n);if(n.type==="decl")return new Pf(n);if(n.type==="rule")return new Hf(n);if(n.type==="comment")return new $f(n);if(n.type==="atrule")return new Bf(n);throw new Error("Unknown node type: "+r.type)}var zf=yt;yt.default=yt;var Vf=gi,ta=Pr,Gf=ea,jf=_e,Ii=Lf,Yf=Dr,Xf=zf,ra=wi,Zf=Go,na=$r,ia=Si,Jf=vi,Kf=Fr,qf=Ei,Qf=Jo,sa=Ci,oa=It,ed=Lr;function N(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Ii(r)}N.plugin=function(e,t){let n=false;function i(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
25
26
|
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
|
|
27
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ii().version,l}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,l,a){return N([i(a)]).process(o,l)},i};N.stringify=Yf;N.parse=qf;N.fromJSON=Xf;N.list=Qf;N.comment=r=>new na(r);N.atRule=r=>new ia(r);N.decl=r=>new ta(r);N.rule=r=>new sa(r);N.root=r=>new oa(r);N.document=r=>new ra(r);N.CssSyntaxError=Vf;N.Declaration=ta;N.Container=jf;N.Processor=Ii;N.Document=ra;N.Comment=na;N.Warning=Zf;N.AtRule=ia;N.Result=Jf;N.Input=Kf;N.Rule=sa;N.Root=oa;N.Node=ed;Gf.registerPostcss(N);var td=N;N.default=N;var W=du(td);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 rd=Object.defineProperty,nd=(r,e,t)=>e in r?rd(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,oe=(r,e,t)=>nd(r,typeof e!="symbol"?e+"":e,t);function id(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function sd(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?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(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:true,get:function(){return r[n]}});}),t}var xi={exports:{}},U=String,aa=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}};xi.exports=aa();xi.exports.createColors=aa;var od=xi.exports,ad={},ld=Object.freeze(Object.defineProperty({__proto__:null,default:ad},Symbol.toStringTag,{value:"Module"})),fe=sd(ld),Us=od,Ws=fe,Un=class la extends Error{constructor(e,t,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,la);}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=Us.isColorSupported),Ws&&e&&(t=Ws(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,l,a;if(e){let{bold:c,gray:u,red:f}=Us.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return n.slice(i,s).map((c,u)=>{let f=i+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
28
|
`+g+l("^")}return " "+a(d)+c}).join(`
|
|
28
29
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
29
30
|
|
|
30
31
|
`+e+`
|
|
31
|
-
`),this.name+": "+this.message+e}},
|
|
32
|
+
`),this.name+": "+this.message+e}},Ri=Un;Un.default=Un;var xt={};xt.isClean=Symbol("isClean");xt.my=Symbol("my");var Hs={after:`
|
|
32
33
|
`,beforeClose:`
|
|
33
34
|
`,beforeComment:`
|
|
34
35
|
`,beforeDecl:`
|
|
35
36
|
`,beforeOpen:" ",beforeRule:`
|
|
36
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function
|
|
37
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<
|
|
38
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let
|
|
39
|
-
`)&&(
|
|
40
|
-
`)&&(
|
|
41
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(
|
|
42
|
-
`);return t=
|
|
43
|
-
`?(
|
|
44
|
-
`);
|
|
37
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function cd(r){return r[0].toUpperCase()+r.slice(1)}var Wn=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else {let s=(e.raws.between||"")+(t?";":"");this.builder(n+i+s,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(`
|
|
38
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<s;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==i||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e);}document(e){this.body(e);}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return "";if(!s)return Hs[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+cd(n);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return false});}return typeof i=="undefined"&&(i=Hs[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
|
|
39
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return n=i.raws.before,n.includes(`
|
|
40
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return n=i.raws.before,n.includes(`
|
|
41
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
|
|
42
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before!="undefined"){let s=n.raws.before.split(`
|
|
43
|
+
`);return t=s[s.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}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);}},ca=Wn;Wn.default=Wn;var ud=ca;function Hn(r,e){new ud(e).stringify(r);}var Br=Hn;Hn.default=Hn;var{isClean:Qt,my:fd}=xt,dd=Ri,hd=ca,pd=Br;function zn(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],s=typeof i;n==="parent"&&s==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(o=>zn(o,t)):(s==="object"&&i!==null&&(i=zn(i)),t[n]=i);}return t}var Vn=class{constructor(e={}){this.raws={},this[Qt]=false,this[fd]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}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=zn(this);for(let n in e)t[n]=e[n];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:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new dd(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Qt]){this[Qt]=false;let e=this;for(;e=e.parent;)e[Qt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t));}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
|
|
44
|
+
`?(i=1,s+=1):i+=1;return {column:i,line:s}}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},n=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 i=this.toString(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),n=this.positionInside(s+e.word.length,i));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new hd().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,n=false;for(let i of e)i===this?n=true:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let s=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))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=s,t.set(l.input,s),s++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return i&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=pd){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(t,i)}get proxyOf(){return this}},Ur=Vn;Vn.default=Vn;var md=Ur,Gn=class extends md{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]==="$"}},Wr=Gn;Gn.default=Gn;var gd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bd=(r=21)=>{let e="",t=r;for(;t--;)e+=gd[Math.random()*64|0];return e},wd={nanoid:bd},{SourceMapConsumer:zs,SourceMapGenerator:Vs}=fe,{existsSync:vd,readFileSync:Sd}=fe,{dirname:gn,join:Cd}=fe;function Ed(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var jn=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=gn(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new zs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return Ed(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 n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)));}loadFile(e){if(this.root=gn(e),vd(e))return this.mapFile=e,Sd(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 n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else {if(t instanceof zs)return Vs.fromSourceMap(t).toString();if(t instanceof Vs)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 n=this.annotation;return e&&(n=Cd(gn(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},ua=jn;jn.default=jn;var{SourceMapConsumer:Id,SourceMapGenerator:xd}=fe,{fileURLToPath:Gs,pathToFileURL:er}=fe,{isAbsolute:Yn,resolve:Xn}=fe,{nanoid:Rd}=wd,yn=fe,js=Ri,Md=ua,bn=Symbol("fromOffsetCache"),Td=!!(Id&&xd),Ys=!!(Xn&&Yn),Rr=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&&(!Ys||/^\w+:\/\//.test(t.from)||Yn(t.from)?this.file=t.from:this.file=Xn(t.from)),Ys&&Td){let n=new Md(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i));}}this.file||(this.id="<input css "+Rd(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,i={}){let s,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=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(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?s=new js(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,i.plugin):s=new js(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(er&&(s.input.url=er(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[bn])n=this[bn];else {let s=this.css.split(`
|
|
45
|
+
`);n=new Array(s.length);let o=0;for(let l=0,a=s.length;l<a;l++)n[l]=o,o+=s[l].length+1;this[bn]=n;}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else {let s=n.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<n[o])s=o-1;else if(e>=n[o+1])i=o+1;else {i=o;break}}return {col:e-n[i]+1,line:i+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Xn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return false;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=s.originalPositionFor({column:i,line:n}));let a;Yn(o.source)?a=er(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||er(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(Gs)c.file=Gs(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=s.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}},Hr=Rr;Rr.default=Rr;yn&&yn.registerInput&&yn.registerInput(Rr);var{SourceMapConsumer:fa,SourceMapGenerator:hr}=fe,{dirname:pr,relative:da,resolve:ha,sep:pa}=fe,{pathToFileURL:Xs}=fe,Ad=Hr,kd=!!(fa&&hr),Nd=!!(pr&&ha&&da&&pa),_d=class{constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){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
46
|
`;this.css.includes(`\r
|
|
46
47
|
`)&&(t=`\r
|
|
47
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),
|
|
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:
|
|
48
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||pr(e.file),i;this.mapOpts.sourcesContent===false?(i=new fa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)));}}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(),Nd&&kd&&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=hr.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new hr({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 hr({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=l.match(/\n/g),s?(e+=s.length,o=l.lastIndexOf(`
|
|
49
|
+
`),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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)));}});}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 n=this.opts.to?pr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=pr(ha(n,this.mapOpts.annotation)));let i=da(n,e);return this.memoizedPaths.set(e,i),i}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 Ad(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 n=t.source.input.from;if(n&&!e[n]){e[n]=true;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,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(Xs){let n=Xs(e).toString();return this.memoizedFileURLs.set(e,n),n}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;pa==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},ma=_d,Od=Ur,Zn=class extends Od{constructor(e){super(e),this.type="comment";}},zr=Zn;Zn.default=Zn;var{isClean:ga,my:ya}=xt,ba=Wr,wa=zr,Dd=Ur,va,Mi,Ti,Sa;function Ca(r){return r.map(e=>(e.nodes&&(e.nodes=Ca(e.nodes)),delete e.source,e))}function Ea(r){if(r[ga]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Ea(e);}var we=class Ia extends Dd{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i);}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(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==false);)this.indexes[t]+=1;return delete this.indexes[t],i}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")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?n=>e[t]((i,...s)=>n(i.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(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 n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":false,s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let l of s)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ca(va(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 ba(e)];}else if(e.selector)e=[new Mi(e)];else if(e.name)e=[new Ti(e)];else if(e.text)e=[new wa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ya]||Ia.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ga]&&Ea(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.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 n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n);}catch(s){throw t.addToError(s)}return i!==false&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}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]}};we.registerParse=r=>{va=r;};we.registerRule=r=>{Mi=r;};we.registerAtRule=r=>{Ti=r;};we.registerRoot=r=>{Sa=r;};var Oe=we;we.default=we;we.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Ti.prototype):r.type==="rule"?Object.setPrototypeOf(r,Mi.prototype):r.type==="decl"?Object.setPrototypeOf(r,ba.prototype):r.type==="comment"?Object.setPrototypeOf(r,wa.prototype):r.type==="root"&&Object.setPrototypeOf(r,Sa.prototype),r[ya]=true,r.nodes&&r.nodes.forEach(e=>{we.rebuild(e);});};var Ld=Oe,xa,Ra,bt=class extends Ld{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new xa(new Ra,this,e).stringify()}};bt.registerLazyResult=r=>{xa=r;};bt.registerProcessor=r=>{Ra=r;};var Ai=bt;bt.default=bt;var Jn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}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}},Ma=Jn;Jn.default=Jn;var Pd=Ma,Kn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new Pd(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ki=Kn;Kn.default=Kn;var wn=39,Zs=34,tr=92,Js=47,rr=10,at=32,nr=12,ir=9,sr=13,Fd=91,$d=93,Bd=40,Ud=41,Wd=123,Hd=125,zd=59,Vd=42,Gd=58,jd=64,or=/[\t\n\f\r "#'()/;[\\\]{}]/g,ar=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Yd=/.[\r\n"'(/\\]/,Ks=/[\da-f]/i,Xd=function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,s,o,l,a,c,u,f,d,g,m,p=n.length,h=0,y=[],w=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return w.length===0&&h>=p}function I(A){if(w.length)return w.pop();if(h>=p)return;let F=A?A.ignoreUnclosed:false;switch(s=n.charCodeAt(h),s){case rr:case at:case ir:case sr:case nr:{o=h;do o+=1,s=n.charCodeAt(o);while(s===at||s===rr||s===ir||s===sr||s===nr);m=["space",n.slice(h,o)],h=o-1;break}case Fd:case $d:case Wd:case Hd:case Gd:case zd:case Ud:{let $=String.fromCharCode(s);m=[$,$,h];break}case Bd:{if(d=y.length?y.pop()[1]:"",g=n.charCodeAt(h+1),d==="url"&&g!==wn&&g!==Zs&&g!==at&&g!==rr&&g!==ir&&g!==nr&&g!==sr){o=h;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(i||F){o=h;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===tr;)f-=1,u=!u;}while(u);m=["brackets",n.slice(h,o+1),h,o],h=o;}else o=n.indexOf(")",h+1),a=n.slice(h,o+1),o===-1||Yd.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case wn:case Zs:{l=s===wn?"'":'"',o=h;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(i||F){o=h+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===tr;)f-=1,u=!u;}while(u);m=["string",n.slice(h,o+1),h,o],h=o;break}case jd:{or.lastIndex=h+1,or.test(n),or.lastIndex===0?o=n.length-1:o=or.lastIndex-2,m=["at-word",n.slice(h,o+1),h,o],h=o;break}case tr:{for(o=h,c=true;n.charCodeAt(o+1)===tr;)o+=1,c=!c;if(s=n.charCodeAt(o+1),c&&s!==Js&&s!==at&&s!==rr&&s!==ir&&s!==sr&&s!==nr&&(o+=1,Ks.test(n.charAt(o)))){for(;Ks.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===at&&(o+=1);}m=["word",n.slice(h,o+1),h,o],h=o;break}default:{s===Js&&n.charCodeAt(h+1)===Vd?(o=n.indexOf("*/",h+2)+1,o===0&&(i||F?o=n.length:S("comment")),m=["comment",n.slice(h,o+1),h,o],h=o):(ar.lastIndex=h+1,ar.test(n),ar.lastIndex===0?o=n.length-1:o=ar.lastIndex-2,m=["word",n.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){w.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},Ta=Oe,Mr=class extends Ta{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)}},Ni=Mr;Mr.default=Mr;Ta.registerAtRule(Mr);var Aa=Oe,ka,Na,Ze=class extends Aa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of i)s.raws.before=t.raws.before;}return i}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new ka(new Na,this,e).stringify()}};Ze.registerLazyResult=r=>{ka=r;};Ze.registerProcessor=r=>{Na=r;};var Rt=Ze;Ze.default=Ze;Aa.registerRoot(Ze);var wt={comma(r){return wt.split(r,[","],true)},space(r){let e=[" ",`
|
|
50
|
+
`," "];return wt.split(r,e)},split(r,e,t){let n=[],i="",s=false,o=0,l=false,a="",c=false;for(let u of r)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)&&(s=true),s?(i!==""&&n.push(i.trim()),i="",s=false):i+=u;return (t||i!=="")&&n.push(i.trim()),n}},_a=wt;wt.default=wt;var Oa=Oe,Zd=_a,Tr=class extends Oa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Zd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},_i=Tr;Tr.default=Tr;Oa.registerRule(Tr);var Jd=Wr,Kd=Xd,qd=zr,Qd=Ni,eh=Rt,qs=_i,Qs={empty:true,space:true};function th(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var rh=class{constructor(e){this.input=e,this.root=new eh,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 Qd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,s,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];i&&(t.source.end=this.getPosition(i[3]||i[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 n=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,s;for(let[o,l]of e.entries()){if(n=l,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(n);else {if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n;}return false}comment(e){let t=new qd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3];}}createTokenizer(){this.tokenizer=Kd(this.input);}decl(e,t){let n=new Jd;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||th(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.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(s=e[c],s[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(s[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&&(n.important=true,n.raws.important=f,e=u);}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.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 qs;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,n=null,i=false,s=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")s||(s=c),o.push(n==="("?")":"]");else if(l&&i&&n==="{")s||(s=c),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(i=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(s),t&&i){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,n,i){let s,o,l=n.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)s=n[d],o=s[0],o==="space"&&d===l-1&&!i?c=false:o==="comment"?(f=n[d-1]?n[d-1][0]:"empty",u=n[d+1]?n[d+1][0]:"empty",!Qs[f]&&!Qs[u]?a.slice(-1)===","?c=false:a+=s[1]:c=false):a+=s[1];if(!c){let d=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new qs;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}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})}},nh=rh,ih=Oe,sh=nh,oh=Hr;function Ar(r,e){let t=new oh(r,e),n=new sh(t);try{n.parse();}catch(i){throw i}return n.root}var Oi=Ar;Ar.default=Ar;ih.registerParse(Ar);var{isClean:ge,my:ah}=xt,lh=ma,ch=Br,uh=Oe,fh=Ai;var eo=ki,dh=Oi,hh=Rt,ph={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},mh={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},gh={Once:true,postcssPlugin:true,prepare:true},Je=0;function lt(r){return typeof r=="object"&&typeof r.then=="function"}function Da(r){let e=false,t=ph[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Je,t+"Exit"]:[t,t+"Exit"]}function to(r){let e;return r.type==="document"?e=["Document",Je,"DocumentExit"]:r.type==="root"?e=["Root",Je,"RootExit"]:e=Da(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function qn(r){return r[ge]=false,r.nodes&&r.nodes.forEach(e=>qn(e)),r}var Qn={},Ke=class La{constructor(e,t,n){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=qn(t);else if(t instanceof La||t instanceof eo)i=qn(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let s=dh;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(t,n);}catch(o){this.processed=true,this.error=o;}i&&!i[ah]&&uh.rebuild(i);}this.result=new eo(e,i,n),this.helpers={...Qn,postcss:Qn,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s);}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 n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(i){console&&console.error&&console.error(i);}return e}prepareVisitors(){this.listeners={};let e=(t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!mh[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gh[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n]);}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],n=this.runOnRoot(t);if(lt(n))try{await n;}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=true;let t=[to(e)];for(;t.length>0;){let n=this.visitTick(t);if(lt(n))try{await n;}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i);}else await n(e,this.helpers);}catch(i){throw this.handleError(i)}}}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(n=>e.Once(n,this.helpers));return lt(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=ch;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new lh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=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[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(lt(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[ge]){l[ge]=true,e.push(to(l));return}t.iterator=0,delete n.indexes[o];}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Je){n.nodes&&n.nodes.length&&(n[ge]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[ge]=true;let t=Da(e);for(let n of t)if(n===Je)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i);});else {let i=this.listeners[n];if(i&&this.visitSync(i,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"}};Ke.registerPostcss=r=>{Qn=r;};var Pa=Ke;Ke.default=Ke;hh.registerLazyResult(Ke);fh.registerLazyResult(Ke);var yh=ma,bh=Br;var wh=Oi,vh=ki,ei=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,s=bh;this.result=new vh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new yh(s,i,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=wh;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},Sh=ei;ei.default=ei;var Ch=Sh,Eh=Pa,Ih=Ai,xh=Rt,vt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ch(this,e,t):new Eh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Rh=vt;vt.default=vt;xh.registerProcessor(vt);Ih.registerProcessor(vt);var Mh=Wr,Th=ua,Ah=zr,kh=Ni,Nh=Hr,_h=Rt,Oh=_i;function St(r,e){if(Array.isArray(r))return r.map(i=>St(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let s={...i,__proto__:Nh.prototype};s.map&&(s.map={...s.map,__proto__:Th.prototype}),e.push(s);}}if(n.nodes&&(n.nodes=r.nodes.map(i=>St(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i]);}if(n.type==="root")return new _h(n);if(n.type==="decl")return new Mh(n);if(n.type==="rule")return new Oh(n);if(n.type==="comment")return new Ah(n);if(n.type==="atrule")return new kh(n);throw new Error("Unknown node type: "+r.type)}var Dh=St;St.default=St;var Lh=Ri,Fa=Wr,Ph=Pa,Fh=Oe,Di=Rh,$h=Br,Bh=Dh,$a=Ai,Uh=Ma,Ba=zr,Ua=Ni,Wh=ki,Hh=Hr,zh=Oi,Vh=_a,Wa=_i,Ha=Rt,Gh=Ur;function _(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Di(r)}_.plugin=function(e,t){let n=false;function i(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
50
51
|
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
|
|
52
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Di().version,l}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,l,a){return _([i(a)]).process(o,l)},i};_.stringify=$h;_.parse=zh;_.fromJSON=Bh;_.list=Vh;_.comment=r=>new Ba(r);_.atRule=r=>new Ua(r);_.decl=r=>new Fa(r);_.rule=r=>new Wa(r);_.root=r=>new Ha(r);_.document=r=>new $a(r);_.CssSyntaxError=Lh;_.Declaration=Fa;_.Container=Fh;_.Processor=Di;_.Document=$a;_.Comment=Ba;_.Warning=Uh;_.AtRule=Ua;_.Result=Wh;_.Input=Hh;_.Rule=Wa;_.Root=Ha;_.Node=Gh;Ph.registerPostcss(_);var jh=_;_.default=_;var H=id(jh);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;var ti=class r{constructor(...e){oe(this,"parentElement",null),oe(this,"parentNode",null),oe(this,"ownerDocument"),oe(this,"firstChild",null),oe(this,"lastChild",null),oe(this,"previousSibling",null),oe(this,"nextSibling",null),oe(this,"ELEMENT_NODE",1),oe(this,"TEXT_NODE",3),oe(this,"nodeType"),oe(this,"nodeName"),oe(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof r){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 ro={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},no={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lr={},Yh=()=>!!globalThis.Zone;function Li(r){if(lr[r])return lr[r];let e=globalThis[r],t=e.prototype,n=r in ro?ro[r]:void 0,i=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),s=r in no?no[r]:void 0,o=!!(s&&s.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Yh())return lr[r]=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[r].prototype;return document.body.removeChild(l),c?lr[r]=c:t}catch(l){return t}}var vn={};function Se(r,e,t){var n;let i=`${r}.${String(t)}`;if(vn[i])return vn[i].call(e);let s=Li(r),o=(n=Object.getOwnPropertyDescriptor(s,t))==null?void 0:n.get;return o?(vn[i]=o,o.call(e)):e[t]}var Sn={};function za(r,e,t){let n=`${r}.${String(t)}`;if(Sn[n])return Sn[n].bind(e);let s=Li(r)[t];return typeof s!="function"?e[t]:(Sn[n]=s,s.bind(e))}function Xh(r){return Se("Node",r,"ownerDocument")}function Zh(r){return Se("Node",r,"childNodes")}function Jh(r){return Se("Node",r,"parentNode")}function Kh(r){return Se("Node",r,"parentElement")}function qh(r){return Se("Node",r,"textContent")}function Qh(r,e){return za("Node",r,"contains")(e)}function ep(r){return za("Node",r,"getRootNode")()}function tp(r){return !r||!("host"in r)?null:Se("ShadowRoot",r,"host")}function rp(r){return r.styleSheets}function np(r){return !r||!("shadowRoot"in r)?null:Se("Element",r,"shadowRoot")}function ip(r,e){return Se("Element",r,"querySelector")(e)}function sp(r,e){return Se("Element",r,"querySelectorAll")(e)}function Va(){return Li("MutationObserver").constructor}function De(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n;}}catch(n){return ()=>{}}}var x={ownerDocument:Xh,childNodes:Zh,parentNode:Jh,parentElement:Kh,textContent:qh,contains:Qh,getRootNode:ep,host:tp,styleSheets:rp,shadowRoot:np,querySelector:ip,querySelectorAll:sp,mutationObserver:Va,patch:De};function Q(r,e,t=document){let n={capture:true,passive:true};return t.addEventListener(r,e,n),()=>t.removeEventListener(r,e,n)}var We=`Please stop import mirror directly. Instead of that,\r
|
|
52
53
|
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
|
+
or you can use record.mirror to access the mirror instance during recording.`,io={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We);},has(){return console.error(We),false},reset(){console.error(We);}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(io=new Proxy(io,{get(r,e,t){return e==="map"&&console.error(We),Reflect.get(r,e,t)}}));function Ct(r,e,t={}){let n=null,i=0;return function(...s){let o=Date.now();!i&&t.leading===false&&(i=o);let l=e-(o-i),a=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),i=o,r.apply(a,s)):!n&&t.trailing!==false&&(n=setTimeout(()=>{i=t.leading===false?0:Date.now(),n=null,r.apply(a,s);},l));}}function Vr(r,e,t,n,i=window){let s=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,n?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),s&&s.set&&s.set.call(this,o);}}),()=>Vr(r,e,s||{},true)}var kr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(kr=()=>new Date().getTime());function Ga(r){var e,t,n,i;let s=r.document;return {left:s.scrollingElement?s.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((e=x.parentElement(s.body))==null?void 0:e.scrollLeft)||((t=s==null?void 0:s.body)==null?void 0:t.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=x.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function ja(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ya(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Xa(r){return r?r.nodeType===r.ELEMENT_NODE?r:x.parentElement(r):null}function ee(r,e,t,n){if(!r)return false;let i=Xa(r);if(!i)return false;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return !0}else if(Sr(i,e,n))return !0}catch(s){}return !!(t&&(i.matches(t)||n&&i.closest(t)!==null))}function op(r,e){return e.getId(r)!==-1}function Cn(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(r)===ht}function Za(r,e){if(ut(r))return false;let t=e.getId(r);if(!e.has(t))return true;let n=x.parentNode(r);return n&&n.nodeType===r.DOCUMENT_NODE?false:n?Za(n,e):true}function ri(r){return !!r.changedTouches}function ap(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function Ja(r,e){return !!(r.nodeName==="IFRAME"&&e.getMeta(r))}function Ka(r,e){return !!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function ni(r){return r?r instanceof ti&&"shadowRoot"in r?!!r.shadowRoot:!!x.shadowRoot(r):false}var ii=class{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}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 qa(r){var e;let t=null;return "getRootNode"in r&&((e=x.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(r))&&(t=x.host(x.getRootNode(r))),t}function lp(r){let e=r,t;for(;t=qa(e);)e=t;return e}function cp(r){let e=x.ownerDocument(r);if(!e)return false;let t=lp(r);return x.contains(e,t)}function Qa(r){let e=x.ownerDocument(r);return e?x.contains(e,r)||cp(r):false}var T=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(T||{}),R=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(R||{}),te=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(te||{}),ye=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(ye||{}),qe=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(qe||{}),He=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(He||{});var el=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(el||{});function so(r){return "__ln"in r}var si=class{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)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&&so(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t);}else if(e.nextSibling&&so(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.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--);}},oo=(r,e)=>`${r}@${e}`,oi=class{constructor(){v(this,"frozen",false),v(this,"locked",false),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new si,i=a=>{let c=a,u=ht;for(;u===ht;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},s=a=>{let c=x.parentNode(a);if(!c||!Qa(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=ut(c)?this.mirror.getId(qa(a)):this.mirror.getId(c),d=i(a);if(f===-1||d===-1)return n.addNode(a);let g=Ve(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=>{Ja(m,this.mirror)&&this.iframeManager.addIframe(m),Ka(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),ni(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)ao(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||s(a);for(let a of this.addedSet)!lo(this.droppedSet,a)&&!ao(this.removesSubTreeCache,a,this.mirror)||lo(this.movedSet,a)?s(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=i(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(i(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(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),s(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));}),v(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 n=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=br({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:wr(e),value:n,maskInputFn:this.maskInputFn});}),v(this,"processMutation",e=>{if(!Cn(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!ee(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:Eo(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,Xa(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){let o=wr(t);i=br({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn});}if(ee(e.target,this.blockClass,this.blockSelector,false)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)n="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Co(t.tagName,n))if(s.attributes[n]=So(this.doc,Ne(t.tagName),Ne(n),i),n==="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===""?s.styleDiff[l]=a:s.styleDiff[l]=[a,c]:s._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(s.styleDiff[l]=false);}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case "childList":{if(ee(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 n=this.mirror.getId(t),i=ut(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);ee(e.target,this.blockClass,this.blockSelector,false)||Cn(t,this.mirror,this.slimDOMOptions)||!op(t,this.mirror)||(this.addedSet.has(t)?(ai(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Za(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[oo(n,i)]?ai(this.movedSet,t):(this.removes.push({parentId:i,id:n,isShadow:ut(e.target)&&ft(e.target)?true:void 0}),up(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Cn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[oo(this.mirror.getId(e),n)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);ee(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(n=>this.genAdds(n)),ni(e)&&x.childNodes(x.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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 ai(r,e){r.delete(e),x.childNodes(e).forEach(t=>ai(r,t));}function up(r,e){let t=[r];for(;t.length;){let n=t.pop();e.has(n)||(e.add(n),x.childNodes(n).forEach(i=>t.push(i)));}}function ao(r,e,t){return r.size===0?false:fp(r,e)}function fp(r,e,t){let n=x.parentNode(e);return n?r.has(n):false}function lo(r,e){return r.size===0?false:tl(r,e)}function tl(r,e){let t=x.parentNode(e);return t?r.has(t)?true:tl(r,t):false}var dt;function dp(r){dt=r;}function hp(){dt=void 0;}var M=r=>dt?(...t)=>{try{return r(...t)}catch(n){if(dt&&dt(n)===true)return;throw n}}:r,ke=[];function Mt(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function rl(r,e){let t=new oi;ke.push(t),t.init(r);let n=new(Va())(M(t.processMutations.bind(t)));return n.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),n}function pp({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(e.mousemove===false)return ()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=Ct(M(f=>{let d=Date.now()-l;r(o.map(g=>(g.timeOffset-=d,g)),f),o=[],l=null;}),s),c=M(Ct(M(f=>{let d=Mt(f),{clientX:g,clientY:m}=ri(f)?f.changedTouches[0]:f;l||(l=kr()),o.push({x:g,y:m,id:n.getId(d),timeOffset:kr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?R.Drag:f instanceof MouseEvent?R.MouseMove:R.TouchMove);}),i,{trailing:!1})),u=[Q("mousemove",c,t),Q("touchmove",c,t),Q("drag",c,t)];return M(()=>{u.forEach(f=>f());})}function mp({mouseInteractionCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===false)return ()=>{};let o=s.mouseInteraction===true||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],a=null,c=u=>f=>{let d=Mt(f);if(ee(d,n,i,true))return;let g=null,m=u;if("pointerType"in f){switch(f.pointerType){case "mouse":g=ye.Mouse;break;case "touch":g=ye.Touch;break;case "pen":g=ye.Pen;break}g===ye.Touch?te[u]===te.MouseDown?m="TouchStart":te[u]===te.MouseUp&&(m="TouchEnd"):ye.Pen;}else ri(f)&&(g=ye.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===ye.Touch||m.startsWith("Mouse")&&g===ye.Mouse)&&(g=null)):te[u]===te.Click&&(g=a,a=null);let p=ri(f)?f.changedTouches[0]:f;if(!p)return;let h=t.getId(d),{clientX:y,clientY:w}=p;M(r)({type:te[m],id:h,x:y,y:w,...g!==null&&{pointerType:g}});};return Object.keys(te).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let f=Ne(u),d=c(u);if(window.PointerEvent)switch(te[u]){case te.MouseDown:case te.MouseUp:f=f.replace("mouse","pointer");break;case te.TouchStart:case te.TouchEnd:return}l.push(Q(f,d,e));}),M(()=>{l.forEach(u=>u());})}function nl({scrollCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:s}){let o=M(Ct(M(l=>{let a=Mt(l);if(!a||ee(a,n,i,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=Ga(e.defaultView);r({id:c,x:u.left,y:u.top});}else r({id:c,x:a.scrollLeft,y:a.scrollTop});}),s.scroll||100));return Q("scroll",o,e)}function gp({viewportResizeCb:r},{win:e}){let t=-1,n=-1,i=M(Ct(M(()=>{let s=ja(),o=Ya();(t!==s||n!==o)&&(r({width:Number(o),height:Number(s)}),t=s,n=o);}),200));return Q("resize",i,e)}var yp=["INPUT","TEXTAREA","SELECT"],co=new WeakMap;function bp({inputCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function f(w){let b=Mt(w),S=w.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=x.parentElement(b)),!b||!E||yp.indexOf(E)<0||ee(b,n,i,true)||b.classList.contains(s)||o&&b.matches(o))return;let I=b.value,P=false,A=wr(b)||"";A==="radio"||A==="checkbox"?P=b.checked:(l[E.toLowerCase()]||l[A])&&(I=br({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 F=b.name;A==="radio"&&F&&P&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach($=>{if($!==b){let D=$.value;d($,u?{text:D,isChecked:!P,userTriggered:false}:{text:D,isChecked:!P});}});}function d(w,b){let S=co.get(w);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){co.set(w,b);let E=t.getId(w);M(r)({...b,id:E});}}let m=(c.input==="last"?["change"]:["input","change"]).map(w=>Q(w,M(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(w=>w());};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(w=>Vr(w[0],w[1],{set(){M(f)({target:this,isTrusted:false});}},false,p))),M(()=>{m.forEach(w=>w());})}function Nr(r){let e=[];function t(n,i){if(cr("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||cr("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||cr("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||cr("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let o=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(o);}else if(n.parentStyleSheet){let o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o);}return i}return t(r,e)}function Ee(r,e,t){let n,i;return r?(r.ownerNode?n=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:n}):{}}function wp({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return ()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:M((u,f,d)=>{let[g,m]=d,{id:p,styleId:h}=Ee(f,e,t.styleMirror);return (p&&p!==-1||h&&h!==-1)&&r({id:p,styleId:h,adds:[{rule:g,index:m}]}),u.apply(f,d)})}),n.CSSStyleSheet.prototype.addRule=function(u,f,d=this.cssRules.length){let g=`${u} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[g,d])};let s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:M((u,f,d)=>{let[g]=d,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,removes:[{index:g}]}),u.apply(f,d)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:M((u,f,d)=>{let[g]=d,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replace:g}),u.apply(f,d)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,f,d)=>{let[g]=d,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replaceSync:g}),u.apply(f,d)})}));let a={};ur("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(ur("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),ur("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),ur("CSSSupportsRule")&&(a.CSSSupportsRule=n.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:M((d,g,m)=>{let[p,h]=m,{id:y,styleId:w}=Ee(g.parentStyleSheet,e,t.styleMirror);return (y&&y!==-1||w&&w!==-1)&&r({id:y,styleId:w,adds:[{rule:p,index:[...Nr(g),h||0]}]}),d.apply(g,m)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((d,g,m)=>{let[p]=m,{id:h,styleId:y}=Ee(g.parentStyleSheet,e,t.styleMirror);return (h&&h!==-1||y&&y!==-1)&&r({id:h,styleId:y,removes:[{index:[...Nr(g),p]}]}),d.apply(g,m)})});}),M(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=s,o&&(n.CSSStyleSheet.prototype.replace=o),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule;});})}function il({mirror:r,stylesheetManager:e},t){var n,i,s;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId(x.host(t));let l=t.nodeName==="#document"?(n=t.defaultView)==null?void 0:n.Document:(s=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.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}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function vp({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:n},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:M((l,a,c)=>{var u;let[f,d,g]=c;if(t.has(f))return s.apply(a,[f,d,g]);let{id:m,styleId:p}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,set:{property:f,value:d,priority:g},index:Nr(a.parentRule)}),l.apply(a,c)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:M((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:d,styleId:g}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (d&&d!==-1||g&&g!==-1)&&r({id:d,styleId:g,remove:{property:f},index:Nr(a.parentRule)}),l.apply(a,c)})}),M(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o;})}function Sp({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:n,sampling:i,doc:s}){let o=M(a=>Ct(M(c=>{let u=Mt(c);if(!u||ee(u,e,t,!0))return;let{currentTime:f,volume:d,muted:g,playbackRate:m,loop:p}=u;r({type:a,id:n.getId(u),currentTime:f,volume:d,muted:g,playbackRate:m,loop:p});}),i.media||500)),l=[Q("play",o(He.Play),s),Q("pause",o(He.Pause),s),Q("seeked",o(He.Seeked),s),Q("volumechange",o(He.VolumeChange),s),Q("ratechange",o(He.RateChange),s)];return M(()=>{l.forEach(a=>a());})}function Cp({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let n=[],i=new WeakMap,s=t.FontFace;t.FontFace=function(a,c,u){let f=new s(a,c,u);return i.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=De(e.fonts,"add",function(l){return function(a){return setTimeout(M(()=>{let c=i.get(a);c&&(r(c),i.delete(a));}),0),l.apply(this,[a])}});return n.push(()=>{t.FontFace=s;}),n.push(o),M(()=>{n.forEach(l=>l());})}function Ep(r){let{doc:e,mirror:t,blockClass:n,blockSelector:i,selectionCb:s}=r,o=true,l=M(()=>{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;ee(g,n,i,!0)||ee(p,n,i,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:h});}s({ranges:c});});return l(),Q("selectionchange",l)}function Ip({doc:r,customElementCb:e}){let t=r.defaultView;return !t||!t.customElements?()=>{}:De(t.customElements,"define",function(i){return function(s,o,l){try{e({define:{name:s}});}catch(a){console.warn(`Custom element callback failed for ${s}`);}return i.apply(this,[s,o,l])}})}function xp(r,e){let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:d,selectionCb:g,customElementCb:m}=r;r.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p);},r.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p);},r.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p);},r.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),s(...p);},r.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p);},r.inputCb=(...p)=>{e.input&&e.input(...p),l(...p);},r.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p);},r.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p);},r.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p);},r.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},r.fontCb=(...p)=>{e.font&&e.font(...p),d(...p);},r.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p);},r.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function Rp(r,e={}){let t=r.doc.defaultView;if(!t)return ()=>{};xp(r,e);let n;r.recordDOM&&(n=rl(r,r.doc));let i=pp(r),s=mp(r),o=nl(r),l=gp(r,{win:t}),a=bp(r),c=Sp(r),u=()=>{},f=()=>{},d=()=>{},g=()=>{};r.recordDOM&&(u=wp(r,{win:t}),f=il(r,r.doc),d=vp(r,{win:t}),r.collectFonts&&(g=Cp(r)));let m=Ep(r),p=Ip(r),h=[];for(let y of r.plugins)h.push(y.observer(y.callback,t,y.options));return M(()=>{ke.forEach(y=>y.reset()),n==null||n.disconnect(),i(),s(),o(),l(),a(),c(),u(),f(),d(),g(),m(),p(),h.forEach(y=>y());})}function cr(r){return typeof window[r]!="undefined"}function ur(r){return !!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}var _r=class{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,n,i){let s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=s.get(t);return l||(l=this.generateIdFn(),s.set(t,l),o.set(l,t)),l}getIds(e,t){let n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(s=>this.getId(e,s,n,i))}getRemoteId(e,t,n){let i=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let s=i.get(t);return s||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,n))}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}},li=class{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new _r(vo)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _r(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 n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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 i=this.crossOriginIframeMap.get(e.source);if(!i)return;let s=this.transformCrossOriginEvent(i,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout);}transformCrossOriginEvent(e,t){var n;switch(t.type){case T.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:T.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case T.Meta:case T.Load:case T.DomContentLoaded:return false;case T.Plugin:return t;case T.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case T.IncrementalSnapshot:switch(t.data.source){case R.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s);}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"]);}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"]);}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"]);}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"]);}),t;case R.ViewportResize:return false;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"]);}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"]);}),t}}return false}replace(e,t,n,i){for(let s of i)!Array.isArray(t[s])&&typeof t[s]!="number"||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t);});}patchRootIdOnNode(e,t){e.type!==el.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t);});}},ci=class{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!ft(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=rl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(nl({...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(il({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 n=this;this.restoreHandlers.push(De(e.prototype,"attachShadow",function(i){return function(s){let o=i.call(this,s),l=x.shadowRoot(this);return l&&Qa(this)&&n.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(ct=0;ct<Ge.length;ct++)Mp[Ge.charCodeAt(ct)]=ct;var ct,Tp=function(r){var e=new Uint8Array(r),t,n=e.length,i="";for(t=0;t<n;t+=3)i+=Ge[e[t]>>2],i+=Ge[(e[t]&3)<<4|e[t+1]>>4],i+=Ge[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ge[e[t+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var uo=new Map;function Ap(r,e){let t=uo.get(r);return t||(t=new Map,uo.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}var sl=(r,e,t)=>{if(!r||!(al(r,e)||typeof r=="object"))return;let n=r.constructor.name,i=Ap(t,n),s=i.indexOf(r);return s===-1&&(s=i.length,i.push(r)),s};function mr(r,e,t){if(r instanceof Array)return r.map(n=>mr(n,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return {rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){let n=r.constructor.name,i=Tp(r);return {rr_type:n,base64:i}}else {if(r instanceof DataView)return {rr_type:r.constructor.name,args:[mr(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){let n=r.constructor.name,{src:i}=r;return {rr_type:n,src:i}}else if(r instanceof HTMLCanvasElement){let n="HTMLImageElement",i=r.toDataURL();return {rr_type:n,src:i}}else {if(r instanceof ImageData)return {rr_type:r.constructor.name,args:[mr(r.data,e,t),r.width,r.height]};if(al(r,e)||typeof r=="object"){let n=r.constructor.name,i=sl(r,e,t);return {rr_type:n,index:i}}}}return r}var ol=(r,e,t)=>r.map(n=>mr(n,e,t)),al=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>r instanceof e[i]);function kp(r,e,t,n){let i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=De(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return ee(this.canvas,t,n,!0)||setTimeout(()=>{let u=ol(c,e,this);r(this.canvas,{type:qe["2D"],property:o,args:u});},0),a.apply(this,c)}});i.push(l);}catch(l){let a=Vr(e.CanvasRenderingContext2D.prototype,o,{set(c){r(this.canvas,{type:qe["2D"],property:o,args:[c],setter:true});}});i.push(a);}return ()=>{i.forEach(o=>o());}}function Np(r){return r==="experimental-webgl"?"webgl":r}function fo(r,e,t,n){let i=[];try{let s=De(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!ee(this,e,t,!0)){let c=Np(l);if("__context"in this||(this.__context=c),n&&["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])}});i.push(s);}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{i.forEach(s=>s());}}function ho(r,e,t,n,i,s){let o=[],l=Object.getOwnPropertyNames(r);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;let c=De(r,a,function(u){return function(...f){let d=u.apply(this,f);if(sl(d,s,this),"tagName"in this.canvas&&!ee(this.canvas,n,i,!0)){let g=ol(f,s,this),m={type:e,property:a,args:g};t(this.canvas,m);}return d}});o.push(c);}catch(c){let u=Vr(r,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:true});}});o.push(u);}return o}function _p(r,e,t,n){let i=[];return i.push(...ho(e.WebGLRenderingContext.prototype,qe.WebGL,r,t,n,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...ho(e.WebGL2RenderingContext.prototype,qe.WebGL2,r,t,n,e)),()=>{i.forEach(s=>s());}}var ll="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Op=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),po=typeof window!="undefined"&&window.Blob&&new Blob([Op(ll)],{type:"text/javascript;charset=utf-8"});function Dp(r){let e;try{if(e=po&&(window.URL||window.webkitURL).createObjectURL(po),!e)throw "";let t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch(t){return new Worker("data:text/javascript;base64,"+ll,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var ui=class{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",false),v(this,"locked",false),v(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:n,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(n,i,s),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,i,s,{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,n,i,s){let o=fo(t,n,i,true),l=new Map,a=new Dp;a.onmessage=m=>{let{id:p}=m.data;if(l.set(p,false),!("base64"in m.data))return;let{base64:h,type:y,width:w,height:b}=m.data;this.mutationCb({id:p,type:qe["2D"],commands:[{property:"clearRect",args:[0,0,w,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=>{ee(p,n,i,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 w=await createImageBitmap(p);a.postMessage({id:y,bitmap:w,width:p.width,height:p.height,dataURLOptions:s.dataURLOptions},[w]);}),f=requestAnimationFrame(g);};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=fo(e,t,n,false),s=kp(this.processMutation.bind(this),e,t,n),o=_p(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{i(),s(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let i=n.map(o=>{let{type:l,...a}=o;return a}),{type:s}=n[0];this.mutationCb({id:t,type:s,commands:i}),this.pendingCanvasMutations.delete(e);}},fi=class{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new ii),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 n={id:t,styleIds:[]},i=[];for(let s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,a)=>({rule:bo(l,s.href),index:a}))})),n.styleIds.push(o);}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},di=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",false);}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==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,gr,En,Or=false;try{if(Array.from([1],r=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((ys=r.contentWindow)==null?void 0:ys.Array.from)||Array.from,document.body.removeChild(r);}}catch(r){console.debug("Unable to override Array.from",r);}var ce=Uc();function Ce(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:s=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:w={},dataURLOptions:b={},mousemoveWait:S,recordDOM:E=true,recordCanvas:I=false,recordCrossOriginIframes:P=false,recordAfter:A=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:F=false,collectFonts:$=false,inlineImages:D=false,plugins:q,keepIframeSrcFn:C=()=>false,ignoreCSSAttributes:re=new Set([]),errorHandler:Re}=r;dp(Re);let j=P?window.parent===window:true,se=false;if(!j)try{window.parent.document&&(se=!1);}catch(k){se=true;}if(j&&!e)throw new Error("emit function is required");if(!j&&!se)return ()=>{};S!==void 0&&w.mousemove===void 0&&(w.mousemove=S),ce.reset();let Me=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},he=Io(g);ap();let Qi,on=0,es=k=>{for(let le of q||[])le.eventProcessor&&(k=le.eventProcessor(k));return y&&!se&&(k=y(k)),k};G=(k,le)=>{var z;let V=k;if(V.timestamp=kr(),(z=ke[0])!=null&&z.isFrozen()&&V.type!==T.FullSnapshot&&!(V.type===T.IncrementalSnapshot&&V.data.source===R.Mutation)&&ke.forEach(ne=>ne.unfreeze()),j)e==null||e(es(V),le);else if(se){let ne={type:"rrweb",event:es(V),origin:window.location.origin,isCheckout:le};window.parent.postMessage(ne,"*");}if(V.type===T.FullSnapshot)Qi=V,on=0;else if(V.type===T.IncrementalSnapshot){if(V.data.source===R.Mutation&&V.data.isAttachIframe)return;on++;let ne=n&&on>=n,O=t&&V.timestamp-Qi.timestamp>t;(ne||O)&&gr(true);}};let Dt=k=>{G({type:T.IncrementalSnapshot,data:{source:R.Mutation,...k}});},ts=k=>G({type:T.IncrementalSnapshot,data:{source:R.Scroll,...k}}),rs=k=>G({type:T.IncrementalSnapshot,data:{source:R.CanvasMutation,...k}}),ec=k=>G({type:T.IncrementalSnapshot,data:{source:R.AdoptedStyleSheet,...k}}),Te=new fi({mutationCb:Dt,adoptedStyleSheetCb:ec}),Ae=new li({mirror:ce,mutationCb:Dt,stylesheetManager:Te,recordCrossOriginIframes:P,wrappedEmit:G});for(let k of q||[])k.getMirror&&k.getMirror({nodeMirror:ce,crossOriginIframeMirror:Ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ae.crossOriginIframeStyleMirror});let an=new di;En=new ui({recordCanvas:I,mutationCb:rs,win:window,blockClass:i,blockSelector:s,mirror:ce,sampling:w.canvas,dataURLOptions:b});let Lt=new ci({mutationCb:Dt,scrollCb:ts,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:Me,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:I,inlineImages:D,sampling:w,slimDOMOptions:he,iframeManager:Ae,stylesheetManager:Te,canvasManager:En,keepIframeSrcFn:C,processedNodeManager:an},mirror:ce});gr=(k=false)=>{if(!E)return;G({type:T.Meta,data:{href:window.location.href,width:Ya(),height:ja()}},k),Te.reset(),Lt.init(),ke.forEach(z=>z.lock());let le=uu(document,{mirror:ce,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:Me,maskTextFn:p,maskInputFn:m,slimDOM:he,dataURLOptions:b,recordCanvas:I,inlineImages:D,onSerialize:z=>{Ja(z,ce)&&Ae.addIframe(z),Ka(z,ce)&&Te.trackLinkElement(z),ni(z)&&Lt.addShadowRoot(x.shadowRoot(z),document);},onIframeLoad:(z,V)=>{Ae.attachIframe(z,V),Lt.observeAttachShadow(z);},onStylesheetLoad:(z,V)=>{Te.attachLinkElement(z,V);},keepIframeSrcFn:C});if(!le)return console.warn("Failed to snapshot the document");G({type:T.FullSnapshot,data:{node:le,initialOffset:Ga(window)}},k),ke.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Te.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document));};try{let k=[],le=V=>{var ne;return M(Rp)({mutationCb:Dt,mousemoveCb:(O,ln)=>G({type:T.IncrementalSnapshot,data:{source:ln,positions:O}}),mouseInteractionCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.MouseInteraction,...O}}),scrollCb:ts,viewportResizeCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.ViewportResize,...O}}),inputCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.Input,...O}}),mediaInteractionCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.MediaInteraction,...O}}),styleSheetRuleCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.StyleSheetRule,...O}}),styleDeclarationCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.StyleDeclaration,...O}}),canvasMutationCb:rs,fontCb:O=>G({type:T.IncrementalSnapshot,data:{source:R.Font,...O}}),selectionCb:O=>{G({type:T.IncrementalSnapshot,data:{source:R.Selection,...O}});},customElementCb:O=>{G({type:T.IncrementalSnapshot,data:{source:R.CustomElement,...O}});},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:Me,inlineStylesheet:u,sampling:w,recordDOM:E,recordCanvas:I,inlineImages:D,userTriggeredOnInput:F,collectFonts:$,doc:V,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:C,blockSelector:s,slimDOMOptions:he,dataURLOptions:b,mirror:ce,iframeManager:Ae,stylesheetManager:Te,shadowDomManager:Lt,processedNodeManager:an,canvasManager:En,ignoreCSSAttributes:re,plugins:((ne=q==null?void 0:q.filter(O=>O.observer))==null?void 0:ne.map(O=>({observer:O.observer,options:O.options,callback:ln=>G({type:T.Plugin,data:{plugin:O.name,payload:ln}})})))||[]},h)};Ae.addLoadListener(V=>{try{k.push(le(V.contentDocument));}catch(ne){console.warn(ne);}});let z=()=>{gr(),k.push(le(document)),Or=!0;};return ["interactive","complete"].includes(document.readyState)?z():(k.push(Q("DOMContentLoaded",()=>{G({type:T.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&z();})),k.push(Q("load",()=>{G({type:T.Load,data:{}}),A==="load"&&z();},window))),()=>{k.forEach(V=>{try{V();}catch(ne){String(ne).toLowerCase().includes("cross-origin")||console.warn(ne);}}),an.destroy(),Or=!1,hp();}}catch(k){console.warn(k);}}Ce.addCustomEvent=(r,e)=>{if(!Or)throw new Error("please add custom event after start recording");G({type:T.Custom,data:{tag:r,payload:e}});};Ce.freezePage=()=>{ke.forEach(r=>r.freeze());};Ce.takeFullSnapshot=r=>{if(!Or)throw new Error("please take full snapshot after start recording");gr(r);};Ce.mirror=ce;var mo;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped";})(mo||(mo={}));var Lp="https://blocfeed.com/api/replay-events";function cl(r){var q;if(!r.config.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=Y();if($t(e)%100/100>=r.config.sampling)return ()=>{};let n=Date.now(),i=(q=r.config.endpoint)!=null?q:Lp,s=[],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 re=sessionStorage.getItem(f);re&&(g=parseInt(re,10)||0);}catch(C){}let m=(C=false)=>{if(s.length===0)return;let re=C?Fp(s):s;s=[],o=0;let Re=d++;try{sessionStorage.setItem(u,String(d));}catch(j){}$p({blocfeedId:r.blocfeedId,sessionId:e,sessionStartedAtMs:n,chunkSeq:Re,events:re,endpoint:i,useBeacon:C,pauseCount:g});},p=setInterval(()=>{l||m();},r.config.flushIntervalMs),h=setTimeout(()=>{m(),D();},r.config.maxDurationMs),y=null,w=()=>{y&&clearTimeout(y),y=setTimeout(()=>{F();},r.config.inactivityTimeoutMs);},b=()=>{m(true);};window.addEventListener("pagehide",b);let S=r.config.masking,E={emit(C){l||(s.push(C),o+=Pp(C),w(),o>=r.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=Ce(E))!=null?C:null;}function F(){if(l||a)return;a=true,g++;try{sessionStorage.setItem(f,String(g));}catch(re){}if(m(),c){try{c();}catch(re){}c=null;}y&&(clearTimeout(y),y=null);let C=()=>{P(),$();};I=C,document.addEventListener("pointerdown",C,{capture:true,once:true}),document.addEventListener("keydown",C,{capture:true,once:true});}function $(){l||!a||(a=false,A(),w());}w(),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 Pp(r){try{return JSON.stringify(r).length}catch(e){return 1024}}function Fp(r){let t=JSON.stringify(r);if(t.length<=6e4)return r;let n=[...r];for(;n.length>1;)if(n.shift(),t=JSON.stringify(n),t.length<=6e4)return n;return n}async function $p(r){let e=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:r.sessionId,session_started_at_ms:r.sessionStartedAtMs,chunk_seq:r.chunkSeq,pause_count:r.pauseCount,events:r.events,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:""});if(r.useBeacon&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let n=new Blob([e],{type:"application/json"});navigator.sendBeacon(r.endpoint,n);return}catch(n){}let t=!!r.useBeacon;try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:e,...t?{keepalive:!0}:{}});}catch(n){}}var Bp={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 ul(r){var t,n,i,s,o,l,a,c;let e=Bp;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,endpoint:(n=r==null?void 0:r.endpoint)!=null?n:e.endpoint,maxDurationMs:(i=r==null?void 0:r.maxDurationMs)!=null?i:e.maxDurationMs,flushIntervalMs:(s=r==null?void 0:r.flushIntervalMs)!=null?s:e.flushIntervalMs,flushSizeBytes:(o=r==null?void 0:r.flushSizeBytes)!=null?o:e.flushSizeBytes,inactivityTimeoutMs:(l=r==null?void 0:r.inactivityTimeoutMs)!=null?l:e.inactivityTimeoutMs,sampling:(a=r==null?void 0:r.sampling)!=null?a:e.sampling,masking:{...e.masking,...(c=r==null?void 0:r.masking)!=null?c:{}}}}var Up="https://blocfeed.com/api/events/track",Wp=5e3,Hp=50,zp=1024,Yr="blocfeed-events-queue",fl=500,dl=100,Vp=/^[a-z][a-z0-9_]{0,127}$/,hl=50,pl=1024,ml;function Xr(r){ml=r;}function Gp(r){if(typeof r!="string"||!Vp.test(r))throw new Error(`[BlocFeed] track(): event_name "${r}" must match /^[a-z][a-z0-9_]{0,127}$/ (lowercase, start with a letter, only [a-z0-9_], \u2264128 chars).`)}function jp(r){if(r===void 0)return {};if(r===null||typeof r!="object"||Array.isArray(r))throw new Error("[BlocFeed] track(): properties must be a plain object.");let e=Object.keys(r);if(e.length>hl)throw new Error(`[BlocFeed] track(): properties has ${e.length} keys, max ${hl}.`);for(let n of e){let i=r[n];if(i!==null&&typeof i!="string"&&typeof i!="number"&&typeof i!="boolean")throw new Error(`[BlocFeed] track(): property "${n}" has unsupported type "${typeof i}". Allowed: string | number | boolean | null.`)}let t;try{t=JSON.stringify(r);}catch(n){throw new Error(`[BlocFeed] track(): properties is not JSON-serializable (${n.message}).`)}if(t.length>pl)throw new Error(`[BlocFeed] track(): properties serialized to ${t.length} bytes, max ${pl}. Server allows 8192 bytes \u2014 the client cap is defensive; trim down or split the event.`);return r}function Pi(){if(typeof localStorage=="undefined")return [];try{let r=localStorage.getItem(Yr);if(!r)return [];let e=JSON.parse(r);return Array.isArray(e)?e:[]}catch(r){try{localStorage.removeItem(Yr);}catch(e){}return []}}function Fi(r){if(typeof localStorage!="undefined")try{if(r.length===0)localStorage.removeItem(Yr);else {let e=r.length>fl?r.slice(r.length-fl):r;localStorage.setItem(Yr,JSON.stringify(e));}}catch(e){}}var ae=null;function Yp(){if(ae)return ae;if(typeof window=="undefined")return null;let r=Xp();return r?(ae={blocfeedId:r,endpoint:Up,events:[],bytes:0,flushTimer:null,pageHideHandler:null,visibilityHandler:null},ae.flushTimer=setInterval(()=>{jr(false);},Wp),ae.pageHideHandler=()=>{jr(true);},ae.visibilityHandler=()=>{document.visibilityState==="hidden"&&jr(true);},window.addEventListener("pagehide",ae.pageHideHandler),document.addEventListener("visibilitychange",ae.visibilityHandler),ae):null}function Xp(){try{let e=window.__blocfeed_id__;return typeof e=="string"&&e.length>0?e:null}catch(r){return null}}function gl(r){try{window.__blocfeed_id__=r;}catch(e){}ae&&(ae.blocfeedId=r);}function $i(r,e,t){var f,d,g;Gp(r);let n=jp(e),i=new Date().toISOString(),s={event_name:r,properties:n,occurred_at:i},o=(f=void 0)!=null?f:Jp();o&&(s.session_id=o);let l=(d=void 0)!=null?d:ml;l&&(s.user_id=l);let a=(g=void 0)!=null?g:Kp();a&&(s.page_url=a);let c=qp();c&&(s.user_agent=c);let u=Yp();if(!u){let m=Pi();m.push(s),Fi(m);return}u.events.push(s),u.bytes+=Zp(s),(u.events.length>=Hp||u.bytes>=zp)&&jr(false);}async function jr(r){let e=ae;if(!e)return;let n=Pi().concat(e.events);if(e.events=[],e.bytes=0,Fi([]),n.length!==0)for(let i=0;i<n.length;i+=dl){let s=n.slice(i,i+dl),o=JSON.stringify({blocfeed_id:e.blocfeedId,events:s});if(r&&em())try{let l=new Blob([o],{type:"application/json"});navigator.sendBeacon(e.endpoint,l)||Gr(s);continue}catch(l){Gr(s);continue}try{(await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||Gr(s);}catch(l){Gr(s);}}}function Gr(r){let e=Pi();Fi(e.concat(r));}function Zp(r){try{return JSON.stringify(r).length}catch(e){return 256}}function Jp(){try{return Y()}catch(r){return}}function Kp(){try{return typeof window!="undefined"?window.location.href:void 0}catch(r){return}}function qp(){try{return typeof navigator!="undefined"?navigator.userAgent:void 0}catch(r){return}}function em(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}var tm="https://blocfeed.com/api/heartbeat",rm=300*1e3;function yl(r){var l,a,c;if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=(l=r.endpoint)!=null?l:tm,t=(a=r.intervalMs)!=null?a:rm,n=(c=r.features)!=null?c:["replay","behavioral","customEvents"],i=u=>{try{let f=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:nm(),version:r.version,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:"",sdk_features:n}),d={method:"POST",headers:{"Content-Type":"application/json"},body:f};u&&(d.keepalive=!0),fetch(e,d).catch(()=>{});}catch(f){}};try{i(!1);}catch(u){}let s=null;try{s=setInterval(()=>{try{i(!1);}catch(u){}},t);}catch(u){s=null;}let o=()=>{try{i(!0);}catch(u){}};try{window.addEventListener("pagehide",o);}catch(u){}return function(){try{s&&clearInterval(s);}catch(f){}s=null;try{window.removeEventListener("pagehide",o);}catch(f){}}}function nm(){try{return Y()}catch(r){return ""}}var Zr="0.23.0";var im=5e3,Jr=class{constructor(e){this.submitter=null;this.detectorUninstallers=[];this.flushTimer=null;this.pageHideHandler=null;this.installed=false;this.opts=e,this.resolved=ns(e.config);}install(){var l,a,c,u;if(this.installed||!this.resolved.enabled)return;let e=()=>{try{let f=Y();return $t(f)%100/100<this.resolved.sampling}catch(f){return false}};if(!((l=this.opts.passiveSampler)!=null?l:e)())return;gl(this.opts.blocfeedId);let n=(a=this.opts.endpoint)!=null?a:"https://blocfeed.com/api/behavioral-events";this.submitter=(c=this.opts.submitter)!=null?c:is({endpoint:n,blocfeedId:this.opts.blocfeedId});let i=f=>{var d;(d=this.submitter)==null||d.enqueue(f);};this.detectorUninstallers.push(us(this.resolved,i)),this.detectorUninstallers.push(hs(this.resolved,i)),this.detectorUninstallers.push(ps(this.resolved,i)),this.detectorUninstallers.push(ms(this.resolved,i)),this.detectorUninstallers.push(gs(this.resolved,i));let s=ul((u=this.opts.config)==null?void 0:u.sessionReplay);this.detectorUninstallers.push(cl({blocfeedId:this.opts.blocfeedId,config:s}));let o=["behavioral","customEvents"];if(s.enabled&&o.unshift("replay"),this.opts.extraSdkFeatures)for(let f of this.opts.extraSdkFeatures)o.push(f);this.detectorUninstallers.push(yl({blocfeedId:this.opts.blocfeedId,version:Zr,features:o})),this.flushTimer=setInterval(()=>{var f;(f=this.submitter)==null||f.flush();},im),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(n){}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 Vm="blocfeed-embed/ready",Gm="blocfeed-embed/screenshot-request",jm="blocfeed-embed/submit-success",Ym="blocfeed-embed/close",Xm="blocfeed-embed/init",Zm="blocfeed-embed/screenshot-result",_t=null;function Jm(r,e,t){r.style.position="fixed",r.style.zIndex="2147483647",r.style.background=e,r.style.color="#ffffff",r.style.border="0",r.style.borderRadius="24px",r.style.padding="12px 20px",r.style.fontSize="14px",r.style.fontWeight="600",r.style.fontFamily="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",r.style.cursor="pointer",r.style.boxShadow="0 8px 16px rgba(0,0,0,0.18)",r.style.lineHeight="1",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="";let n="16px";t==="bottom-right"?(r.style.bottom=n,r.style.right=n):t==="bottom-left"?(r.style.bottom=n,r.style.left=n):t==="top-right"?(r.style.top=n,r.style.right=n):(r.style.top=n,r.style.left=n);}function Km(r,e){r.style.position="fixed",r.style.width="380px",r.style.height="600px",r.style.border="0",r.style.borderRadius="12px",r.style.boxShadow="0 25px 50px -12px rgba(0,0,0,0.4)",r.style.zIndex="2147483646",r.style.display="none",r.style.background="transparent",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="",e==="bottom-right"?(r.style.bottom="80px",r.style.right="16px"):e==="bottom-left"?(r.style.bottom="80px",r.style.left="16px"):e==="top-right"?(r.style.top="80px",r.style.right="16px"):(r.style.top="80px",r.style.left="16px");}function qm(r,e){return `${r.replace(/\/+$/,"")}/embed/${encodeURIComponent(e)}`}async function Qm(){try{let r=await Promise.resolve().then(()=>(Vl(),zl)),e=typeof devicePixelRatio=="number"?devicePixelRatio:1;return {dataUrl:await r.toPng(document.body,{pixelRatio:Math.min(2,e),cacheBust:!0})}}catch(r){return {dataUrl:null,error:r instanceof Error?r.message:String(r)}}}function Gl(r,e,t){let n=r.contentWindow;if(n)try{n.postMessage(t,e);}catch(i){}}function jl(r){if(_t){try{_t();}catch(d){}_t=null;}if(typeof window=="undefined"||typeof document=="undefined")return ()=>{};let{blocfeedId:e,embedOrigin:t,color:n,label:i,position:s,user:o}=r,l=document.createElement("button");l.setAttribute("data-blocfeed-trigger",""),l.setAttribute("type","button"),l.setAttribute("aria-label","Open feedback"),l.textContent=i,Jm(l,n,s);let a=document.createElement("iframe");a.setAttribute("data-blocfeed-iframe",""),a.setAttribute("title","BlocFeed feedback"),a.setAttribute("allow","microphone; clipboard-write"),a.src=qm(t,e),Km(a,s);let c=()=>{a.style.display="block";};l.addEventListener("click",c);let u=d=>{if(d.origin!==t)return;let g=d.data;if(!(!g||typeof g!="object"||typeof g.kind!="string")){if(g.kind===Vm){let m={kind:Xm,pageUrl:window.location.href,userAgent:navigator.userAgent,sessionId:Y(),...o!==void 0?{user:o}:{}};Gl(a,t,m);return}if(g.kind===Gm){let m=g.requestId;Qm().then(p=>{Gl(a,t,{kind:Zm,requestId:m,dataUrl:p.dataUrl,...p.error!==void 0?{error:p.error}:{}});});return}if(g.kind===jm){try{console.log("[BlocFeed] feedback submitted",{feedback_id:g.feedback_id,viewer_url:g.viewer_url});}catch(m){}return}if(g.kind===Ym){a.style.display="none";return}}};window.addEventListener("message",u),document.body.appendChild(l),document.body.appendChild(a);let f=()=>{try{l.removeEventListener("click",c);}catch(d){}try{window.removeEventListener("message",u);}catch(d){}l.parentNode&&l.parentNode.removeChild(l),a.parentNode&&a.parentNode.removeChild(a),_t=null;};return _t=f,f}function eg(r){let e=(r!=null?r:"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]"}}var ji="https://blocfeed.com",Xl="#12D393",Zl="Feedback",Yl="bottom-right",tg=new Set(["bottom-right","bottom-left","top-right","top-left"]);function Yi(r){if(!r)return ji;let e=r.trim();return e&&(e.startsWith("https://")||/^http:\/\/localhost(?::\d+)?(\/.*)?$/i.test(e))?e:ji}function Xi(r){if(!r)return Yl;let e=r.toLowerCase();return tg.has(e)?e:Yl}function rg(r){var m;let e=r.blocfeedId;if(!e)return null;let t=parseFloat((m=r.sample)!=null?m:"1"),n=Number.isFinite(t)&&t>0?t:1,i=r.replay!=="false",s=r.signals!=="false",o=r.mask!==void 0?eg(r.mask):void 0,l={sampling:n,sessionReplay:{enabled:i,sampling:n,...o!==void 0?{masking:o}:{}},rageClick:{enabled:s},deadClick:{enabled:s},httpFail:{enabled:s},redirectLoop:{enabled:s},formDataLoss:{enabled:s}},a=r.userId||r.userEmail||r.userName?{...r.userId!==void 0?{id:r.userId}:{},...r.userEmail!==void 0?{email:r.userEmail}:{},...r.userName!==void 0?{name:r.userName}:{}}:void 0,c=r.feedback==="true",u=Yi(r.embedOrigin),f=r.feedbackColor&&r.feedbackColor.trim()?r.feedbackColor.trim():Xl,d=r.feedbackLabel&&r.feedbackLabel.trim()?r.feedbackLabel:Zl,g=Xi(r.feedbackPosition);return {blocfeedId:e,...a!==void 0?{user:a}:{},config:l,trackClicks:r.trackClicks==="true",feedback:c,embedOrigin:u,feedbackColor:f,feedbackLabel:d,feedbackPosition:g}}function rn(r){if(typeof r!="object"||r===null)return false;let e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function Zi(r,e){if(e===void 0)return r;if(!rn(r)||!rn(e))return e;let t={...r};for(let n of Object.keys(e)){let i=e[n];if(i===void 0)continue;let s=t[n];rn(i)&&rn(s)?t[n]=Zi(s,i):t[n]=i;}return t}function Jl(){if(typeof window=="undefined")return null;let r=window.blocfeedConfig;return !r||typeof r!="object"?null:r}function Kl(r){let e={};return r.sampling!==void 0&&(e.sampling=r.sampling),r.ignoreSelectors!==void 0&&(e.ignoreSelectors=r.ignoreSelectors),r.rageClick!==void 0&&(e.rageClick=r.rageClick),r.deadClick!==void 0&&(e.deadClick=r.deadClick),r.httpFail!==void 0&&(e.httpFail=r.httpFail),r.redirectLoop!==void 0&&(e.redirectLoop=r.redirectLoop),r.formDataLoss!==void 0&&(e.formDataLoss=r.formDataLoss),r.sessionReplay!==void 0&&(e.sessionReplay=r.sessionReplay),e}function Ji(r,e){var p,h,y,w,b,S,E;let t=(p=r==null?void 0:r.blocfeedId)!=null?p:e==null?void 0:e.blocfeed_id;if(!t)return null;let n=e?Kl(e):{},i=r?Zi(n,r.config):n,s=e==null?void 0:e.user,o=r==null?void 0:r.user,l;(o||s)&&(l={...s!=null&&s.id?{id:s.id}:{},...s!=null&&s.email?{email:s.email}:{},...s!=null&&s.name?{name:s.name}:{},...o!=null&&o.id?{id:o.id}:{},...o!=null&&o.email?{email:o.email}:{},...o!=null&&o.name?{name:o.name}:{}},!l.id&&!l.email&&!l.name&&(l=void 0));let a=(r==null?void 0:r.trackClicks)===true?true:(e==null?void 0:e.trackClicks)!==void 0?!!e.trackClicks:false,c=(r==null?void 0:r.feedback)===true?true:((h=e==null?void 0:e.feedback)==null?void 0:h.enabled)!==void 0?!!e.feedback.enabled:false,u=r?r.embedOrigin:Yi(e==null?void 0:e.embedOrigin),f=r?r.feedbackColor:((w=(y=e==null?void 0:e.feedback)==null?void 0:y.color)==null?void 0:w.trim())||Xl,d=r?r.feedbackLabel:((S=(b=e==null?void 0:e.feedback)==null?void 0:b.label)==null?void 0:S.trim())||Zl,g=r?r.feedbackPosition:Xi((E=e==null?void 0:e.feedback)==null?void 0:E.position),m=(e==null?void 0:e.autoInstall)!==false;return {blocfeedId:t,...l!==void 0?{user:l}:{},config:i,trackClicks:a,feedback:c,embedOrigin:u,feedbackColor:f,feedbackLabel:d,feedbackPosition:g,autoInstall:m}}var ng=60;function ig(){if(typeof document=="undefined")return ()=>{};let r=[],e=t=>{var o,l;let n=Date.now();if(r=r.filter(a=>n-a<6e4),r.length>=ng)return;r.push(n);let i=t.target;if(!i||!(i instanceof Element))return;let s=null;try{s=(l=(o=i.innerText)==null?void 0:o.trim().slice(0,80))!=null?l:null;}catch(a){s=null;}try{$i("click",{tag:i.tagName.toLowerCase(),text:s||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){}}}var X=null,Ie=null,nn=null,Ot=null,xe=false;function Ki(r){var e;if(!Ie){if((e=r.user)!=null&&e.id&&Xr(r.user.id),Ie=new Jr({blocfeedId:r.blocfeedId,config:r.config,extraSdkFeatures:["script-tag"]}),Ie.install(),r.trackClicks&&!Ot&&(Ot=ig()),r.feedback)try{nn=jl({blocfeedId:r.blocfeedId,embedOrigin:r.embedOrigin,color:r.feedbackColor,label:r.feedbackLabel,position:r.feedbackPosition,...r.user!==void 0?{user:r.user}:{}});}catch(t){}xe=true;}}function qi(){if(Ie){try{Ie.uninstall();}catch(r){}Ie=null;}if(nn){try{nn();}catch(r){}nn=null;}if(Ot){try{Ot();}catch(r){}Ot=null;}}function sg(r){var e,t;if(!(!r||typeof r!="object")){if(X){let n=Kl(r),i={...X,config:Zi(X.config,n)};r.user!==void 0&&(i.user={...(e=X.user)!=null?e:{},...r.user.id!==void 0?{id:r.user.id}:{},...r.user.email!==void 0?{email:r.user.email}:{},...r.user.name!==void 0?{name:r.user.name}:{}}),r.trackClicks!==void 0&&(i.trackClicks=!!r.trackClicks),r.embedOrigin!==void 0&&(i.embedOrigin=Yi(r.embedOrigin)),r.feedback&&(r.feedback.enabled!==void 0&&(i.feedback=!!r.feedback.enabled),r.feedback.color!==void 0&&r.feedback.color.trim()&&(i.feedbackColor=r.feedback.color.trim()),r.feedback.label!==void 0&&r.feedback.label.trim()&&(i.feedbackLabel=r.feedback.label),r.feedback.position!==void 0&&(i.feedbackPosition=Xi(r.feedback.position))),r.autoInstall!==void 0&&(i.autoInstall=!!r.autoInstall),r.blocfeed_id!==void 0&&r.blocfeed_id&&(i.blocfeedId=r.blocfeed_id),X=i;}else X=Ji(null,r);xe&&X&&(qi(),xe=false,Ki(X)),(t=r.user)!=null&&t.id&&Xr(r.user.id);}}function og(r,e){var t;Xr(r),X&&(X.user={...(t=X.user)!=null?t:{},id:r});}function ag(r,e){$i(r,e);}function lg(){if(!(xe&&Ie)){if(X||(X=Ji(null,Jl())),!X){console.warn("[BlocFeed] install() called but no blocfeed_id is configured");return}Ki(X);}}function cg(){qi(),xe=false;}var ql={configure:sg,identify:og,track:ag,install:lg,uninstall:cg,SDK_VERSION:Zr};function ug(r){if(typeof window=="undefined")return;let e=window.BlocFeed;if(e&&Array.isArray(e._q))for(let t of e._q){if(!Array.isArray(t)||typeof t[0]!="string")continue;let[n,...i]=t,s=r[n];if(typeof s=="function")try{s.apply(r,i);}catch(o){console.error("[BlocFeed] queued call failed:",n,o);}}window.BlocFeed=r;}function Ql(){if(typeof document=="undefined")return null;let r=document.currentScript;return r&&r.dataset&&r.dataset.blocfeedId?r:document.querySelector("script[data-blocfeed-id]")}function sn(){if(typeof window=="undefined"||typeof document=="undefined")return;let r=Ql(),e=r?rg(r.dataset):null,t=Jl(),n=Ji(e,t);if(!n){r&&console.warn("[BlocFeed] script-tag init: blocfeed_id missing from both data-* and window.blocfeedConfig");return}X=n,ug(ql),X.autoInstall&&!xe&&Ki(X);}if(typeof window!="undefined"){let r=window.BlocFeed;(!r||!Array.isArray(r._q))&&(window.BlocFeed=ql),Ql()?sn():typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",sn,{once:true}):sn());}function wb(){return Ie}function vb(){qi(),X=null,xe=false;}function Sb(){sn();}function Cb(){return X}function Eb(){return xe}/*! Bundled license information:
|
|
54
55
|
|
|
55
56
|
rrweb/dist/rrweb.js:
|
|
56
57
|
(*! *****************************************************************************
|
|
@@ -67,4 +68,4 @@ rrweb/dist/rrweb.js:
|
|
|
67
68
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
68
69
|
PERFORMANCE OF THIS SOFTWARE.
|
|
69
70
|
***************************************************************************** *)
|
|
70
|
-
*/exports.BlocFeed=
|
|
71
|
+
*/exports.BlocFeed=ql;exports.__autoInitForTesting=Sb;exports.__getInstalledTrackerForTesting=wb;exports.__getResolvedConfigForTesting=Cb;exports.__isInstallCalledForTesting=Eb;exports.__resetForTesting=vb;exports.buildResolvedConfig=Ji;exports.deepMerge=Zi;exports.parseMasking=eg;exports.parseScriptTagAttrs=rg;return exports;})({});
|