@appsurify-testmap/rrweb-record 3.5.0-alpha.1 → 3.6.0-alpha.1

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.
@@ -1,81 +1,81 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var cl=Object.defineProperty,ul=Object.defineProperties;var hl=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var Di=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable;var ki=(s,e,t)=>e in s?cl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))Di.call(e,t)&&ki(s,t,e[t]);if(zt)for(var t of zt(e))Li.call(e,t)&&ki(s,t,e[t]);return s},oe=(s,e)=>ul(s,hl(e));var He=(s,e)=>{var t={};for(var r in s)Di.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&zt)for(var r of zt(s))e.indexOf(r)<0&&Li.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var dl=Object.defineProperty,fl=(s,e,t)=>e in s?dl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,y=(s,e,t)=>fl(s,typeof e!="symbol"?e+"":e,t),Pi,pl=Object.defineProperty,ml=(s,e,t)=>e in s?pl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Gr=(s,e,t)=>ml(s,typeof e!="symbol"?e+"":e,t),q=(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))(q||{});const _i={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},zi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ft={},gl=()=>!!globalThis.Zone;function Js(s){if(Ft[s])return Ft[s];const e=globalThis[s],t=e.prototype,r=s in _i?_i[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in zi?zi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!gl())return Ft[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?Ft[s]=u:t}catch(l){return t}}const Yr={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(Yr[i])return Yr[i].call(e);const n=Js(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Yr[i]=a,a.call(e)):e[t]}const Zr={};function ro(s,e,t){const r=`${s}.${String(t)}`;if(Zr[r])return Zr[r].bind(e);const n=Js(s)[t];return typeof n!="function"?e[t]:(Zr[r]=n,n.bind(e))}function yl(s){return De("Node",s,"childNodes")}function bl(s){return De("Node",s,"parentNode")}function wl(s){return De("Node",s,"parentElement")}function Sl(s){return De("Node",s,"textContent")}function vl(s,e){return ro("Node",s,"contains")(e)}function Cl(s){return ro("Node",s,"getRootNode")()}function xl(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function Al(s){return s.styleSheets}function Il(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function El(s,e){return De("Element",s,"querySelector")(e)}function $l(s,e){return De("Element",s,"querySelectorAll")(e)}function Ml(){return Js("MutationObserver").constructor}function Rl(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ol(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Tl(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const Q={childNodes:yl,parentNode:bl,parentElement:wl,textContent:Sl,contains:vl,getRootNode:Cl,host:xl,styleSheets:Al,shadowRoot:Il,querySelector:El,querySelectorAll:$l,mutationObserver:Ml,patch:Rl,describeNode:Ol,getElementVisibility:Tl};function cr(s){return s.nodeType===s.ELEMENT_NODE}function pt(s){const e=s&&"host"in s&&"mode"in s&&Q.host(s)||null;return!!(e&&"shadowRoot"in e&&Q.shadowRoot(e)===s)}function mt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Nl(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 kl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const 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 ds(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>so(i,t)).join("");return Nl(r)}catch(e){return null}}function so(s,e){if(Ll(s)){let t;try{t=ds(s.styleSheet)||kl(s)}catch(r){t=s.cssText}return s.styleSheet.href?yr(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Pl(s)&&s.selectorText.includes(":")&&(t=Dl(t)),e?yr(t,e):t}}function Dl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ll(s){return"styleSheet"in s}function Pl(s){return"selectorText"in s}class io{constructor(){Gr(this,"idNodeMap",new Map),Gr(this,"nodeMetaMap",new WeakMap),Gr(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const 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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function _l(){return new io}function mr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&ze(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function ze(s){return s.toLowerCase()}const Fi="__rrweb_original__";function zl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,a=Fi in n?n[Fi]:n;if(new Uint32Array(a.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function gr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?ze(e):null}function no(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Fl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Bl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wl=/^(?:[a-z+]+:)?\/\//i,Hl=/^www\..*/i,Ul=/^(data:)([^,]*),(.*)/i;function yr(s,e){return(s||"").replace(Bl,(t,r,i,n,a,l)=>{const o=i||a||l,u=r||n||"";if(!o)return t;if(Wl.test(o)||Hl.test(o))return`url(${u}${o}${u})`;if(Ul.test(o))return`url(${u}${o}${u})`;if(o[0]==="/")return`url(${u}${Fl(e)+o}${u})`;const c=e.split("/"),h=o.split("/");c.pop();for(const d of h)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Bt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Vl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Bt(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const u=Bt(r[o].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),p=a.split(d),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===""&&r[o-1].textContent!=="")m=a.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=a.split(d),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=a.indexOf(d));if(p.length>=2&&h>c){const g=r[o-1].textContent;if(g&&typeof g=="string"){const f=Bt(g).length;m=a.indexOf(d,f)}m===-1&&(m=p[0].length)}if(m!==-1){let g=Math.floor(m/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Bt(s.substring(0,g),t);if(f.length===m){i.push(s.substring(0,g)),s=s.substring(g),a=a.substring(m);break}else f.length<m?g+=Math.max(1,Math.floor((m-f.length)/l)):g-=Math.max(1,Math.floor((f.length-m)*l))}break}}}}return i.push(s),i}function jl(s,e){return Vl(s,e).join("/* rr_split */")}function Gl(s){var e;const t=Q.parentNode(s),r=t&&t;return!r||!Xs(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Xs(s){return Q.getElementVisibility(s).isVisible}const Yl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Zl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Jl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ks=new WeakSet,Xl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Xl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Yl.includes(r)&&Ks.add(this)}};const Kl=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Kl.call(this,s,e,t)};function ql(s){return s instanceof Element&&Ks.has(s)}function Ql(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Zl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return ql(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Bi(){document.querySelectorAll("*").forEach(e=>{Jl.forEach(t=>{e.hasAttribute(t)&&Ks.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Bi():document.addEventListener("DOMContentLoaded",Bi)}catch(s){}const Wt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},we={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},ec={MIN_CONFIDENCE_FOR_SKIP:.7},Wi=["form","main","nav","section","article","footer","header"],Hi=["form","navigation","main","region","contentinfo","complementary","banner","search"],tc=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],Ne={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},oo=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),rc={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function yt(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const ao=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function lo(s){return s.trim().split(/\s+/).some(e=>yt(e))}let sc=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:we.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Wi.includes(r)&&(t+=we.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Hi.includes(i)&&(t+=we.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=we.ARIA_LABEL);const n=e.id;return n&&!yt(n)&&(t+=we.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=we.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=we.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-we.DEPTH_PENALTY_THRESHOLD)*we.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Wi.includes(t))return"A";const r=e.getAttribute("role");return r&&Hi.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const ic=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],nc=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function qs(s){return ic.some(e=>e.test(s))}function Qs(s){return s.length<=2||/^\d/.test(s)?!0:nc.some(e=>e.test(s))}function oc(s){return!qs(s)&&!Qs(s)}function ac(s){return s.filter(e=>oc(e))}function lc(s){const e=[],t=[];for(const r of s)Qs(r)||qs(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Ui(s){return Qs(s)||qs(s)}const Vi=s=>s.replace(/([#:.[\]@])/g,"\\$1");let cc=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<ec.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!yt(e.id)&&(t+=`#${Vi(e.id)}`);for(const r of Array.from(e.classList))Ui(r)||(t+=`.${Vi(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return tc.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!Ui(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!yt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}};function uc(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const hc={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function dc(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function fc(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&dc(i)||(l+=`#${i}`)),l}function co(s,e,t={}){if(!e)return e;const r=A(A({},hc),t);return s==="href"||s==="src"?fc(e,r):e}const pc=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],mc=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],gc=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],yc=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],bc=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],wc=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Sc=["data-category","data-action","data-label","data-value"],vc=["id","name","type","placeholder","title","for","alt","href"],Cc=["disabled","checked","selected","hidden","readonly","required","value"],xc=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Ac(s,e){return pc.includes(s)?!0:mc.includes(s)||gc.includes(s)||yc.some(t=>s.startsWith(t))?!1:bc.includes(s)?!0:wc.some(t=>s.startsWith(t))||Sc.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!xc.some(t=>t.test(e)):vc.includes(s)?!0:Cc.includes(s)?!1:!!s.startsWith("data-")}let ji=class{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!yt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=lc(a);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const a=this.extractText(e);a&&(t.text=a)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(oo.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return Ne[e]!==void 0?Ne[e]:e.startsWith("data-")?Ne["data-*"]:e.startsWith("aria-")?Ne["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Ac(i,r.value)||ao.has(i)&&lo(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?co(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=uc(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}},Ic=class{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),w=Math.atan2(f-m,g-p);r.push(`angle=${w.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function Ec(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*Wt.ANCHOR+r*Wt.PATH+i*Wt.TARGET+e*Wt.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}let $c=class{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}},Mc=class{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new $c((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return oe(A({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}};function Rc(s){return new Mc(s)}let Jr=null;function Oc(){return Jr||(Jr=Rc()),Jr}function Gi(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
2
+ "use strict";var pl=Object.defineProperty,ml=Object.defineProperties;var gl=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var Fi=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable;var zi=(s,e,t)=>e in s?pl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))Fi.call(e,t)&&zi(s,t,e[t]);if(zt)for(var t of zt(e))Bi.call(e,t)&&zi(s,t,e[t]);return s},ae=(s,e)=>ml(s,gl(e));var Ue=(s,e)=>{var t={};for(var r in s)Fi.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&zt)for(var r of zt(s))e.indexOf(r)<0&&Bi.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var yl=Object.defineProperty,bl=(s,e,t)=>e in s?yl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,y=(s,e,t)=>bl(s,typeof e!="symbol"?e+"":e,t),Wi,wl=Object.defineProperty,Sl=(s,e,t)=>e in s?wl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Jr=(s,e,t)=>Sl(s,typeof e!="symbol"?e+"":e,t),q=(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))(q||{});const Hi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ft={},vl=()=>!!globalThis.Zone;function qs(s){if(Ft[s])return Ft[s];const e=globalThis[s],t=e.prototype,r=s in Hi?Hi[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in Ui?Ui[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!vl())return Ft[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?Ft[s]=u:t}catch(l){return t}}const Xr={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(Xr[i])return Xr[i].call(e);const n=qs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Xr[i]=a,a.call(e)):e[t]}const Kr={};function ao(s,e,t){const r=`${s}.${String(t)}`;if(Kr[r])return Kr[r].bind(e);const n=qs(s)[t];return typeof n!="function"?e[t]:(Kr[r]=n,n.bind(e))}function Cl(s){return De("Node",s,"childNodes")}function xl(s){return De("Node",s,"parentNode")}function Al(s){return De("Node",s,"parentElement")}function Il(s){return De("Node",s,"textContent")}function El(s,e){return ao("Node",s,"contains")(e)}function $l(s){return ao("Node",s,"getRootNode")()}function Rl(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function Ml(s){return s.styleSheets}function Ol(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function Tl(s,e){return De("Element",s,"querySelector")(e)}function Nl(s,e){return De("Element",s,"querySelectorAll")(e)}function kl(){return qs("MutationObserver").constructor}function Dl(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ll(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Pl(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const ee={childNodes:Cl,parentNode:xl,parentElement:Al,textContent:Il,contains:El,getRootNode:$l,host:Rl,styleSheets:Ml,shadowRoot:Ol,querySelector:Tl,querySelectorAll:Nl,mutationObserver:kl,patch:Dl,describeNode:Ll,getElementVisibility:Pl};function cr(s){return s.nodeType===s.ELEMENT_NODE}function pt(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function mt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function _l(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 zl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const 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 ms(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>lo(i,t)).join("");return _l(r)}catch(e){return null}}function lo(s,e){if(Bl(s)){let t;try{t=ms(s.styleSheet)||zl(s)}catch(r){t=s.cssText}return s.styleSheet.href?yr(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Wl(s)&&s.selectorText.includes(":")&&(t=Fl(t)),e?yr(t,e):t}}function Fl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Bl(s){return"styleSheet"in s}function Wl(s){return"selectorText"in s}class co{constructor(){Jr(this,"idNodeMap",new Map),Jr(this,"nodeMetaMap",new WeakMap),Jr(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const 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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Hl(){return new co}function mr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Fe(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Fe(s){return s.toLowerCase()}const Vi="__rrweb_original__";function Ul(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,a=Vi in n?n[Vi]:n;if(new Uint32Array(a.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function gr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Fe(e):null}function uo(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Vl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const jl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Gl=/^(?:[a-z+]+:)?\/\//i,Yl=/^www\..*/i,Zl=/^(data:)([^,]*),(.*)/i;function yr(s,e){return(s||"").replace(jl,(t,r,i,n,a,l)=>{const o=i||a||l,u=r||n||"";if(!o)return t;if(Gl.test(o)||Yl.test(o))return`url(${u}${o}${u})`;if(Zl.test(o))return`url(${u}${o}${u})`;if(o[0]==="/")return`url(${u}${Vl(e)+o}${u})`;const c=e.split("/"),h=o.split("/");c.pop();for(const d of h)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Bt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Jl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Bt(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const u=Bt(r[o].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),p=a.split(d),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===""&&r[o-1].textContent!=="")m=a.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=a.split(d),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=a.indexOf(d));if(p.length>=2&&h>c){const g=r[o-1].textContent;if(g&&typeof g=="string"){const f=Bt(g).length;m=a.indexOf(d,f)}m===-1&&(m=p[0].length)}if(m!==-1){let g=Math.floor(m/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Bt(s.substring(0,g),t);if(f.length===m){i.push(s.substring(0,g)),s=s.substring(g),a=a.substring(m);break}else f.length<m?g+=Math.max(1,Math.floor((m-f.length)/l)):g-=Math.max(1,Math.floor((f.length-m)*l))}break}}}}return i.push(s),i}function Xl(s,e){return Jl(s,e).join("/* rr_split */")}function Kl(s){var e;const t=ee.parentNode(s),r=t&&t;return!r||!Qs(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Qs(s){return ee.getElementVisibility(s).isVisible}const ql=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Ql=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],ec=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],ei=new WeakSet,tc=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(tc.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();ql.includes(r)&&ei.add(this)}};const rc=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){rc.call(this,s,e,t)};function sc(s){return s instanceof Element&&ei.has(s)}function ic(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Ql.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return sc(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function ji(){document.querySelectorAll("*").forEach(e=>{ec.forEach(t=>{e.hasAttribute(t)&&ei.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?ji():document.addEventListener("DOMContentLoaded",ji)}catch(s){}const Wt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},we={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},nc={MIN_CONFIDENCE_FOR_SKIP:.7},Gi=["form","main","nav","section","article","footer","header"],Yi=["form","navigation","main","region","contentinfo","complementary","banner","search"],oc=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],Ne={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},ho=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ac={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function yt(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const fo=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function po(s){return s.trim().split(/\s+/).some(e=>yt(e))}let lc=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:we.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Gi.includes(r)&&(t+=we.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Yi.includes(i)&&(t+=we.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=we.ARIA_LABEL);const n=e.id;return n&&!yt(n)&&(t+=we.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=we.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=we.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-we.DEPTH_PENALTY_THRESHOLD)*we.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Gi.includes(t))return"A";const r=e.getAttribute("role");return r&&Yi.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const cc=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],uc=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function ti(s){return cc.some(e=>e.test(s))}function ri(s){return s.length<=2||/^\d/.test(s)?!0:uc.some(e=>e.test(s))}function hc(s){return!ti(s)&&!ri(s)}function dc(s){return s.filter(e=>hc(e))}function fc(s){const e=[],t=[];for(const r of s)ri(r)||ti(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Zi(s){return ri(s)||ti(s)}const Ji=s=>s.replace(/([#:.[\]@])/g,"\\$1");let pc=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<nc.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!yt(e.id)&&(t+=`#${Ji(e.id)}`);for(const r of Array.from(e.classList))Zi(r)||(t+=`.${Ji(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return oc.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!Zi(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!yt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}};function mc(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const gc={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function yc(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function bc(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&yc(i)||(l+=`#${i}`)),l}function mo(s,e,t={}){if(!e)return e;const r=A(A({},gc),t);return s==="href"||s==="src"?bc(e,r):e}const wc=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Sc=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],vc=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],Cc=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],xc=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Ac=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Ic=["data-category","data-action","data-label","data-value"],Ec=["id","name","type","placeholder","title","for","alt","href"],$c=["disabled","checked","selected","hidden","readonly","required","value"],Rc=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Mc(s,e){return wc.includes(s)?!0:Sc.includes(s)||vc.includes(s)||Cc.some(t=>s.startsWith(t))?!1:xc.includes(s)?!0:Ac.some(t=>s.startsWith(t))||Ic.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Rc.some(t=>t.test(e)):Ec.includes(s)?!0:$c.includes(s)?!1:!!s.startsWith("data-")}let Xi=class{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!yt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=fc(a);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const a=this.extractText(e);a&&(t.text=a)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(ho.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return Ne[e]!==void 0?Ne[e]:e.startsWith("data-")?Ne["data-*"]:e.startsWith("aria-")?Ne["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Mc(i,r.value)||fo.has(i)&&po(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?mo(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=mc(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}},Oc=class{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),w=Math.atan2(f-m,g-p);r.push(`angle=${w.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function Tc(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*Wt.ANCHOR+r*Wt.PATH+i*Wt.TARGET+e*Wt.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}let Nc=class{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}},kc=class{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Nc((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return ae(A({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}};function Dc(s){return new kc(s)}let qr=null;function Lc(){return qr||(qr=Dc()),qr}function Ki(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
3
3
  1. The element is detached from the DOM
4
4
  2. The element was created but never attached
5
- 3. You are working with a document node instead of an element`)}function Tc(s,e){if(!e)return;const t=Gi(s),r=e instanceof Document?e:Gi(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
5
+ 3. You are working with a document node instead of an element`)}function Pc(s,e){if(!e)return;const t=Ki(s),r=e instanceof Document?e:Ki(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
6
6
  Common causes:
7
7
  1. Working with iframe: pass iframe.contentDocument as root parameter
8
8
  2. Element from one iframe, root from another
9
9
  3. Element from main document, root from iframe (or vice versa)
10
10
 
11
- Solution: Ensure element and root parameter are from the same document context.`)}function Nc(s,e={}){var U,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},rc),e);if(r.root)try{Tc(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Oc(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new ji(r,i),te=Lc(s,r,P);return i.setEID(s,te),te}const a=new sc(r,i),l=new cc(r,i),o=new ji(r,i),u=new Ic,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:we.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&kc(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const P=Array.from(b.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},E=[],M={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=w.degraded||v.degraded,z=Dc(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:E,fallback:M,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:z}};return D.meta.confidence=Ec(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function kc(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Dc(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Lc(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const uo={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Yi(s){return s==="id"?101:Ne[s]!==void 0?Ne[s]:s.startsWith("data-")?Ne["data-*"]:s.startsWith("aria-")?Ne["aria-*"]:0}function Pc(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function _c(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function zc(s,e){const t=A(A({},uo),e),r=`v${s.version}`,i=Xr(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>Xr(o,!1,t)).join(" > ")+" > ":"",a=Xr(s.target,!0,t),l=t.includeConstraints?Fc(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function Xr(s,e=!1,t=uo){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=Yi(h),m=h==="href"||h==="src"?co(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&oo.has(h.name)||ao.has(h.name)&&lo(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${fs(d)}"`);if(t.includeText&&i.text&&!_c(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${fs(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return Yi(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=ac(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Pc);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Fc(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=fs(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function fs(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Bc(s,e,t){const r=Nc(s,e);return r?zc(r,t):null}let Wc=1;const Hc=new RegExp("[^a-z0-9-_:]"),bt=-2;function ho(){return Wc++}function Uc(s){if(s instanceof HTMLFormElement)return"form";const e=ze(s.tagName);return Hc.test(e)?"div":e}let Ue,Zi;const Vc=/^[^ \t\n\r\u000c]+/,jc=/^[, \t\n\r\u000c]+/;function Gc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(jc),!(t>=e.length);){let n=r(Vc);if(n.slice(-1)===",")n=Ge(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Ge(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const Ji=new WeakMap;function Ge(s,e){return!e||e.trim()===""?e:ei(s,e)}function Yc(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ei(s,e){let t=Ji.get(s);if(t||(t=s.createElement("a"),Ji.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function fo(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ge(s,r):t==="srcset"?Gc(s,r):t==="style"?yr(r,ei(s)):e==="object"&&t==="data"?Ge(s,r):r)}function po(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ps(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function Zc(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function br(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?br(Q.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?br(Q.parentNode(s),e,t):!1}function mo(s,e,t,r){let i;if(cr(s)){if(i=s,!Q.childNodes(i).length)return!1}else{if(Q.parentElement(s)===null)return!1;i=Q.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(br(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Jc(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Xc(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Kc(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:l,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f=!1,cssCaptured:w=!1}=e,v=qc(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:s.compatMode}:{type:q.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return eu(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:a,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f,rootId:v});case s.TEXT_NODE:return Qc(s,{doc:t,needsMask:l,maskTextFn:c,rootId:v,cssCaptured:w});case s.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:q.Comment,textContent:Q.textContent(s)||"",rootId:v};default:return!1}}function qc(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Qc(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Q.parentNode(s),l=a&&a.tagName;let o="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?o="SCRIPT_PLACEHOLDER":n||(o=Q.textContent(s),u&&o&&(o=yr(o,ei(e.doc)))),!u&&!c&&o&&t&&(o=r?r(o,Q.parentElement(s)):o.replace(/[\S]/g,"*")),{type:q.Text,textContent:o||"",rootId:i}}function eu(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:o,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m}=e,g=Zc(s,r,i),f=Uc(s);let w={};const v=s.attributes.length;for(let b=0;b<v;b++){const S=s.attributes[b];ps(S.name,n)||po(f,S.name,S.value)||(w[S.name]=fo(t,f,ze(S.name),S.value))}if(f==="link"&&a){const b=Array.from(t.styleSheets).find(x=>x.href===s.href);let S=null;b&&(S=ds(b)),S&&(delete w.rel,delete w.href,w._cssText=S)}if(f==="style"&&s.sheet){let b=ds(s.sheet);b&&(s.childNodes.length>1&&(b=jl(b,s)),w._cssText=b)}if(f==="input"||f==="textarea"||f==="select"){const b=s.value,S=s.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&b?w.value=mr({element:s,type:gr(s),tagName:f,value:b,maskInputOptions:l,maskInputFn:o}):S&&(w.checked=S)}if(f==="option"&&(s.selected&&!l.select?w.selected=!0:delete w.selected),f==="dialog"&&s.open&&(w.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")zl(s)||(w.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const b=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const x=S.toDataURL(u.type,u.quality);b!==x&&(w.rr_dataURL=b)}}if(f==="img"&&c){Ue||(Ue=t.createElement("canvas"),Zi=Ue.getContext("2d"));const b=s,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,E=()=>{b.removeEventListener("load",E);try{Ue.width=b.naturalWidth,Ue.height=b.naturalHeight,Zi.drawImage(b,0,0),w.rr_dataURL=Ue.toDataURL(u.type,u.quality)}catch(M){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?E():b.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${S}! Error: ${M}`)}b.crossOrigin==="anonymous"&&(x?w.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?E():b.addEventListener("load",E)}if(f==="audio"||f==="video"){const b=w;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(p||(s.scrollLeft&&(w.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(w.rr_scrollTop=s.scrollTop)),g){const{width:b,height:S}=s.getBoundingClientRect();w={class:w.class,rr_width:`${b}px`,rr_height:`${S}px`}}f==="iframe"&&!d(w.src)&&(s.contentDocument||(w.rr_src=w.src),delete w.src);let C;try{customElements.get(f)&&(C=!0)}catch(b){}return{type:q.Element,tagName:f,attributes:w,childNodes:[],isSVG:Yc(s)||void 0,needBlock:g,rootId:m,isCustom:C}}function j(s){return s==null?"":s.toLowerCase()}function tu(s,e){if(e.comment&&s.type===q.Comment)return!0;if(s.type===q.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"&&no(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(j(s.attributes.name).match(/^msapplication-tile(image|color)$/)||j(s.attributes.name)==="application-name"||j(s.attributes.rel)==="icon"||j(s.attributes.rel)==="apple-touch-icon"||j(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&j(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(j(s.attributes.property).match(/^(og|twitter|fb):/)||j(s.attributes.name).match(/^(og|twitter):/)||j(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(j(s.attributes.name)==="robots"||j(s.attributes.name)==="googlebot"||j(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(j(s.attributes.name)==="author"||j(s.attributes.name)==="generator"||j(s.attributes.name)==="framework"||j(s.attributes.name)==="publisher"||j(s.attributes.name)==="progid"||j(s.attributes.property).match(/^article:/)||j(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(j(s.attributes.name)==="google-site-verification"||j(s.attributes.name)==="yandex-verification"||j(s.attributes.name)==="csrf-token"||j(s.attributes.name)==="p:domain_verify"||j(s.attributes.name)==="verify-v1"||j(s.attributes.name)==="verification"||j(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ye(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:w=!1,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:M=!1,cssCaptured:L=!1,selectorOptions:z}=e;let{needsMask:D}=e,{preserveWhiteSpace:U=!0}=e;D||(D=mo(s,a,l,D===void 0));const J=Kc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,dataURLOptions:g,inlineImages:f,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:M,cssCaptured:L});if(!J)return console.warn(s,"not serialized"),null;let K;r.hasNode(s)?K=r.getId(s):tu(J,m)||!U&&J.type===q.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?K=bt:K=ho();const I=Object.assign(J,{id:K});if(cr(s)||s.nodeType===Node.TEXT_NODE){if(cr(s)&&z!==null&&z!==void 0)try{const X={maxPathDepth:z.maxPathDepth,enableSvgFingerprint:z.enableSvgFingerprint,fallbackToBody:z.fallbackToBody},ue=Bc(s,X);ue&&(I.selector=ue)}catch(X){console.warn("Failed to generate SEQL selector:",X)}s.nodeType===Node.TEXT_NODE&&(I.isVisible=Gl(s)),s.nodeType===Node.ELEMENT_NODE&&(I.isVisible=Xs(s),I.isInteractive=Ql(s))}if(r.add(s,I),K===bt)return null;v&&v(s);let P=!u;if(I.type===q.Element){P=P&&!I.needBlock,delete I.needBlock;const X=Q.shadowRoot(s);X&&mt(X)&&(I.isShadowHost=!0)}if((I.type===q.Document||I.type===q.Element)&&P){m.headWhitespace&&I.type===q.Element&&I.tagName==="head"&&(U=!1);const X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,cssCaptured:!1,selectorOptions:z};if(!(I.type===q.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===q.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(X.cssCaptured=!0);for(const st of Array.from(Q.childNodes(s))){const pe=Ye(st,X);pe&&I.childNodes.push(pe)}}let ue=null;if(cr(s)&&(ue=Q.shadowRoot(s)))for(const st of Array.from(Q.childNodes(ue))){const pe=Ye(st,X);pe&&(mt(ue)&&(pe.isShadow=!0),I.childNodes.push(pe))}}const te=Q.parentNode(s);return te&&pt(te)&&mt(te)&&(I.isShadow=!0),I.type===q.Element&&I.tagName==="iframe"&&Jc(s,()=>{const X=s.contentDocument;if(X&&C){const ue=Ye(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:z});ue&&C(s,ue)}},b),I.type===q.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&no(I.attributes.href)==="css")&&Xc(s,()=>{if(S){const X=Ye(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:z});X&&S(s,X)}},x),I}function ru(s,e){var D,U,J,K;const{mirror:t=new io,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,excludeAttribute:l=/.^/,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:f,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:x=()=>!1,selector:E}=e||{},M=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,L=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,z=E===!1?null:E===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:E===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(D=E.maxPathDepth)!=null?D:10,enableSvgFingerprint:(U=E.enableSvgFingerprint)!=null?U:!0,confidenceThreshold:(J=E.confidenceThreshold)!=null?J:.3,fallbackToBody:(K=E.fallbackToBody)!=null?K:!0};return Ye(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:o,maskInputOptions:M,maskTextFn:d,maskInputFn:p,slimDOMOptions:L,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:f,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:z})}function su(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function iu(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:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ti={exports:{}},R=String,go=function(){return{isColorSupported:!1,reset:R,bold:R,dim:R,italic:R,underline:R,inverse:R,hidden:R,strikethrough:R,black:R,red:R,green:R,yellow:R,blue:R,magenta:R,cyan:R,white:R,gray:R,bgBlack:R,bgRed:R,bgGreen:R,bgYellow:R,bgBlue:R,bgMagenta:R,bgCyan:R,bgWhite:R,blackBright:R,redBright:R,greenBright:R,yellowBright:R,blueBright:R,magentaBright:R,cyanBright:R,whiteBright:R,bgBlackBright:R,bgRedBright:R,bgGreenBright:R,bgYellowBright:R,bgBlueBright:R,bgMagentaBright:R,bgCyanBright:R,bgWhiteBright:R}};ti.exports=go();ti.exports.createColors=go;var nu=ti.exports;const ou={},au=Object.freeze(Object.defineProperty({__proto__:null,default:ou},Symbol.toStringTag,{value:"Module"})),ye=iu(au);let Xi=nu,Ki=ye,ms=class yo extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,yo)}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=Xi.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=Xi.createColors(!0);i=p=>c(d(p)),r=p=>h(p),Ki&&(n=p=>Ki(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),w=Math.max(this.column+g,this.endColumn+g),v=c.slice(f,w),C=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(v)+`
11
+ Solution: Ensure element and root parameter are from the same document context.`)}function _c(s,e={}){var V,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},ac),e);if(r.root)try{Pc(s,r.root)}catch(_){return console.error("Cross-document generation detected:",_),null}const i=(V=r.cache)!=null?V:Lc(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const _=new Xi(r,i),re=Bc(s,r,_);return i.setEID(s,re),re}const a=new lc(r,i),l=new pc(r,i),o=new Xi(r,i),u=new Oc,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const _=Array.from(m.children).indexOf(h);_!==-1&&(g=_+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:we.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&zc(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const _=Array.from(b.children).indexOf(s);_!==-1&&(S=_+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},$=[],R={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},P=w.degraded||v.degraded,F=Fc(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:$,fallback:R,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:P,degradationReason:F}};return D.meta.confidence=Tc(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function zc(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Fc(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Bc(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const go={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function qi(s){return s==="id"?101:Ne[s]!==void 0?Ne[s]:s.startsWith("data-")?Ne["data-*"]:s.startsWith("aria-")?Ne["aria-*"]:0}function Wc(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Hc(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Uc(s,e){const t=A(A({},go),e),r=`v${s.version}`,i=Qr(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>Qr(o,!1,t)).join(" > ")+" > ":"",a=Qr(s.target,!0,t),l=t.includeConstraints?Vc(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function Qr(s,e=!1,t=go){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=qi(h),m=h==="href"||h==="src"?mo(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&ho.has(h.name)||fo.has(h.name)&&po(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${gs(d)}"`);if(t.includeText&&i.text&&!Hc(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${gs(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return qi(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=dc(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Wc);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Vc(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=gs(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function gs(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function jc(s,e,t){const r=_c(s,e);return r?Uc(r,t):null}let Gc=1;const Yc=new RegExp("[^a-z0-9-_:]"),bt=-2;function yo(){return Gc++}function Zc(s){if(s instanceof HTMLFormElement)return"form";const e=Fe(s.tagName);return Yc.test(e)?"div":e}let Ve,Qi;const Jc=/^[^ \t\n\r\u000c]+/,Xc=/^[, \t\n\r\u000c]+/;function Kc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Xc),!(t>=e.length);){let n=r(Jc);if(n.slice(-1)===",")n=Ye(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Ye(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const en=new WeakMap;function Ye(s,e){return!e||e.trim()===""?e:si(s,e)}function qc(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function si(s,e){let t=en.get(s);if(t||(t=s.createElement("a"),en.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function bo(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ye(s,r):t==="srcset"?Kc(s,r):t==="style"?yr(r,si(s)):e==="object"&&t==="data"?Ye(s,r):r)}function wo(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ys(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function Qc(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function br(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?br(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?br(ee.parentNode(s),e,t):!1}function So(s,e,t,r){let i;if(cr(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(br(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function eu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function tu(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function ru(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:l,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f=!1,cssCaptured:w=!1}=e,v=su(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:s.compatMode}:{type:q.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return nu(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:a,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f,rootId:v});case s.TEXT_NODE:return iu(s,{doc:t,needsMask:l,maskTextFn:c,rootId:v,cssCaptured:w});case s.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:q.Comment,textContent:ee.textContent(s)||"",rootId:v};default:return!1}}function su(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function iu(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=ee.parentNode(s),l=a&&a.tagName;let o="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?o="SCRIPT_PLACEHOLDER":n||(o=ee.textContent(s),u&&o&&(o=yr(o,si(e.doc)))),!u&&!c&&o&&t&&(o=r?r(o,ee.parentElement(s)):o.replace(/[\S]/g,"*")),{type:q.Text,textContent:o||"",rootId:i}}function nu(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:o,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m}=e,g=Qc(s,r,i),f=Zc(s);let w={};const v=s.attributes.length;for(let b=0;b<v;b++){const S=s.attributes[b];ys(S.name,n)||wo(f,S.name,S.value)||(w[S.name]=bo(t,f,Fe(S.name),S.value))}if(f==="link"&&a){const b=Array.from(t.styleSheets).find(x=>x.href===s.href);let S=null;b&&(S=ms(b)),S&&(delete w.rel,delete w.href,w._cssText=S)}if(f==="style"&&s.sheet){let b=ms(s.sheet);b&&(s.childNodes.length>1&&(b=Xl(b,s)),w._cssText=b)}if(f==="input"||f==="textarea"||f==="select"){const b=s.value,S=s.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&b?w.value=mr({element:s,type:gr(s),tagName:f,value:b,maskInputOptions:l,maskInputFn:o}):S&&(w.checked=S)}if(f==="option"&&(s.selected&&!l.select?w.selected=!0:delete w.selected),f==="dialog"&&s.open&&(w.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")Ul(s)||(w.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const b=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const x=S.toDataURL(u.type,u.quality);b!==x&&(w.rr_dataURL=b)}}if(f==="img"&&c){Ve||(Ve=t.createElement("canvas"),Qi=Ve.getContext("2d"));const b=s,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,$=()=>{b.removeEventListener("load",$);try{Ve.width=b.naturalWidth,Ve.height=b.naturalHeight,Qi.drawImage(b,0,0),w.rr_dataURL=Ve.toDataURL(u.type,u.quality)}catch(R){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?$():b.addEventListener("load",$);return}else console.warn(`Cannot inline img src=${S}! Error: ${R}`)}b.crossOrigin==="anonymous"&&(x?w.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?$():b.addEventListener("load",$)}if(f==="audio"||f==="video"){const b=w;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(p||(s.scrollLeft&&(w.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(w.rr_scrollTop=s.scrollTop)),g){const{width:b,height:S}=s.getBoundingClientRect();w={class:w.class,rr_width:`${b}px`,rr_height:`${S}px`}}f==="iframe"&&!d(w.src)&&(s.contentDocument||(w.rr_src=w.src),delete w.src);let C;try{customElements.get(f)&&(C=!0)}catch(b){}return{type:q.Element,tagName:f,attributes:w,childNodes:[],isSVG:qc(s)||void 0,needBlock:g,rootId:m,isCustom:C}}function j(s){return s==null?"":s.toLowerCase()}function ou(s,e){if(e.comment&&s.type===q.Comment)return!0;if(s.type===q.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"&&uo(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(j(s.attributes.name).match(/^msapplication-tile(image|color)$/)||j(s.attributes.name)==="application-name"||j(s.attributes.rel)==="icon"||j(s.attributes.rel)==="apple-touch-icon"||j(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&j(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(j(s.attributes.property).match(/^(og|twitter|fb):/)||j(s.attributes.name).match(/^(og|twitter):/)||j(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(j(s.attributes.name)==="robots"||j(s.attributes.name)==="googlebot"||j(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(j(s.attributes.name)==="author"||j(s.attributes.name)==="generator"||j(s.attributes.name)==="framework"||j(s.attributes.name)==="publisher"||j(s.attributes.name)==="progid"||j(s.attributes.property).match(/^article:/)||j(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(j(s.attributes.name)==="google-site-verification"||j(s.attributes.name)==="yandex-verification"||j(s.attributes.name)==="csrf-token"||j(s.attributes.name)==="p:domain_verify"||j(s.attributes.name)==="verify-v1"||j(s.attributes.name)==="verification"||j(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ze(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:w=!1,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:R=!1,cssCaptured:P=!1,selectorOptions:F}=e;let{needsMask:D}=e,{preserveWhiteSpace:V=!0}=e;D||(D=So(s,a,l,D===void 0));const J=ru(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,dataURLOptions:g,inlineImages:f,recordCanvas:w,keepIframeSrcFn:$,newlyAddedElement:R,cssCaptured:P});if(!J)return console.warn(s,"not serialized"),null;let K;r.hasNode(s)?K=r.getId(s):ou(J,m)||!V&&J.type===q.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?K=bt:K=yo();const I=Object.assign(J,{id:K});if(cr(s)||s.nodeType===Node.TEXT_NODE){if(cr(s)&&F!==null&&F!==void 0)try{const X={maxPathDepth:F.maxPathDepth,enableSvgFingerprint:F.enableSvgFingerprint,fallbackToBody:F.fallbackToBody},de=jc(s,X);de&&(I.selector=de)}catch(X){console.warn("Failed to generate SEQL selector:",X)}s.nodeType===Node.TEXT_NODE&&(I.isVisible=Kl(s)),s.nodeType===Node.ELEMENT_NODE&&(I.isVisible=Qs(s),I.isInteractive=ic(s))}if(r.add(s,I),K===bt)return null;v&&v(s);let _=!u;if(I.type===q.Element){_=_&&!I.needBlock,delete I.needBlock;const X=ee.shadowRoot(s);X&&mt(X)&&(I.isShadowHost=!0)}if((I.type===q.Document||I.type===q.Element)&&_){m.headWhitespace&&I.type===q.Element&&I.tagName==="head"&&(V=!1);const X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:V,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:$,cssCaptured:!1,selectorOptions:F};if(!(I.type===q.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===q.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(X.cssCaptured=!0);for(const it of Array.from(ee.childNodes(s))){const me=Ze(it,X);me&&I.childNodes.push(me)}}let de=null;if(cr(s)&&(de=ee.shadowRoot(s)))for(const it of Array.from(ee.childNodes(de))){const me=Ze(it,X);me&&(mt(de)&&(me.isShadow=!0),I.childNodes.push(me))}}const re=ee.parentNode(s);return re&&pt(re)&&mt(re)&&(I.isShadow=!0),I.type===q.Element&&I.tagName==="iframe"&&eu(s,()=>{const X=s.contentDocument;if(X&&C){const de=Ze(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:V,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:$,selectorOptions:F});de&&C(s,de)}},b),I.type===q.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&uo(I.attributes.href)==="css")&&tu(s,()=>{if(S){const X=Ze(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:w,preserveWhiteSpace:V,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:$,selectorOptions:F});X&&S(s,X)}},x),I}function au(s,e){var D,V,J,K;const{mirror:t=new co,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,excludeAttribute:l=/.^/,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:f,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:x=()=>!1,selector:$}=e||{},R=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,P=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,F=$===!1?null:$===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:$===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(D=$.maxPathDepth)!=null?D:10,enableSvgFingerprint:(V=$.enableSvgFingerprint)!=null?V:!0,confidenceThreshold:(J=$.confidenceThreshold)!=null?J:.3,fallbackToBody:(K=$.fallbackToBody)!=null?K:!0};return Ze(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:o,maskInputOptions:R,maskTextFn:d,maskInputFn:p,slimDOMOptions:P,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:f,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:F})}function lu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function cu(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:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ii={exports:{}},M=String,vo=function(){return{isColorSupported:!1,reset:M,bold:M,dim:M,italic:M,underline:M,inverse:M,hidden:M,strikethrough:M,black:M,red:M,green:M,yellow:M,blue:M,magenta:M,cyan:M,white:M,gray:M,bgBlack:M,bgRed:M,bgGreen:M,bgYellow:M,bgBlue:M,bgMagenta:M,bgCyan:M,bgWhite:M,blackBright:M,redBright:M,greenBright:M,yellowBright:M,blueBright:M,magentaBright:M,cyanBright:M,whiteBright:M,bgBlackBright:M,bgRedBright:M,bgGreenBright:M,bgYellowBright:M,bgBlueBright:M,bgMagentaBright:M,bgCyanBright:M,bgWhiteBright:M}};ii.exports=vo();ii.exports.createColors=vo;var uu=ii.exports;const hu={},du=Object.freeze(Object.defineProperty({__proto__:null,default:hu},Symbol.toStringTag,{value:"Module"})),ye=cu(du);let tn=uu,rn=ye,bs=class Co extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,Co)}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=tn.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=tn.createColors(!0);i=p=>c(d(p)),r=p=>h(p),rn&&(n=p=>rn(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),w=Math.max(this.column+g,this.endColumn+g),v=c.slice(f,w),C=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(v)+`
12
12
  `+C+i("^")}let m=r(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(p)+n(c)+`
13
13
  `+m+i("^")}return" "+r(p)+n(c)}).join(`
14
14
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
15
15
 
16
16
  `+e+`
17
- `),this.name+": "+this.message+e}};var ri=ms;ms.default=ms;const qi={after:`
17
+ `),this.name+": "+this.message+e}};var ni=bs;bs.default=bs;const sn={after:`
18
18
  `,beforeClose:`
19
19
  `,beforeComment:`
20
20
  `,beforeDecl:`
21
21
  `,beforeOpen:" ",beforeRule:`
22
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function lu(s){return s[0].toUpperCase()+s.slice(1)}let gs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
23
- `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",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 r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+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,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return qi[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+lu(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=qi[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
22
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function fu(s){return s[0].toUpperCase()+s.slice(1)}let ws=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
23
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",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 r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+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,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return sn[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+fu(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=sn[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
24
24
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
25
25
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
26
26
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
27
27
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
28
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var bo=gs;gs.default=gs;let cu=bo;function ys(s,e){new cu(e).stringify(s)}var Rr=ys;ys.default=ys;var Ot={};Ot.isClean=Symbol("isClean");Ot.my=Symbol("my");let uu=ri,hu=bo,du=Rr,{isClean:ot,my:fu}=Ot;function bs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>bs(a,t)):(n==="object"&&i!==null&&(i=bs(i)),t[r]=i)}return t}function xe(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
29
- `?(t=1,r+=1):t+=1}return i}let ws=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ot]=!1,this[fu]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=bs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new uu(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[ot]=!0}markDirty(){if(this[ot]){this[ot]=!1;let e=this;for(;e=e.parent;)e[ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(xe(r,this.source.start),xe(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=xe(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
30
- `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:xe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:xe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(xe(t,this.source.start),xe(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:xe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:xe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new hu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=du){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Or=ws;ws.default=ws;let pu=Or,Ss=class extends pu{constructor(e){super(e),this.type="comment"}};var Tr=Ss;Ss.default=Ss;let mu=Or,vs=class extends mu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Nr=vs;vs.default=vs;let wo=Tr,So=Nr,gu=Or,{isClean:vo,my:Co}=Ot,si,xo,Ao,ii;function Io(s){return s.map(e=>(e.nodes&&(e.nodes=Io(e.nodes)),delete e.source,e))}function Eo(s){if(s[vo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Eo(e)}let Ee=class $o extends gu{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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()),!0}}}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),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Io(xo(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 So(e)]}else if(e.selector||e.selectors)e=[new ii(e)];else if(e.name)e=[new si(e)];else if(e.text)e=[new wo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Co]||$o.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[vo]&&Eo(i),i.raws||(i.raws={}),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 r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}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,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};Ee.registerParse=s=>{xo=s};Ee.registerRule=s=>{ii=s};Ee.registerAtRule=s=>{si=s};Ee.registerRoot=s=>{Ao=s};var Fe=Ee;Ee.default=Ee;Ee.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,si.prototype):s.type==="rule"?Object.setPrototypeOf(s,ii.prototype):s.type==="decl"?Object.setPrototypeOf(s,So.prototype):s.type==="comment"?Object.setPrototypeOf(s,wo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ao.prototype),s[Co]=!0,s.nodes&&s.nodes.forEach(e=>{Ee.rebuild(e)})};let Mo=Fe,wr=class extends Mo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ni=wr;wr.default=wr;Mo.registerAtRule(wr);let yu=Fe,Ro,Oo,wt=class extends yu{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ro(new Oo,this,e).stringify()}};wt.registerLazyResult=s=>{Ro=s};wt.registerProcessor=s=>{Oo=s};var oi=wt;wt.default=wt;let bu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=bu[Math.random()*64|0];return e};var Su={nanoid:wu};let{existsSync:vu,readFileSync:Cu}=ye,{dirname:Kr,join:xu}=ye,{SourceMapConsumer:Qi,SourceMapGenerator:en}=ye;function Au(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Cs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Kr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Qi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return Au(e.substr(l[0].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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Kr(e),vu(e))return this.mapFile=e,Cu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Qi)return en.fromSourceMap(t).toString();if(t instanceof en)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=xu(Kr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var To=Cs;Cs.default=Cs;let{nanoid:Iu}=Su,{isAbsolute:xs,resolve:As}=ye,{SourceMapConsumer:Eu,SourceMapGenerator:$u}=ye,{fileURLToPath:tn,pathToFileURL:Ht}=ye,rn=ri,Mu=To,qr=ye,Qr=Symbol("lineToIndexCache"),Ru=!!(Eu&&$u),sn=!!(As&&xs);function nn(s){if(s[Qr])return s[Qr];let e=s.css.split(`
31
- `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Qr]=t,t}let Sr=class{get from(){return this.file||this.id}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=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!sn||/^\w+:\/\//.test(t.from)||xs(t.from)?this.file=t.from:this.file=As(t.from)),sn&&Ru){let r=new Mu(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Iu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new rn(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new rn(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Ht&&(u.input.url=Ht(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return nn(this)[e-1]+t-1}fromOffset(e){let t=nn(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:As(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;xs(a.source)?o=Ht(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(tn)u.file=tn(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var kr=Sr;Sr.default=Sr;qr&&qr.registerInput&&qr.registerInput(Sr);let No=Fe,ko,Do,Je=class extends No{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=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 n of i)n.raws.before=t.raws.before}return i}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 ko(new Do,this,e).stringify()}};Je.registerLazyResult=s=>{ko=s};Je.registerProcessor=s=>{Do=s};var Tt=Je;Je.default=Je;No.registerRoot(Je);let St={comma(s){return St.split(s,[","],!0)},space(s){let e=[" ",`
32
- `," "];return St.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Lo=St;St.default=St;let Po=Fe,Ou=Lo,vr=class extends Po{get selectors(){return Ou.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)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var ai=vr;vr.default=vr;Po.registerRule(vr);let Tu=ni,Nu=Tr,ku=Nr,Du=kr,Lu=To,Pu=Tt,_u=ai;function vt(s,e){if(Array.isArray(s))return s.map(a=>vt(a));let i=s,{inputs:t}=i,r=He(i,["inputs"]);if(t){e=[];for(let a of t){let l=oe(A({},a),{__proto__:Du.prototype});l.map&&(l.map=oe(A({},l.map),{__proto__:Lu.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>vt(a,e))),r.source){let n=r.source,{inputId:a}=n,l=He(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Pu(r);if(r.type==="decl")return new ku(r);if(r.type==="rule")return new _u(r);if(r.type==="comment")return new Nu(r);if(r.type==="atrule")return new Tu(r);throw new Error("Unknown node type: "+s.type)}var zu=vt;vt.default=vt;let{dirname:ur,relative:_o,resolve:zo,sep:Fo}=ye,{SourceMapConsumer:Bo,SourceMapGenerator:hr}=ye,{pathToFileURL:on}=ye,Fu=kr,Bu=!!(Bo&&hr),Wu=!!(ur&&zo&&_o&&Fo),Hu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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=`
28
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var xo=ws;ws.default=ws;let pu=xo;function Ss(s,e){new pu(e).stringify(s)}var Mr=Ss;Ss.default=Ss;var Ot={};Ot.isClean=Symbol("isClean");Ot.my=Symbol("my");let mu=ni,gu=xo,yu=Mr,{isClean:ot,my:bu}=Ot;function vs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>vs(a,t)):(n==="object"&&i!==null&&(i=vs(i)),t[r]=i)}return t}function xe(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
29
+ `?(t=1,r+=1):t+=1}return i}let Cs=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ot]=!1,this[bu]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=vs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new mu(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[ot]=!0}markDirty(){if(this[ot]){this[ot]=!1;let e=this;for(;e=e.parent;)e[ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(xe(r,this.source.start),xe(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=xe(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
30
+ `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:xe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:xe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(xe(t,this.source.start),xe(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:xe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:xe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new gu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=yu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Or=Cs;Cs.default=Cs;let wu=Or,xs=class extends wu{constructor(e){super(e),this.type="comment"}};var Tr=xs;xs.default=xs;let Su=Or,As=class extends Su{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Nr=As;As.default=As;let Ao=Tr,Io=Nr,vu=Or,{isClean:Eo,my:$o}=Ot,oi,Ro,Mo,ai;function Oo(s){return s.map(e=>(e.nodes&&(e.nodes=Oo(e.nodes)),delete e.source,e))}function To(s){if(s[Eo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)To(e)}let Ee=class No extends vu{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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()),!0}}}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),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Oo(Ro(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 Io(e)]}else if(e.selector||e.selectors)e=[new ai(e)];else if(e.name)e=[new oi(e)];else if(e.text)e=[new Ao(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[$o]||No.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Eo]&&To(i),i.raws||(i.raws={}),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 r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}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,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};Ee.registerParse=s=>{Ro=s};Ee.registerRule=s=>{ai=s};Ee.registerAtRule=s=>{oi=s};Ee.registerRoot=s=>{Mo=s};var Be=Ee;Ee.default=Ee;Ee.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,oi.prototype):s.type==="rule"?Object.setPrototypeOf(s,ai.prototype):s.type==="decl"?Object.setPrototypeOf(s,Io.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ao.prototype):s.type==="root"&&Object.setPrototypeOf(s,Mo.prototype),s[$o]=!0,s.nodes&&s.nodes.forEach(e=>{Ee.rebuild(e)})};let ko=Be,wr=class extends ko{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var li=wr;wr.default=wr;ko.registerAtRule(wr);let Cu=Be,Do,Lo,wt=class extends Cu{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Do(new Lo,this,e).stringify()}};wt.registerLazyResult=s=>{Do=s};wt.registerProcessor=s=>{Lo=s};var ci=wt;wt.default=wt;let xu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Au=(s=21)=>{let e="",t=s|0;for(;t--;)e+=xu[Math.random()*64|0];return e};var Iu={nanoid:Au};let{existsSync:Eu,readFileSync:$u}=ye,{dirname:es,join:Ru}=ye,{SourceMapConsumer:nn,SourceMapGenerator:on}=ye;function Mu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Is=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=es(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new nn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return Mu(e.substr(l[0].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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=es(e),Eu(e))return this.mapFile=e,$u(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof nn)return on.fromSourceMap(t).toString();if(t instanceof on)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ru(es(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Po=Is;Is.default=Is;let{nanoid:Ou}=Iu,{isAbsolute:Es,resolve:$s}=ye,{SourceMapConsumer:Tu,SourceMapGenerator:Nu}=ye,{fileURLToPath:an,pathToFileURL:Ht}=ye,ln=ni,ku=Po,ts=ye,rs=Symbol("lineToIndexCache"),Du=!!(Tu&&Nu),cn=!!($s&&Es);function un(s){if(s[rs])return s[rs];let e=s.css.split(`
31
+ `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[rs]=t,t}let Sr=class{get from(){return this.file||this.id}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=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!cn||/^\w+:\/\//.test(t.from)||Es(t.from)?this.file=t.from:this.file=$s(t.from)),cn&&Du){let r=new ku(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ou(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new ln(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new ln(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Ht&&(u.input.url=Ht(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return un(this)[e-1]+t-1}fromOffset(e){let t=un(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:$s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;Es(a.source)?o=Ht(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(an)u.file=an(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var kr=Sr;Sr.default=Sr;ts&&ts.registerInput&&ts.registerInput(Sr);let _o=Be,zo,Fo,Xe=class extends _o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=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 n of i)n.raws.before=t.raws.before}return i}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 zo(new Fo,this,e).stringify()}};Xe.registerLazyResult=s=>{zo=s};Xe.registerProcessor=s=>{Fo=s};var Tt=Xe;Xe.default=Xe;_o.registerRoot(Xe);let St={comma(s){return St.split(s,[","],!0)},space(s){let e=[" ",`
32
+ `," "];return St.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Bo=St;St.default=St;let Wo=Be,Lu=Bo,vr=class extends Wo{get selectors(){return Lu.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)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var ui=vr;vr.default=vr;Wo.registerRule(vr);let Pu=li,_u=Tr,zu=Nr,Fu=kr,Bu=Po,Wu=Tt,Hu=ui;function vt(s,e){if(Array.isArray(s))return s.map(a=>vt(a));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let a of t){let l=ae(A({},a),{__proto__:Fu.prototype});l.map&&(l.map=ae(A({},l.map),{__proto__:Bu.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>vt(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Ue(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Wu(r);if(r.type==="decl")return new zu(r);if(r.type==="rule")return new Hu(r);if(r.type==="comment")return new _u(r);if(r.type==="atrule")return new Pu(r);throw new Error("Unknown node type: "+s.type)}var Uu=vt;vt.default=vt;let{dirname:ur,relative:Ho,resolve:Uo,sep:Vo}=ye,{SourceMapConsumer:jo,SourceMapGenerator:hr}=ye,{pathToFileURL:hn}=ye,Vu=kr,ju=!!(jo&&hr),Gu=!!(ur&&Uo&&Ho&&Vo),Yu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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=`
33
33
  `;this.css.includes(`\r
34
34
  `)&&(t=`\r
35
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ur(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Bo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)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.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Wu&&Bu&&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:!0})}else this.map=new hr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new hr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
36
- `),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}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?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ur(zo(r,this.mapOpts.annotation)));let i=_o(r,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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(on){let r=on(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;Fo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Wo=Hu;const es="'".charCodeAt(0),an='"'.charCodeAt(0),Ut="\\".charCodeAt(0),ln="/".charCodeAt(0),Vt=`
37
- `.charCodeAt(0),at=" ".charCodeAt(0),jt="\f".charCodeAt(0),Gt=" ".charCodeAt(0),Yt="\r".charCodeAt(0),Uu="[".charCodeAt(0),Vu="]".charCodeAt(0),ju="(".charCodeAt(0),Gu=")".charCodeAt(0),Yu="{".charCodeAt(0),Zu="}".charCodeAt(0),Ju=";".charCodeAt(0),Xu="*".charCodeAt(0),Ku=":".charCodeAt(0),qu="@".charCodeAt(0),Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qu=/.[\r\n"'(/\\]/,cn=/[\da-f]/i;var eh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,w=[],v=[];function C(){return f}function b(M){throw e.error("Unclosed "+M,f)}function S(){return v.length===0&&f>=g}function x(M){if(v.length)return v.pop();if(f>=g)return;let L=M?M.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Vt:case at:case Gt:case Yt:case jt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===at||n===Vt||n===Gt||n===Yt||n===jt);c=["space",r.slice(f,o)],f=o-1;break}case Uu:case Vu:case Yu:case Zu:case Ku:case Ju:case Gu:{let z=String.fromCharCode(n);c=[z,z,f];break}case ju:{if(m=w.length?w.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==es&&p!==an&&p!==at&&p!==Vt&&p!==Gt&&p!==jt&&p!==Yt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else b("bracket");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Qu.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case es:case an:{u=n===es?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||L){o=f+1;break}else b("string");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case qu:{Zt.lastIndex=f+1,Zt.test(r),Zt.lastIndex===0?o=r.length-1:o=Zt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,l=!0;r.charCodeAt(o+1)===Ut;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==ln&&n!==at&&n!==Vt&&n!==Gt&&n!==Yt&&n!==jt&&(o+=1,cn.test(r.charAt(o)))){for(;cn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===at&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===ln&&r.charCodeAt(f+1)===Xu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:b("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Jt.lastIndex=f+1,Jt.test(r),Jt.lastIndex===0?o=r.length-1:o=Jt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],w.push(c),f=o);break}}return f++,c}function E(M){v.push(M)}return{back:E,endOfFile:S,nextToken:x,position:C}};let th=ni,rh=Tr,sh=Nr,ih=Tt,un=ai,nh=eh;const hn={empty:!0,space:!0};function oh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let ah=class{constructor(e){this.input=e,this.root=new ih,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new th;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new rh;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 i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=nh(this.input)}decl(e,t){let r=new sh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||oh(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 u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 un;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,i){let n,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!hn[h]&&!hn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new un;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 i=t;i<e.length;i++)r+=e[i][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 "+e[0][1],{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})}};var lh=ah;let ch=Fe,uh=kr,hh=lh;function Cr(s,e){let t=new uh(s,e),r=new hh(t);try{r.parse()}catch(i){throw i}return r.root}var li=Cr;Cr.default=Cr;ch.registerParse(Cr);let Is=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}};var Ho=Is;Is.default=Is;let dh=Ho,Es=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",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 dh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var ci=Es;Es.default=Es;let fh=Fe,ph=oi,mh=Wo,gh=li,dn=ci,yh=Tt,bh=Rr,{isClean:Se,my:wh}=Ot;const Sh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ch={Once:!0,postcssPlugin:!0,prepare:!0},Xe=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function Uo(s){let e=!1,t=Sh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function fn(s){let e;return s.type==="document"?e=["Document",Xe,"DocumentExit"]:s.type==="root"?e=["Root",Xe,"RootExit"]:e=Uo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function $s(s){return s[Se]=!1,s.nodes&&s.nodes.forEach(e=>$s(e)),s}let Ms={},Ke=class Vo{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=$s(t);else if(t instanceof Vo||t instanceof dn)i=$s(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=gh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[wh]&&fh.rebuild(i)}this.result=new dn(e,i,r),this.helpers=oe(A({},Ms),{postcss:Ms,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ch[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[fn(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,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 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=!0,this.sync();let e=this.result.opts,t=bh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new mh(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=!0,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[Se];)e[Se]=!0,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,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(lt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[Se]){l[Se]=!0,e.push(fn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Xe){r.nodes&&r.nodes.length&&(r[Se]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Se]=!0;let t=Uo(e);for(let r of t)if(r===Xe)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Ke.registerPostcss=s=>{Ms=s};var jo=Ke;Ke.default=Ke;yh.registerLazyResult(Ke);ph.registerLazyResult(Ke);let xh=Wo,Ah=li;const Ih=ci;let Eh=Rr;let Rs=class{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=Ah;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"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Eh;this.result=new Ih(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new xh(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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[]}};var $h=Rs;Rs.default=Rs;let Mh=oi,Rh=jo,Oh=$h,Th=Tt,Ct=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?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 Oh(this,e,t):new Rh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nh=Ct;Ct.default=Ct;Th.registerProcessor(Ct);Mh.registerProcessor(Ct);let Go=ni,Yo=Tr,kh=Fe,Dh=ri,Zo=Nr,Jo=oi,Lh=zu,Ph=kr,_h=jo,zh=Lo,Fh=Or,Bh=li,ui=Nh,Wh=ci,Xo=Tt,Ko=ai,Hh=Rr,Uh=Ho;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ui(s)}B.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
35
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ur(e.file),i;this.mapOpts.sourcesContent===!1?(i=new jo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)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.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Gu&&ju&&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:!0})}else this.map=new hr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new hr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
36
+ `),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}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?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ur(Uo(r,this.mapOpts.annotation)));let i=Ho(r,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 Vu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(hn){let r=hn(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;Vo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Go=Yu;const ss="'".charCodeAt(0),dn='"'.charCodeAt(0),Ut="\\".charCodeAt(0),fn="/".charCodeAt(0),Vt=`
37
+ `.charCodeAt(0),at=" ".charCodeAt(0),jt="\f".charCodeAt(0),Gt=" ".charCodeAt(0),Yt="\r".charCodeAt(0),Zu="[".charCodeAt(0),Ju="]".charCodeAt(0),Xu="(".charCodeAt(0),Ku=")".charCodeAt(0),qu="{".charCodeAt(0),Qu="}".charCodeAt(0),eh=";".charCodeAt(0),th="*".charCodeAt(0),rh=":".charCodeAt(0),sh="@".charCodeAt(0),Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ih=/.[\r\n"'(/\\]/,pn=/[\da-f]/i;var nh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,w=[],v=[];function C(){return f}function b(R){throw e.error("Unclosed "+R,f)}function S(){return v.length===0&&f>=g}function x(R){if(v.length)return v.pop();if(f>=g)return;let P=R?R.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Vt:case at:case Gt:case Yt:case jt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===at||n===Vt||n===Gt||n===Yt||n===jt);c=["space",r.slice(f,o)],f=o-1;break}case Zu:case Ju:case qu:case Qu:case rh:case eh:case Ku:{let F=String.fromCharCode(n);c=[F,F,f];break}case Xu:{if(m=w.length?w.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==ss&&p!==dn&&p!==at&&p!==Vt&&p!==Gt&&p!==jt&&p!==Yt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=f;break}else b("bracket");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||ih.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case ss:case dn:{u=n===ss?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||P){o=f+1;break}else b("string");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case sh:{Zt.lastIndex=f+1,Zt.test(r),Zt.lastIndex===0?o=r.length-1:o=Zt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,l=!0;r.charCodeAt(o+1)===Ut;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==fn&&n!==at&&n!==Vt&&n!==Gt&&n!==Yt&&n!==jt&&(o+=1,pn.test(r.charAt(o)))){for(;pn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===at&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===fn&&r.charCodeAt(f+1)===th?(o=r.indexOf("*/",f+2)+1,o===0&&(i||P?o=r.length:b("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Jt.lastIndex=f+1,Jt.test(r),Jt.lastIndex===0?o=r.length-1:o=Jt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],w.push(c),f=o);break}}return f++,c}function $(R){v.push(R)}return{back:$,endOfFile:S,nextToken:x,position:C}};let oh=li,ah=Tr,lh=Nr,ch=Tt,mn=ui,uh=nh;const gn={empty:!0,space:!0};function hh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let dh=class{constructor(e){this.input=e,this.root=new ch,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new oh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new ah;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 i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=uh(this.input)}decl(e,t){let r=new lh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||hh(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 u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 mn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,i){let n,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!gn[h]&&!gn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new mn;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 i=t;i<e.length;i++)r+=e[i][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 "+e[0][1],{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})}};var fh=dh;let ph=Be,mh=kr,gh=fh;function Cr(s,e){let t=new mh(s,e),r=new gh(t);try{r.parse()}catch(i){throw i}return r.root}var hi=Cr;Cr.default=Cr;ph.registerParse(Cr);let Rs=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}};var Yo=Rs;Rs.default=Rs;let yh=Yo,Ms=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",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 yh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var di=Ms;Ms.default=Ms;let bh=Be,wh=ci,Sh=Go,vh=hi,yn=di,Ch=Tt,xh=Mr,{isClean:Se,my:Ah}=Ot;const Ih={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Eh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},$h={Once:!0,postcssPlugin:!0,prepare:!0},Ke=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function Zo(s){let e=!1,t=Ih[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ke,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ke,t+"Exit"]:[t,t+"Exit"]}function bn(s){let e;return s.type==="document"?e=["Document",Ke,"DocumentExit"]:s.type==="root"?e=["Root",Ke,"RootExit"]:e=Zo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Os(s){return s[Se]=!1,s.nodes&&s.nodes.forEach(e=>Os(e)),s}let Ts={},qe=class Jo{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Os(t);else if(t instanceof Jo||t instanceof yn)i=Os(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=vh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Ah]&&bh.rebuild(i)}this.result=new yn(e,i,r),this.helpers=ae(A({},Ts),{postcss:Ts,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Eh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$h[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[bn(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,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 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=!0,this.sync();let e=this.result.opts,t=xh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Sh(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=!0,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[Se];)e[Se]=!0,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,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(lt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[Se]){l[Se]=!0,e.push(bn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Ke){r.nodes&&r.nodes.length&&(r[Se]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Se]=!0;let t=Zo(e);for(let r of t)if(r===Ke)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};qe.registerPostcss=s=>{Ts=s};var Xo=qe;qe.default=qe;Ch.registerLazyResult(qe);wh.registerLazyResult(qe);let Rh=Go,Mh=hi;const Oh=di;let Th=Mr;let Ns=class{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=Mh;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"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Th;this.result=new Oh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Rh(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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[]}};var Nh=Ns;Ns.default=Ns;let kh=ci,Dh=Xo,Lh=Nh,Ph=Tt,Ct=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?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 Lh(this,e,t):new Dh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var _h=Ct;Ct.default=Ct;Ph.registerProcessor(Ct);kh.registerProcessor(Ct);let Ko=li,qo=Tr,zh=Be,Fh=ni,Qo=Nr,ea=ci,Bh=Uu,Wh=kr,Hh=Xo,Uh=Bo,Vh=Or,jh=hi,fi=_h,Gh=di,ta=Tt,ra=ui,Yh=Mr,Zh=Yo;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new fi(s)}W.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
38
38
  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:
39
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new ui().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return B([i(o)]).process(a,l)},i};B.stringify=Hh;B.parse=Bh;B.fromJSON=Lh;B.list=zh;B.comment=s=>new Yo(s);B.atRule=s=>new Go(s);B.decl=s=>new Zo(s);B.rule=s=>new Ko(s);B.root=s=>new Xo(s);B.document=s=>new Jo(s);B.CssSyntaxError=Dh;B.Declaration=Zo;B.Container=kh;B.Processor=ui;B.Document=Jo;B.Comment=Yo;B.Warning=Uh;B.AtRule=Go;B.Result=Wh;B.Input=Ph;B.Rule=Ko;B.Root=Xo;B.Node=Fh;_h.registerPostcss(B);var Vh=B;B.default=B;const Y=su(Vh);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var jh=Object.defineProperty,Gh=(s,e,t)=>e in s?jh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,de=(s,e,t)=>Gh(s,typeof e!="symbol"?e+"":e,t);const Yh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Zh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],qo=new WeakSet,Jh=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Jh.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Yh.includes(r)&&qo.add(this)}};const Xh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Xh.call(this,s,e,t)};function pn(){document.querySelectorAll("*").forEach(e=>{Zh.forEach(t=>{e.hasAttribute(t)&&qo.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?pn():document.addEventListener("DOMContentLoaded",pn)}catch(s){}function Kh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function qh(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:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var hi={exports:{}},O=String,Qo=function(){return{isColorSupported:!1,reset:O,bold:O,dim:O,italic:O,underline:O,inverse:O,hidden:O,strikethrough:O,black:O,red:O,green:O,yellow:O,blue:O,magenta:O,cyan:O,white:O,gray:O,bgBlack:O,bgRed:O,bgGreen:O,bgYellow:O,bgBlue:O,bgMagenta:O,bgCyan:O,bgWhite:O,blackBright:O,redBright:O,greenBright:O,yellowBright:O,blueBright:O,magentaBright:O,cyanBright:O,whiteBright:O,bgBlackBright:O,bgRedBright:O,bgGreenBright:O,bgYellowBright:O,bgBlueBright:O,bgMagentaBright:O,bgCyanBright:O,bgWhiteBright:O}};hi.exports=Qo();hi.exports.createColors=Qo;var Qh=hi.exports;const ed={},td=Object.freeze(Object.defineProperty({__proto__:null,default:ed},Symbol.toStringTag,{value:"Module"})),be=qh(td);let mn=Qh,gn=be,Os=class ea extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,ea)}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=mn.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=mn.createColors(!0);i=p=>c(d(p)),r=p=>h(p),gn&&(n=p=>gn(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),w=Math.max(this.column+g,this.endColumn+g),v=c.slice(f,w),C=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(v)+`
39
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new fi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return W([i(o)]).process(a,l)},i};W.stringify=Yh;W.parse=jh;W.fromJSON=Bh;W.list=Uh;W.comment=s=>new qo(s);W.atRule=s=>new Ko(s);W.decl=s=>new Qo(s);W.rule=s=>new ra(s);W.root=s=>new ta(s);W.document=s=>new ea(s);W.CssSyntaxError=Fh;W.Declaration=Qo;W.Container=zh;W.Processor=fi;W.Document=ea;W.Comment=qo;W.Warning=Zh;W.AtRule=Ko;W.Result=Gh;W.Input=Wh;W.Rule=ra;W.Root=ta;W.Node=Vh;Hh.registerPostcss(W);var Jh=W;W.default=W;const Y=lu(Jh);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var Xh=Object.defineProperty,Kh=(s,e,t)=>e in s?Xh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,fe=(s,e,t)=>Kh(s,typeof e!="symbol"?e+"":e,t);const qh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Qh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],sa=new WeakSet,ed=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ed.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();qh.includes(r)&&sa.add(this)}};const td=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){td.call(this,s,e,t)};function wn(){document.querySelectorAll("*").forEach(e=>{Qh.forEach(t=>{e.hasAttribute(t)&&sa.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?wn():document.addEventListener("DOMContentLoaded",wn)}catch(s){}function rd(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function sd(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:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var pi={exports:{}},O=String,ia=function(){return{isColorSupported:!1,reset:O,bold:O,dim:O,italic:O,underline:O,inverse:O,hidden:O,strikethrough:O,black:O,red:O,green:O,yellow:O,blue:O,magenta:O,cyan:O,white:O,gray:O,bgBlack:O,bgRed:O,bgGreen:O,bgYellow:O,bgBlue:O,bgMagenta:O,bgCyan:O,bgWhite:O,blackBright:O,redBright:O,greenBright:O,yellowBright:O,blueBright:O,magentaBright:O,cyanBright:O,whiteBright:O,bgBlackBright:O,bgRedBright:O,bgGreenBright:O,bgYellowBright:O,bgBlueBright:O,bgMagentaBright:O,bgCyanBright:O,bgWhiteBright:O}};pi.exports=ia();pi.exports.createColors=ia;var id=pi.exports;const nd={},od=Object.freeze(Object.defineProperty({__proto__:null,default:nd},Symbol.toStringTag,{value:"Module"})),be=sd(od);let Sn=id,vn=be,ks=class na extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,na)}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=Sn.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=Sn.createColors(!0);i=p=>c(d(p)),r=p=>h(p),vn&&(n=p=>vn(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),w=Math.max(this.column+g,this.endColumn+g),v=c.slice(f,w),C=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(v)+`
40
40
  `+C+i("^")}let m=r(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(p)+n(c)+`
41
41
  `+m+i("^")}return" "+r(p)+n(c)}).join(`
42
42
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
43
43
 
44
44
  `+e+`
45
- `),this.name+": "+this.message+e}};var di=Os;Os.default=Os;const yn={after:`
45
+ `),this.name+": "+this.message+e}};var mi=ks;ks.default=ks;const Cn={after:`
46
46
  `,beforeClose:`
47
47
  `,beforeComment:`
48
48
  `,beforeDecl:`
49
49
  `,beforeOpen:" ",beforeRule:`
50
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rd(s){return s[0].toUpperCase()+s.slice(1)}let Ts=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
51
- `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",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 r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+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,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return yn[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+rd(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=yn[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
50
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ad(s){return s[0].toUpperCase()+s.slice(1)}let Ds=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
51
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",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 r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+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,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Cn[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+ad(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Cn[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
52
52
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
53
53
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
54
54
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
55
55
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
56
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ta=Ts;Ts.default=Ts;let sd=ta;function Ns(s,e){new sd(e).stringify(s)}var Dr=Ns;Ns.default=Ns;var Nt={};Nt.isClean=Symbol("isClean");Nt.my=Symbol("my");let id=di,nd=ta,od=Dr,{isClean:ct,my:ad}=Nt;function ks(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>ks(a,t)):(n==="object"&&i!==null&&(i=ks(i)),t[r]=i)}return t}function Ae(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
57
- `?(t=1,r+=1):t+=1}return i}let Ds=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ct]=!1,this[ad]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ks(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new id(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[ct]=!0}markDirty(){if(this[ct]){this[ct]=!1;let e=this;for(;e=e.parent;)e[ct]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(Ae(r,this.source.start),Ae(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Ae(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
58
- `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Ae(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ae(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(Ae(t,this.source.start),Ae(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:Ae(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Ae(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new nd().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=od){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Lr=Ds;Ds.default=Ds;let ld=Lr,Ls=class extends ld{constructor(e){super(e),this.type="comment"}};var Pr=Ls;Ls.default=Ls;let cd=Lr,Ps=class extends cd{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var _r=Ps;Ps.default=Ps;let ra=Pr,sa=_r,ud=Lr,{isClean:ia,my:na}=Nt,fi,oa,aa,pi;function la(s){return s.map(e=>(e.nodes&&(e.nodes=la(e.nodes)),delete e.source,e))}function ca(s){if(s[ia]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ca(e)}let $e=class ua extends ud{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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()),!0}}}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),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=la(oa(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 sa(e)]}else if(e.selector||e.selectors)e=[new pi(e)];else if(e.name)e=[new fi(e)];else if(e.text)e=[new ra(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[na]||ua.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ia]&&ca(i),i.raws||(i.raws={}),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 r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}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,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};$e.registerParse=s=>{oa=s};$e.registerRule=s=>{pi=s};$e.registerAtRule=s=>{fi=s};$e.registerRoot=s=>{aa=s};var Be=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,fi.prototype):s.type==="rule"?Object.setPrototypeOf(s,pi.prototype):s.type==="decl"?Object.setPrototypeOf(s,sa.prototype):s.type==="comment"?Object.setPrototypeOf(s,ra.prototype):s.type==="root"&&Object.setPrototypeOf(s,aa.prototype),s[na]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let ha=Be,xr=class extends ha{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var mi=xr;xr.default=xr;ha.registerAtRule(xr);let hd=Be,da,fa,xt=class extends hd{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new da(new fa,this,e).stringify()}};xt.registerLazyResult=s=>{da=s};xt.registerProcessor=s=>{fa=s};var gi=xt;xt.default=xt;let dd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",fd=(s=21)=>{let e="",t=s|0;for(;t--;)e+=dd[Math.random()*64|0];return e};var pd={nanoid:fd};let{existsSync:md,readFileSync:gd}=be,{dirname:ts,join:yd}=be,{SourceMapConsumer:bn,SourceMapGenerator:wn}=be;function bd(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let _s=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ts(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new bn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return bd(e.substr(l[0].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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ts(e),md(e))return this.mapFile=e,gd(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof bn)return wn.fromSourceMap(t).toString();if(t instanceof wn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=yd(ts(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var pa=_s;_s.default=_s;let{nanoid:wd}=pd,{isAbsolute:zs,resolve:Fs}=be,{SourceMapConsumer:Sd,SourceMapGenerator:vd}=be,{fileURLToPath:Sn,pathToFileURL:Xt}=be,vn=di,Cd=pa,rs=be,ss=Symbol("lineToIndexCache"),xd=!!(Sd&&vd),Cn=!!(Fs&&zs);function xn(s){if(s[ss])return s[ss];let e=s.css.split(`
59
- `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[ss]=t,t}let Ar=class{get from(){return this.file||this.id}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=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Cn||/^\w+:\/\//.test(t.from)||zs(t.from)?this.file=t.from:this.file=Fs(t.from)),Cn&&xd){let r=new Cd(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+wd(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new vn(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new vn(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Xt&&(u.input.url=Xt(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return xn(this)[e-1]+t-1}fromOffset(e){let t=xn(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Fs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;zs(a.source)?o=Xt(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(Sn)u.file=Sn(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var zr=Ar;Ar.default=Ar;rs&&rs.registerInput&&rs.registerInput(Ar);let ma=Be,ga,ya,qe=class extends ma{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=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 n of i)n.raws.before=t.raws.before}return i}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 ga(new ya,this,e).stringify()}};qe.registerLazyResult=s=>{ga=s};qe.registerProcessor=s=>{ya=s};var kt=qe;qe.default=qe;ma.registerRoot(qe);let At={comma(s){return At.split(s,[","],!0)},space(s){let e=[" ",`
60
- `," "];return At.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ba=At;At.default=At;let wa=Be,Ad=ba,Ir=class extends wa{get selectors(){return Ad.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)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var yi=Ir;Ir.default=Ir;wa.registerRule(Ir);let Id=mi,Ed=Pr,$d=_r,Md=zr,Rd=pa,Od=kt,Td=yi;function It(s,e){if(Array.isArray(s))return s.map(a=>It(a));let i=s,{inputs:t}=i,r=He(i,["inputs"]);if(t){e=[];for(let a of t){let l=oe(A({},a),{__proto__:Md.prototype});l.map&&(l.map=oe(A({},l.map),{__proto__:Rd.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>It(a,e))),r.source){let n=r.source,{inputId:a}=n,l=He(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Od(r);if(r.type==="decl")return new $d(r);if(r.type==="rule")return new Td(r);if(r.type==="comment")return new Ed(r);if(r.type==="atrule")return new Id(r);throw new Error("Unknown node type: "+s.type)}var Nd=It;It.default=It;let{dirname:dr,relative:Sa,resolve:va,sep:Ca}=be,{SourceMapConsumer:xa,SourceMapGenerator:fr}=be,{pathToFileURL:An}=be,kd=zr,Dd=!!(xa&&fr),Ld=!!(dr&&va&&Sa&&Ca),Pd=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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=`
56
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var oa=Ds;Ds.default=Ds;let ld=oa;function Ls(s,e){new ld(e).stringify(s)}var Dr=Ls;Ls.default=Ls;var Nt={};Nt.isClean=Symbol("isClean");Nt.my=Symbol("my");let cd=mi,ud=oa,hd=Dr,{isClean:ct,my:dd}=Nt;function Ps(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>Ps(a,t)):(n==="object"&&i!==null&&(i=Ps(i)),t[r]=i)}return t}function Ae(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
57
+ `?(t=1,r+=1):t+=1}return i}let _s=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ct]=!1,this[dd]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ps(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new cd(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[ct]=!0}markDirty(){if(this[ct]){this[ct]=!1;let e=this;for(;e=e.parent;)e[ct]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(Ae(r,this.source.start),Ae(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Ae(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
58
+ `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Ae(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ae(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(Ae(t,this.source.start),Ae(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:Ae(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Ae(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new ud().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=hd){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Lr=_s;_s.default=_s;let fd=Lr,zs=class extends fd{constructor(e){super(e),this.type="comment"}};var Pr=zs;zs.default=zs;let pd=Lr,Fs=class extends pd{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var _r=Fs;Fs.default=Fs;let aa=Pr,la=_r,md=Lr,{isClean:ca,my:ua}=Nt,gi,ha,da,yi;function fa(s){return s.map(e=>(e.nodes&&(e.nodes=fa(e.nodes)),delete e.source,e))}function pa(s){if(s[ca]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)pa(e)}let $e=class ma extends md{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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()),!0}}}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),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fa(ha(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 la(e)]}else if(e.selector||e.selectors)e=[new yi(e)];else if(e.name)e=[new gi(e)];else if(e.text)e=[new aa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ua]||ma.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ca]&&pa(i),i.raws||(i.raws={}),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 r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}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,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};$e.registerParse=s=>{ha=s};$e.registerRule=s=>{yi=s};$e.registerAtRule=s=>{gi=s};$e.registerRoot=s=>{da=s};var We=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,gi.prototype):s.type==="rule"?Object.setPrototypeOf(s,yi.prototype):s.type==="decl"?Object.setPrototypeOf(s,la.prototype):s.type==="comment"?Object.setPrototypeOf(s,aa.prototype):s.type==="root"&&Object.setPrototypeOf(s,da.prototype),s[ua]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let ga=We,xr=class extends ga{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var bi=xr;xr.default=xr;ga.registerAtRule(xr);let gd=We,ya,ba,xt=class extends gd{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ya(new ba,this,e).stringify()}};xt.registerLazyResult=s=>{ya=s};xt.registerProcessor=s=>{ba=s};var wi=xt;xt.default=xt;let yd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bd=(s=21)=>{let e="",t=s|0;for(;t--;)e+=yd[Math.random()*64|0];return e};var wd={nanoid:bd};let{existsSync:Sd,readFileSync:vd}=be,{dirname:is,join:Cd}=be,{SourceMapConsumer:xn,SourceMapGenerator:An}=be;function xd(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Bs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=is(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new xn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return xd(e.substr(l[0].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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=is(e),Sd(e))return this.mapFile=e,vd(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof xn)return An.fromSourceMap(t).toString();if(t instanceof An)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Cd(is(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var wa=Bs;Bs.default=Bs;let{nanoid:Ad}=wd,{isAbsolute:Ws,resolve:Hs}=be,{SourceMapConsumer:Id,SourceMapGenerator:Ed}=be,{fileURLToPath:In,pathToFileURL:Xt}=be,En=mi,$d=wa,ns=be,os=Symbol("lineToIndexCache"),Rd=!!(Id&&Ed),$n=!!(Hs&&Ws);function Rn(s){if(s[os])return s[os];let e=s.css.split(`
59
+ `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[os]=t,t}let Ar=class{get from(){return this.file||this.id}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=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!$n||/^\w+:\/\//.test(t.from)||Ws(t.from)?this.file=t.from:this.file=Hs(t.from)),$n&&Rd){let r=new $d(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ad(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new En(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new En(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Xt&&(u.input.url=Xt(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return Rn(this)[e-1]+t-1}fromOffset(e){let t=Rn(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Hs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;Ws(a.source)?o=Xt(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(In)u.file=In(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var zr=Ar;Ar.default=Ar;ns&&ns.registerInput&&ns.registerInput(Ar);let Sa=We,va,Ca,Qe=class extends Sa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=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 n of i)n.raws.before=t.raws.before}return i}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 va(new Ca,this,e).stringify()}};Qe.registerLazyResult=s=>{va=s};Qe.registerProcessor=s=>{Ca=s};var kt=Qe;Qe.default=Qe;Sa.registerRoot(Qe);let At={comma(s){return At.split(s,[","],!0)},space(s){let e=[" ",`
60
+ `," "];return At.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var xa=At;At.default=At;let Aa=We,Md=xa,Ir=class extends Aa{get selectors(){return Md.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)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Si=Ir;Ir.default=Ir;Aa.registerRule(Ir);let Od=bi,Td=Pr,Nd=_r,kd=zr,Dd=wa,Ld=kt,Pd=Si;function It(s,e){if(Array.isArray(s))return s.map(a=>It(a));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let a of t){let l=ae(A({},a),{__proto__:kd.prototype});l.map&&(l.map=ae(A({},l.map),{__proto__:Dd.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>It(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Ue(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Ld(r);if(r.type==="decl")return new Nd(r);if(r.type==="rule")return new Pd(r);if(r.type==="comment")return new Td(r);if(r.type==="atrule")return new Od(r);throw new Error("Unknown node type: "+s.type)}var _d=It;It.default=It;let{dirname:dr,relative:Ia,resolve:Ea,sep:$a}=be,{SourceMapConsumer:Ra,SourceMapGenerator:fr}=be,{pathToFileURL:Mn}=be,zd=zr,Fd=!!(Ra&&fr),Bd=!!(dr&&Ea&&Ia&&$a),Wd=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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=`
61
61
  `;this.css.includes(`\r
62
62
  `)&&(t=`\r
63
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||dr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new xa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)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.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ld&&Dd&&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:!0})}else this.map=new fr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new fr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
64
- `),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}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?dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dr(va(r,this.mapOpts.annotation)));let i=Sa(r,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 kd(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(An){let r=An(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;Ca==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Aa=Pd;const is="'".charCodeAt(0),In='"'.charCodeAt(0),Kt="\\".charCodeAt(0),En="/".charCodeAt(0),qt=`
65
- `.charCodeAt(0),ut=" ".charCodeAt(0),Qt="\f".charCodeAt(0),er=" ".charCodeAt(0),tr="\r".charCodeAt(0),_d="[".charCodeAt(0),zd="]".charCodeAt(0),Fd="(".charCodeAt(0),Bd=")".charCodeAt(0),Wd="{".charCodeAt(0),Hd="}".charCodeAt(0),Ud=";".charCodeAt(0),Vd="*".charCodeAt(0),jd=":".charCodeAt(0),Gd="@".charCodeAt(0),rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Yd=/.[\r\n"'(/\\]/,$n=/[\da-f]/i;var Zd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,w=[],v=[];function C(){return f}function b(M){throw e.error("Unclosed "+M,f)}function S(){return v.length===0&&f>=g}function x(M){if(v.length)return v.pop();if(f>=g)return;let L=M?M.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case qt:case ut:case er:case tr:case Qt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===ut||n===qt||n===er||n===tr||n===Qt);c=["space",r.slice(f,o)],f=o-1;break}case _d:case zd:case Wd:case Hd:case jd:case Ud:case Bd:{let z=String.fromCharCode(n);c=[z,z,f];break}case Fd:{if(m=w.length?w.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==is&&p!==In&&p!==ut&&p!==qt&&p!==er&&p!==Qt&&p!==tr){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else b("bracket");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Yd.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case is:case In:{u=n===is?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||L){o=f+1;break}else b("string");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Gd:{rr.lastIndex=f+1,rr.test(r),rr.lastIndex===0?o=r.length-1:o=rr.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Kt:{for(o=f,l=!0;r.charCodeAt(o+1)===Kt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==En&&n!==ut&&n!==qt&&n!==er&&n!==tr&&n!==Qt&&(o+=1,$n.test(r.charAt(o)))){for(;$n.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ut&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===En&&r.charCodeAt(f+1)===Vd?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:b("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(sr.lastIndex=f+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,c=["word",r.slice(f,o+1),f,o],w.push(c),f=o);break}}return f++,c}function E(M){v.push(M)}return{back:E,endOfFile:S,nextToken:x,position:C}};let Jd=mi,Xd=Pr,Kd=_r,qd=kt,Mn=yi,Qd=Zd;const Rn={empty:!0,space:!0};function ef(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let tf=class{constructor(e){this.input=e,this.root=new qd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Jd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new Xd;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 i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Qd(this.input)}decl(e,t){let r=new Kd;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||ef(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 u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 Mn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,i){let n,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Rn[h]&&!Rn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new Mn;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 i=t;i<e.length;i++)r+=e[i][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 "+e[0][1],{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})}};var rf=tf;let sf=Be,nf=zr,of=rf;function Er(s,e){let t=new nf(s,e),r=new of(t);try{r.parse()}catch(i){throw i}return r.root}var bi=Er;Er.default=Er;sf.registerParse(Er);let Bs=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}};var Ia=Bs;Bs.default=Bs;let af=Ia,Ws=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",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 af(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var wi=Ws;Ws.default=Ws;let lf=Be,cf=gi,uf=Aa,hf=bi,On=wi,df=kt,ff=Dr,{isClean:ve,my:pf}=Nt;const mf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},yf={Once:!0,postcssPlugin:!0,prepare:!0},Qe=0;function ht(s){return typeof s=="object"&&typeof s.then=="function"}function Ea(s){let e=!1,t=mf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Qe,t+"Exit"]:[t,t+"Exit"]}function Tn(s){let e;return s.type==="document"?e=["Document",Qe,"DocumentExit"]:s.type==="root"?e=["Root",Qe,"RootExit"]:e=Ea(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Hs(s){return s[ve]=!1,s.nodes&&s.nodes.forEach(e=>Hs(e)),s}let Us={},et=class $a{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Hs(t);else if(t instanceof $a||t instanceof On)i=Hs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=hf;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[pf]&&lf.rebuild(i)}this.result=new On(e,i,r),this.helpers=oe(A({},Us),{postcss:Us,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!gf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yf[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);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(ht(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];){e[ve]=!0;let t=[Tn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ht(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,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 ht(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=!0,this.sync();let e=this.result.opts,t=ff;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new uf(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=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ht(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];)e[ve]=!0,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,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ht(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ve]){l[ve]=!0,e.push(Tn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Qe){r.nodes&&r.nodes.length&&(r[ve]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ve]=!0;let t=Ea(e);for(let r of t)if(r===Qe)e.nodes&&e.each(i=>{i[ve]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};et.registerPostcss=s=>{Us=s};var Ma=et;et.default=et;df.registerLazyResult(et);cf.registerLazyResult(et);let bf=Aa,wf=bi;const Sf=wi;let vf=Dr;let Vs=class{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=wf;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"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=vf;this.result=new Sf(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new bf(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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[]}};var Cf=Vs;Vs.default=Vs;let xf=gi,Af=Ma,If=Cf,Ef=kt,Et=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?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 If(this,e,t):new Af(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var $f=Et;Et.default=Et;Ef.registerProcessor(Et);xf.registerProcessor(Et);let Ra=mi,Oa=Pr,Mf=Be,Rf=di,Ta=_r,Na=gi,Of=Nd,Tf=zr,Nf=Ma,kf=ba,Df=Lr,Lf=bi,Si=$f,Pf=wi,ka=kt,Da=yi,_f=Dr,zf=Ia;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Si(s)}W.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
63
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||dr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ra(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)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.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bd&&Fd&&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:!0})}else this.map=new fr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new fr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
64
+ `),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}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?dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dr(Ea(r,this.mapOpts.annotation)));let i=Ia(r,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 zd(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(Mn){let r=Mn(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;$a==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ma=Wd;const as="'".charCodeAt(0),On='"'.charCodeAt(0),Kt="\\".charCodeAt(0),Tn="/".charCodeAt(0),qt=`
65
+ `.charCodeAt(0),ut=" ".charCodeAt(0),Qt="\f".charCodeAt(0),er=" ".charCodeAt(0),tr="\r".charCodeAt(0),Hd="[".charCodeAt(0),Ud="]".charCodeAt(0),Vd="(".charCodeAt(0),jd=")".charCodeAt(0),Gd="{".charCodeAt(0),Yd="}".charCodeAt(0),Zd=";".charCodeAt(0),Jd="*".charCodeAt(0),Xd=":".charCodeAt(0),Kd="@".charCodeAt(0),rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qd=/.[\r\n"'(/\\]/,Nn=/[\da-f]/i;var Qd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,w=[],v=[];function C(){return f}function b(R){throw e.error("Unclosed "+R,f)}function S(){return v.length===0&&f>=g}function x(R){if(v.length)return v.pop();if(f>=g)return;let P=R?R.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case qt:case ut:case er:case tr:case Qt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===ut||n===qt||n===er||n===tr||n===Qt);c=["space",r.slice(f,o)],f=o-1;break}case Hd:case Ud:case Gd:case Yd:case Xd:case Zd:case jd:{let F=String.fromCharCode(n);c=[F,F,f];break}case Vd:{if(m=w.length?w.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==as&&p!==On&&p!==ut&&p!==qt&&p!==er&&p!==Qt&&p!==tr){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=f;break}else b("bracket");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||qd.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case as:case On:{u=n===as?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||P){o=f+1;break}else b("string");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Kd:{rr.lastIndex=f+1,rr.test(r),rr.lastIndex===0?o=r.length-1:o=rr.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Kt:{for(o=f,l=!0;r.charCodeAt(o+1)===Kt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Tn&&n!==ut&&n!==qt&&n!==er&&n!==tr&&n!==Qt&&(o+=1,Nn.test(r.charAt(o)))){for(;Nn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ut&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Tn&&r.charCodeAt(f+1)===Jd?(o=r.indexOf("*/",f+2)+1,o===0&&(i||P?o=r.length:b("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(sr.lastIndex=f+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,c=["word",r.slice(f,o+1),f,o],w.push(c),f=o);break}}return f++,c}function $(R){v.push(R)}return{back:$,endOfFile:S,nextToken:x,position:C}};let ef=bi,tf=Pr,rf=_r,sf=kt,kn=Si,nf=Qd;const Dn={empty:!0,space:!0};function of(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let af=class{constructor(e){this.input=e,this.root=new sf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ef;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new tf;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 i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=nf(this.input)}decl(e,t){let r=new rf;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||of(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 u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,i){let n,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Dn[h]&&!Dn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}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 i=t;i<e.length;i++)r+=e[i][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 "+e[0][1],{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})}};var lf=af;let cf=We,uf=zr,hf=lf;function Er(s,e){let t=new uf(s,e),r=new hf(t);try{r.parse()}catch(i){throw i}return r.root}var vi=Er;Er.default=Er;cf.registerParse(Er);let Us=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}};var Oa=Us;Us.default=Us;let df=Oa,Vs=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",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 df(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ci=Vs;Vs.default=Vs;let ff=We,pf=wi,mf=Ma,gf=vi,Ln=Ci,yf=kt,bf=Dr,{isClean:ve,my:wf}=Nt;const Sf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Cf={Once:!0,postcssPlugin:!0,prepare:!0},et=0;function ht(s){return typeof s=="object"&&typeof s.then=="function"}function Ta(s){let e=!1,t=Sf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,et,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,et,t+"Exit"]:[t,t+"Exit"]}function Pn(s){let e;return s.type==="document"?e=["Document",et,"DocumentExit"]:s.type==="root"?e=["Root",et,"RootExit"]:e=Ta(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function js(s){return s[ve]=!1,s.nodes&&s.nodes.forEach(e=>js(e)),s}let Gs={},tt=class Na{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=js(t);else if(t instanceof Na||t instanceof Ln)i=js(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=gf;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[wf]&&ff.rebuild(i)}this.result=new Ln(e,i,r),this.helpers=ae(A({},Gs),{postcss:Gs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Cf[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);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(ht(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];){e[ve]=!0;let t=[Pn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ht(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,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 ht(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=!0,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 mf(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=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ht(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];)e[ve]=!0,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,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ht(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ve]){l[ve]=!0,e.push(Pn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===et){r.nodes&&r.nodes.length&&(r[ve]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ve]=!0;let t=Ta(e);for(let r of t)if(r===et)e.nodes&&e.each(i=>{i[ve]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};tt.registerPostcss=s=>{Gs=s};var ka=tt;tt.default=tt;yf.registerLazyResult(tt);pf.registerLazyResult(tt);let xf=Ma,Af=vi;const If=Ci;let Ef=Dr;let Ys=class{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=Af;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"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Ef;this.result=new If(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new xf(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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[]}};var $f=Ys;Ys.default=Ys;let Rf=wi,Mf=ka,Of=$f,Tf=kt,Et=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?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 Of(this,e,t):new Mf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=Et;Et.default=Et;Tf.registerProcessor(Et);Rf.registerProcessor(Et);let Da=bi,La=Pr,kf=We,Df=mi,Pa=_r,_a=wi,Lf=_d,Pf=zr,_f=ka,zf=xa,Ff=Lr,Bf=vi,xi=Nf,Wf=Ci,za=kt,Fa=Si,Hf=Dr,Uf=Oa;function H(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new xi(s)}H.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
66
66
  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:
67
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Si().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return W([i(o)]).process(a,l)},i};W.stringify=_f;W.parse=Lf;W.fromJSON=Of;W.list=kf;W.comment=s=>new Oa(s);W.atRule=s=>new Ra(s);W.decl=s=>new Ta(s);W.rule=s=>new Da(s);W.root=s=>new ka(s);W.document=s=>new Na(s);W.CssSyntaxError=Rf;W.Declaration=Ta;W.Container=Mf;W.Processor=Si;W.Document=Na;W.Comment=Oa;W.Warning=zf;W.AtRule=Ra;W.Result=Pf;W.Input=Tf;W.Rule=Da;W.Root=ka;W.Node=Df;Nf.registerPostcss(W);var Ff=W;W.default=W;const Z=Kh(Ff);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;class vi{constructor(...e){de(this,"parentElement",null),de(this,"parentNode",null),de(this,"ownerDocument"),de(this,"firstChild",null),de(this,"lastChild",null),de(this,"previousSibling",null),de(this,"nextSibling",null),de(this,"ELEMENT_NODE",1),de(this,"TEXT_NODE",3),de(this,"nodeType"),de(this,"nodeName"),de(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof vi){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Nn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ir={},Bf=()=>!!globalThis.Zone;function Ci(s){if(ir[s])return ir[s];const e=globalThis[s],t=e.prototype,r=s in Nn?Nn[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in kn?kn[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Bf())return ir[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?ir[s]=u:t}catch(l){return t}}const ns={};function Le(s,e,t){var r;const i=`${s}.${String(t)}`;if(ns[i])return ns[i].call(e);const n=Ci(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(ns[i]=a,a.call(e)):e[t]}const os={};function La(s,e,t){const r=`${s}.${String(t)}`;if(os[r])return os[r].bind(e);const n=Ci(s)[t];return typeof n!="function"?e[t]:(os[r]=n,n.bind(e))}function Wf(s){return Le("Node",s,"childNodes")}function Hf(s){return Le("Node",s,"parentNode")}function Uf(s){return Le("Node",s,"parentElement")}function Vf(s){return Le("Node",s,"textContent")}function jf(s,e){return La("Node",s,"contains")(e)}function Gf(s){return La("Node",s,"getRootNode")()}function Yf(s){return!s||!("host"in s)?null:Le("ShadowRoot",s,"host")}function Zf(s){return s.styleSheets}function Jf(s){return!s||!("shadowRoot"in s)?null:Le("Element",s,"shadowRoot")}function Xf(s,e){return Le("Element",s,"querySelector")(e)}function Kf(s,e){return Le("Element",s,"querySelectorAll")(e)}function xi(){return Ci("MutationObserver").constructor}function Me(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function qf(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Qf(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const T={childNodes:Wf,parentNode:Hf,parentElement:Uf,textContent:Vf,contains:jf,getRootNode:Gf,host:Yf,styleSheets:Zf,shadowRoot:Jf,querySelector:Xf,querySelectorAll:Kf,mutationObserver:xi,patch:Me,describeNode:qf,getElementVisibility:Qf};function ee(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ve=`Please stop import mirror directly. Instead of that,\r
67
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new xi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return H([i(o)]).process(a,l)},i};H.stringify=Hf;H.parse=Bf;H.fromJSON=Lf;H.list=zf;H.comment=s=>new La(s);H.atRule=s=>new Da(s);H.decl=s=>new Pa(s);H.rule=s=>new Fa(s);H.root=s=>new za(s);H.document=s=>new _a(s);H.CssSyntaxError=Df;H.Declaration=Pa;H.Container=kf;H.Processor=xi;H.Document=_a;H.Comment=La;H.Warning=Uf;H.AtRule=Da;H.Result=Wf;H.Input=Pf;H.Rule=Fa;H.Root=za;H.Node=Ff;_f.registerPostcss(H);var Vf=H;H.default=H;const Z=rd(Vf);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;class Ai{constructor(...e){fe(this,"parentElement",null),fe(this,"parentNode",null),fe(this,"ownerDocument"),fe(this,"firstChild",null),fe(this,"lastChild",null),fe(this,"previousSibling",null),fe(this,"nextSibling",null),fe(this,"ELEMENT_NODE",1),fe(this,"TEXT_NODE",3),fe(this,"nodeType"),fe(this,"nodeName"),fe(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ai){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const _n={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},zn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ir={},jf=()=>!!globalThis.Zone;function Ii(s){if(ir[s])return ir[s];const e=globalThis[s],t=e.prototype,r=s in _n?_n[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in zn?zn[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!jf())return ir[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?ir[s]=u:t}catch(l){return t}}const ls={};function Le(s,e,t){var r;const i=`${s}.${String(t)}`;if(ls[i])return ls[i].call(e);const n=Ii(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(ls[i]=a,a.call(e)):e[t]}const cs={};function Ba(s,e,t){const r=`${s}.${String(t)}`;if(cs[r])return cs[r].bind(e);const n=Ii(s)[t];return typeof n!="function"?e[t]:(cs[r]=n,n.bind(e))}function Gf(s){return Le("Node",s,"childNodes")}function Yf(s){return Le("Node",s,"parentNode")}function Zf(s){return Le("Node",s,"parentElement")}function Jf(s){return Le("Node",s,"textContent")}function Xf(s,e){return Ba("Node",s,"contains")(e)}function Kf(s){return Ba("Node",s,"getRootNode")()}function qf(s){return!s||!("host"in s)?null:Le("ShadowRoot",s,"host")}function Qf(s){return s.styleSheets}function ep(s){return!s||!("shadowRoot"in s)?null:Le("Element",s,"shadowRoot")}function tp(s,e){return Le("Element",s,"querySelector")(e)}function rp(s,e){return Le("Element",s,"querySelectorAll")(e)}function Ei(){return Ii("MutationObserver").constructor}function Re(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function sp(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function ip(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const T={childNodes:Gf,parentNode:Yf,parentElement:Zf,textContent:Jf,contains:Xf,getRootNode:Kf,host:qf,styleSheets:Qf,shadowRoot:ep,querySelector:tp,querySelectorAll:rp,mutationObserver:Ei,patch:Re,describeNode:sp,getElementVisibility:ip};function te(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const je=`Please stop import mirror directly. Instead of that,\r
68
68
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
69
- or you can use record.mirror to access the mirror instance during recording.`;let Dn={map:{},getId(){return console.error(Ve),-1},getNode(){return console.error(Ve),null},removeNodeFromMap(){console.error(Ve)},has(){return console.error(Ve),!1},reset(){console.error(Ve)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Dn=new Proxy(Dn,{get(s,e,t){return e==="map"&&console.error(Ve),Reflect.get(s,e,t)}}));function $t(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function Fr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>Fr(s,e,n||{},!0)}function ge(){return Math.round(performance.timeOrigin+performance.now())}function Pa(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=T.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=T.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function _a(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function za(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Ai(s){return s?s.nodeType===s.ELEMENT_NODE?s:T.parentElement(s):null}function ne(s,e,t,r){if(!s)return!1;const i=Ai(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(br(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function ep(s,e){return e.getId(s)!==-1}function as(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===bt}function Fa(s,e){if(pt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=T.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Fa(r,e):!0}function js(s){return!!s.changedTouches}function tp(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 Ba(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Wa(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Gs(s){return s?s instanceof vi&&"shadowRoot"in s?!!s.shadowRoot:!!T.shadowRoot(s):!1}class rp{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(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 Ha(s){var e;let t=null;return"getRootNode"in s&&((e=T.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&T.host(T.getRootNode(s))&&(t=T.host(T.getRootNode(s))),t}function sp(s){let e=s,t;for(;t=Ha(e);)e=t;return e}function ip(s){const e=s.ownerDocument;if(!e)return!1;const t=sp(s);return T.contains(e,t)}function Ua(s){const e=s.ownerDocument;return e?T.contains(e,s)||ip(s):!1}var _=(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))(_||{}),k=(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[s.Visibility=17]="Visibility",s))(k||{}),ae=(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))(ae||{}),Ie=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Ie||{}),tt=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(tt||{}),je=(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))(je||{}),Va=(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))(Va||{});const nr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Ce={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},np={MIN_CONFIDENCE_FOR_SKIP:.7},Ln=["form","main","nav","section","article","footer","header"],Pn=["form","navigation","main","region","contentinfo","complementary","banner","search"],op=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],ke={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},ja=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ap={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Mt(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Ga=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Ya(s){return s.trim().split(/\s+/).some(e=>Mt(e))}class lp{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:Ce.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Ln.includes(r)&&(t+=Ce.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Pn.includes(i)&&(t+=Ce.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Ce.ARIA_LABEL);const n=e.id;return n&&!Mt(n)&&(t+=Ce.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Ce.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Ce.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-Ce.DEPTH_PENALTY_THRESHOLD)*Ce.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Ln.includes(t))return"A";const r=e.getAttribute("role");return r&&Pn.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const cp=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],up=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function Ii(s){return cp.some(e=>e.test(s))}function Ei(s){return s.length<=2||/^\d/.test(s)?!0:up.some(e=>e.test(s))}function hp(s){return!Ii(s)&&!Ei(s)}function dp(s){return s.filter(e=>hp(e))}function fp(s){const e=[],t=[];for(const r of s)Ei(r)||Ii(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function _n(s){return Ei(s)||Ii(s)}const zn=s=>s.replace(/([#:.[\]@])/g,"\\$1");class pp{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<np.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Mt(e.id)&&(t+=`#${zn(e.id)}`);for(const r of Array.from(e.classList))_n(r)||(t+=`.${zn(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return op.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!_n(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Mt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}}function mp(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const gp={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function yp(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function bp(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&yp(i)||(l+=`#${i}`)),l}function Za(s,e,t={}){if(!e)return e;const r=A(A({},gp),t);return s==="href"||s==="src"?bp(e,r):e}const wp=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Sp=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],vp=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],Cp=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],xp=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Ap=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Ip=["data-category","data-action","data-label","data-value"],Ep=["id","name","type","placeholder","title","for","alt","href"],$p=["disabled","checked","selected","hidden","readonly","required","value"],Mp=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Rp(s,e){return wp.includes(s)?!0:Sp.includes(s)||vp.includes(s)||Cp.some(t=>s.startsWith(t))?!1:xp.includes(s)?!0:Ap.some(t=>s.startsWith(t))||Ip.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Mp.some(t=>t.test(e)):Ep.includes(s)?!0:$p.includes(s)?!1:!!s.startsWith("data-")}class Fn{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!Mt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=fp(a);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const a=this.extractText(e);a&&(t.text=a)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(ja.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return ke[e]!==void 0?ke[e]:e.startsWith("data-")?ke["data-*"]:e.startsWith("aria-")?ke["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Rp(i,r.value)||Ga.has(i)&&Ya(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Za(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=mp(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class Op{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),w=Math.atan2(f-m,g-p);r.push(`angle=${w.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Tp(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*nr.ANCHOR+r*nr.PATH+i*nr.TARGET+e*nr.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}class Np{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class kp{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Np((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return oe(A({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function Dp(s){return new kp(s)}let ls=null;function Lp(){return ls||(ls=Dp()),ls}function Bn(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
69
+ or you can use record.mirror to access the mirror instance during recording.`;let Fn={map:{},getId(){return console.error(je),-1},getNode(){return console.error(je),null},removeNodeFromMap(){console.error(je)},has(){return console.error(je),!1},reset(){console.error(je)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Fn=new Proxy(Fn,{get(s,e,t){return e==="map"&&console.error(je),Reflect.get(s,e,t)}}));function $t(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function Fr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>Fr(s,e,n||{},!0)}function ce(){return Math.round(performance.timeOrigin+performance.now())}function Wa(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=T.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=T.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Ha(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Ua(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function $i(s){return s?s.nodeType===s.ELEMENT_NODE?s:T.parentElement(s):null}function oe(s,e,t,r){if(!s)return!1;const i=$i(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(br(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function np(s,e){return e.getId(s)!==-1}function us(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===bt}function Va(s,e){if(pt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=T.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Va(r,e):!0}function Zs(s){return!!s.changedTouches}function op(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 ja(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ga(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Js(s){return s?s instanceof Ai&&"shadowRoot"in s?!!s.shadowRoot:!!T.shadowRoot(s):!1}class ap{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(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 Ya(s){var e;let t=null;return"getRootNode"in s&&((e=T.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&T.host(T.getRootNode(s))&&(t=T.host(T.getRootNode(s))),t}function lp(s){let e=s,t;for(;t=Ya(e);)e=t;return e}function cp(s){const e=s.ownerDocument;if(!e)return!1;const t=lp(s);return T.contains(e,t)}function Za(s){const e=s.ownerDocument;return e?T.contains(e,s)||cp(s):!1}var z=(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))(z||{}),k=(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[s.Visibility=17]="Visibility",s))(k||{}),le=(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))(le||{}),Ie=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Ie||{}),rt=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(rt||{}),Ge=(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))(Ge||{}),Ja=(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))(Ja||{});const nr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Ce={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},up={MIN_CONFIDENCE_FOR_SKIP:.7},Bn=["form","main","nav","section","article","footer","header"],Wn=["form","navigation","main","region","contentinfo","complementary","banner","search"],hp=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],ke={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},Xa=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),dp={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Rt(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Ka=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function qa(s){return s.trim().split(/\s+/).some(e=>Rt(e))}class fp{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:Ce.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Bn.includes(r)&&(t+=Ce.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Wn.includes(i)&&(t+=Ce.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Ce.ARIA_LABEL);const n=e.id;return n&&!Rt(n)&&(t+=Ce.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Ce.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Ce.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-Ce.DEPTH_PENALTY_THRESHOLD)*Ce.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Bn.includes(t))return"A";const r=e.getAttribute("role");return r&&Wn.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const pp=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],mp=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function Ri(s){return pp.some(e=>e.test(s))}function Mi(s){return s.length<=2||/^\d/.test(s)?!0:mp.some(e=>e.test(s))}function gp(s){return!Ri(s)&&!Mi(s)}function yp(s){return s.filter(e=>gp(e))}function bp(s){const e=[],t=[];for(const r of s)Mi(r)||Ri(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Hn(s){return Mi(s)||Ri(s)}const Un=s=>s.replace(/([#:.[\]@])/g,"\\$1");class wp{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<up.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Rt(e.id)&&(t+=`#${Un(e.id)}`);for(const r of Array.from(e.classList))Hn(r)||(t+=`.${Un(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return hp.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!Hn(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Rt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}}function Sp(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const vp={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Cp(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function xp(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&Cp(i)||(l+=`#${i}`)),l}function Qa(s,e,t={}){if(!e)return e;const r=A(A({},vp),t);return s==="href"||s==="src"?xp(e,r):e}const Ap=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Ip=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Ep=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],$p=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Rp=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Mp=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Op=["data-category","data-action","data-label","data-value"],Tp=["id","name","type","placeholder","title","for","alt","href"],Np=["disabled","checked","selected","hidden","readonly","required","value"],kp=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Dp(s,e){return Ap.includes(s)?!0:Ip.includes(s)||Ep.includes(s)||$p.some(t=>s.startsWith(t))?!1:Rp.includes(s)?!0:Mp.some(t=>s.startsWith(t))||Op.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!kp.some(t=>t.test(e)):Tp.includes(s)?!0:Np.includes(s)?!1:!!s.startsWith("data-")}class Vn{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!Rt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=bp(a);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const a=this.extractText(e);a&&(t.text=a)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Xa.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return ke[e]!==void 0?ke[e]:e.startsWith("data-")?ke["data-*"]:e.startsWith("aria-")?ke["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Dp(i,r.value)||Ka.has(i)&&qa(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Qa(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=Sp(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class Lp{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),w=Math.atan2(f-m,g-p);r.push(`angle=${w.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Pp(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*nr.ANCHOR+r*nr.PATH+i*nr.TARGET+e*nr.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}class _p{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class zp{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new _p((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return ae(A({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function Fp(s){return new zp(s)}let hs=null;function Bp(){return hs||(hs=Fp()),hs}function jn(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
70
70
  1. The element is detached from the DOM
71
71
  2. The element was created but never attached
72
- 3. You are working with a document node instead of an element`)}function Pp(s,e){if(!e)return;const t=Bn(s),r=e instanceof Document?e:Bn(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
72
+ 3. You are working with a document node instead of an element`)}function Wp(s,e){if(!e)return;const t=jn(s),r=e instanceof Document?e:jn(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
73
73
  Common causes:
74
74
  1. Working with iframe: pass iframe.contentDocument as root parameter
75
75
  2. Element from one iframe, root from another
76
76
  3. Element from main document, root from iframe (or vice versa)
77
77
 
78
- Solution: Ensure element and root parameter are from the same document context.`)}function _p(s,e={}){var U,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},ap),e);if(r.root)try{Pp(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Lp(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new Fn(r,i),te=Bp(s,r,P);return i.setEID(s,te),te}const a=new lp(r,i),l=new pp(r,i),o=new Fn(r,i),u=new Op,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:Ce.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&zp(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const P=Array.from(b.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},E=[],M={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=w.degraded||v.degraded,z=Fp(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:E,fallback:M,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:z}};return D.meta.confidence=Tp(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function zp(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Fp(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Bp(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const Ja={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Wn(s){return s==="id"?101:ke[s]!==void 0?ke[s]:s.startsWith("data-")?ke["data-*"]:s.startsWith("aria-")?ke["aria-*"]:0}function Wp(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Hp(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Up(s,e){const t=A(A({},Ja),e),r=`v${s.version}`,i=cs(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>cs(o,!1,t)).join(" > ")+" > ":"",a=cs(s.target,!0,t),l=t.includeConstraints?Vp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function cs(s,e=!1,t=Ja){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=Wn(h),m=h==="href"||h==="src"?Za(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&ja.has(h.name)||Ga.has(h.name)&&Ya(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Ys(d)}"`);if(t.includeText&&i.text&&!Hp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Ys(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return Wn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=dp(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Wp);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Vp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Ys(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Ys(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function jp(s,e,t){const r=_p(s,e);return r?Up(r,t):null}const dt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Gp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},dt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:dt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:dt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:dt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:dt.fallbackToBody}}function Hn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:Ai(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=jp(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Un(s){return"__ln"in s}class Yp{constructor(){y(this,"length",0),y(this,"head",null),y(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){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Un(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Un(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Vn=(s,e)=>`${s}@${e}`,Zp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Jp(s){const e=s.toLowerCase();return Zp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Xp{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"excludeAttribute"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"selectorOptions",null),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Yp,i=o=>{let u=o,c=bt;for(;c===bt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=T.parentNode(o);if(!u||!Ua(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=pt(u)?this.mirror.getId(Ha(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ye(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ba(m,this.mirror)&&this.iframeManager.addIframe(m),Wa(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Gs(o)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)jn(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(T.parentNode(o))||n(o);for(const o of this.addedSet)!Gn(this.droppedSet,o)&&!jn(this.removesSubTreeCache,o,this.mirror)||Gn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(T.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(T.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=T.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=T.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=T.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Hn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Hn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(Jp)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.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))}),y(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));const r=Array.from(T.childNodes(e),i=>T.textContent(i)||"").join("");t.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!as(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=T.textContent(e.target);!ne(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ai(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Xs(t),c=ps(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(ps(r,this.excludeAttribute)){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=gr(t);i=mr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(ne(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!po(t.tagName,r))if(d.attributes[r]=fo(this.doc,ze(t.tagName),ze(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${ge()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),w=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||w!==m.style.getPropertyPriority(g)?w===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,w]:d._unchangedStyles[g]=[f,w]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(ne(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=pt(e.target)?this.mirror.getId(T.host(e.target)):this.mirror.getId(e.target);ne(e.target,this.blockClass,this.blockSelector,!1)||as(t,this.mirror,this.slimDOMOptions)||!ep(t,this.mirror)||(this.addedSet.has(t)?(Zs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Vn(r,i)]?Zs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:pt(e.target)&&mt(e.target)?!0:void 0}),Kp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(as(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[Vn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ne(e,this.blockClass,this.blockSelector,!1)||(T.childNodes(e).forEach(r=>this.genAdds(r)),Gs(e)&&T.childNodes(T.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function Zs(s,e){s.delete(e),T.childNodes(e).forEach(t=>Zs(s,t))}function Kp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),T.childNodes(r).forEach(i=>t.push(i)))}}function jn(s,e,t){return s.size===0?!1:qp(s,e)}function qp(s,e,t){const r=T.parentNode(e);return r?s.has(r):!1}function Gn(s,e){return s.size===0?!1:Xa(s,e)}function Xa(s,e){const t=T.parentNode(e);return t?s.has(t)?!0:Xa(s,t):!1}let gt;function Qp(s){gt=s}function em(){gt=void 0}const N=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&&gt(r)===!0)return;throw r}}:s,me=[];function rt(s){try{if("composedPath"in s){const 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 Ka(s,e){const t=new Xp;me.push(t),t.init(s);const r=new(xi())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function tm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=$t(N(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=N($t(N(h=>{const d=rt(h),{clientX:p,clientY:m}=js(h)?h.changedTouches[0]:h;l||(l=ge()),a.push({x:p,y:m,id:r.getId(d),timeOffset:ge()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return N(()=>{c.forEach(h=>h())})}function rm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=rt(h);if(ne(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ie.Mouse;break;case"touch":p=Ie.Touch;break;case"pen":p=Ie.Pen;break}p===Ie.Touch?ae[c]===ae.MouseDown?m="TouchStart":ae[c]===ae.MouseUp&&(m="TouchEnd"):Ie.Pen}else js(h)&&(p=Ie.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ie.Touch||m.startsWith("Mouse")&&p===Ie.Mouse)&&(p=null)):ae[c]===ae.Click&&(p=o,o=null);const g=js(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:w,clientY:v}=g;N(s)(A({type:ae[m],id:f,x:w,y:v},p!==null&&{pointerType:p}))};return Object.keys(ae).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=ze(c);const d=u(c);if(window.PointerEvent)switch(ae[c]){case ae.MouseDown:case ae.MouseUp:h=h.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}l.push(ee(h,d,e))}),N(()=>{l.forEach(c=>c())})}function qa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=N($t(N(l=>{const o=rt(l);if(!o||ne(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=Pa(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return ee("scroll",a,e)}function sm({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=N($t(N(()=>{const n=_a(),a=za();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return ee("resize",i,e)}function im({navigationCb:s,doc:e,sampling:t}){var c;if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=N(h=>{const d=r.location.href;d!==i&&(s({href:d,oldHref:i,navigationType:h}),i=d)}),l=Me(r.history,"pushState",function(h){return function(...d){const p=h.apply(this,d);return a("pushState"),p}});n.push(l);const o=Me(r.history,"replaceState",function(h){return function(...d){const p=h.apply(this,d);return a("replaceState"),p}});if(n.push(o),n.push(ee("popstate",()=>a("popstate"),r)),n.push(ee("hashchange",()=>a("hashchange"),r)),(typeof t.navigation=="object"&&(c=t.navigation.useNavigationAPI)!=null?c:!0)&&"navigation"in r)try{const h=r.navigation,d=p=>{var m;const g=p;if(g.navigationType==="push"||g.navigationType==="replace"){const f=(m=g.destination)==null?void 0:m.url;f&&f!==i&&(s({href:f,oldHref:i,navigationType:"navigate"}),i=f)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return N(()=>{n.forEach(h=>h())})}const us=["INPUT","TEXTAREA","SELECT"],Yn=new WeakMap,nm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Zn=new WeakMap;function om({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(C){let b=rt(C);const S=C.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=T.parentElement(b)),!b||!x||us.indexOf(x)<0||ne(b,r,i,!0)||b.classList.contains(n)||a&&b.matches(a))return;let E=b.value,M=!1;const L=gr(b)||"";L==="radio"||L==="checkbox"?M=b.checked:(l[x.toLowerCase()]||l[L])&&(E=mr({element:b,maskInputOptions:l,tagName:x,type:L,value:E,maskInputFn:o})),d(b,c?{text:E,isChecked:M,userTriggered:S}:{text:E,isChecked:M});const z=b.name;L==="radio"&&z&&M&&e.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(D=>{if(D!==b){const U=D.value;d(D,c?{text:U,isChecked:!M,userTriggered:!1}:{text:U,isChecked:!M})}})}function d(C,b){const S=Yn.get(C),x=C,E=x.hasAttribute("placeholder"),M=x.value==="",L=typeof x.defaultValue=="string"?x.defaultValue==="":!0,z=!b.userTriggered,D=!S||S.text==="",U=E&&M&&L&&D&&z&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!S&&x.hasAttribute("placeholder"),K=!b.userTriggered&&x.value===x.defaultValue&&!S&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),I=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!S,P=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!S;if(U||J||K||I||P){console.debug(`[${ge()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:T.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:U,isRenderDrivenTextInput:J,isValueFromDefault:K,isPhantomCheckbox:I,isPhantomRadio:P});return}if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Yn.set(C,b);const te=t.getId(C);N(s)(oe(A({},b),{id:te}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(C=>ee(C,N(h),e)),g=C=>{const b=rt(C);if(!b||!b.tagName)return;if(u.input==="all"){h(C);return}const S=b.tagName,x=C.key,E=nm.includes(x),M=S==="TEXTAREA",L=e.activeElement===b,z=b.value,D=Zn.get(b);if(Zn.set(b,z),!L){h(C);return}if(E){if(!M){h(C);return}let U=D!=null?D:"",J=0;const K=2,I=()=>{const P=b.value,te=e.activeElement===b,X=P!==U;if(!te){h(C);return}if(X)J=0,U=P;else if(J++,J>=K){h(C);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(ee("keydown",N(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(C=>C())};const w=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),v=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&m.push(...v.map(C=>Fr(C[0],C[1],{set(){N(h)({target:this,isTrusted:!1})}},!1,f))),N(()=>{m.forEach(C=>C())})}function $r(s){const e=[];function t(r,i){if(or("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||or("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||or("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||or("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function Te(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function am({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:N((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=Te(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};ar("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(ar("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),ar("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),ar("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:N((d,p,m)=>{const[g,f]=m,{id:w,styleId:v}=Te(p.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||v&&v!==-1)&&s({id:w,styleId:v,adds:[{rule:g,index:[...$r(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:N((d,p,m)=>{const[g]=m,{id:f,styleId:w}=Te(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||w&&w!==-1)&&s({id:f,styleId:w,removes:[{index:[...$r(p),g]}]}),d.apply(p,m)})})}),N(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Qa({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(T.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function lm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:N((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:$r(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:N((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:$r(o.parentRule)}),l.apply(o,u)})}),N(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function cm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=N(o=>$t(N(u=>{const c=rt(u);if(!c||ne(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[ee("play",a(je.Play),n),ee("pause",a(je.Pause),n),ee("seeked",a(je.Seeked),n),ee("volumechange",a(je.VolumeChange),n),ee("ratechange",a(je.RateChange),n)];return N(()=>{l.forEach(o=>o())})}function um({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=Me(e.fonts,"add",function(l){return function(o){return setTimeout(N(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),N(()=>{r.forEach(l=>l())})}function hm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=N(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;ne(p,r,i,!0)||ne(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function dm({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function fm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function pm(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};fm(s,e);let r;s.recordDOM&&(r=Ka(s,s.doc));const i=tm(s),n=rm(s),a=qa(s),l=sm(s,{win:t}),o=im(s),u=om(s),c=cm(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=am(s,{win:t}),d=Qa(s,s.doc),p=lm(s,{win:t}),s.collectFonts&&(m=um(s)));const g=hm(s),f=dm(s),w=[];for(const v of s.plugins)w.push(v.observer(v.callback,t,v.options));return N(()=>{var v;me.forEach(C=>C.reset()),(v=s.visibilityManager)==null||v.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),w.forEach(C=>C())})}function or(s){return typeof window[s]!="undefined"}function ar(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Jn{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,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}}class mm{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Jn(ho)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.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){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return t;case _.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _.IncrementalSnapshot:switch(t.data.source){case k.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),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 k.Drag:case k.TouchMove:case k.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(t.data,e,["id"]),t;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case k.Font:return t;case k.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case k.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Va.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class gm{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(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(!mt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ka(oe(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qa(oe(A({},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(T.host(e))),this.restoreHandlers.push(Qa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=T.shadowRoot(this);return l&&Ua(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ym=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var lr=0;lr<Ze.length;lr++)ym[Ze.charCodeAt(lr)]=lr;var bm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Xn=new Map;function wm(s,e){let t=Xn.get(s);return t||(t=new Map,Xn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const el=(s,e,t)=>{if(!s||!(rl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=wm(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function pr(s,e,t){if(s instanceof Array)return s.map(r=>pr(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){const r=s.constructor.name,i=bm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[pr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[pr(s.data,e,t),s.width,s.height]};if(rl(s,e)||typeof s=="object"){const r=s.constructor.name,i=el(s,e,t);return{rr_type:r,index:i}}}}return s}const tl=(s,e,t)=>s.map(r=>pr(r,e,t)),rl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Sm(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Me(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return ne(this.canvas,t,r,!0)||setTimeout(()=>{const c=tl(u,e,this);s(this.canvas,{type:tt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=Fr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:tt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function vm(s){return s==="experimental-webgl"?"webgl":s}function Kn(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!ne(this,e,t,!0)){const u=vm(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function qn(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=Me(s,o,function(c){return function(...h){const d=c.apply(this,h);if(el(d,n,this),"tagName"in this.canvas&&!ne(this.canvas,r,i,!0)){const p=tl(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=Fr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function Cm(s,e,t,r){const i=[];return i.push(...qn(e.WebGLRenderingContext.prototype,tt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...qn(e.WebGL2RenderingContext.prototype,tt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const sl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",xm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qn=typeof self!="undefined"&&self.Blob&&new Blob([xm(sl)],{type:"text/javascript;charset=utf-8"});function Am(s){let e;try{if(e=Qn&&(self.URL||self.webkitURL).createObjectURL(Qn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+sl,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Im{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Kn(t,r,i,!0),l=new Map,o=new Am;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:w,width:v,height:C}=m.data;this.mutationCb({id:g,type:tt["2D"],commands:[{property:"clearRect",args:[0,0,v,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{ne(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const w=this.mirror.getId(g);if(l.get(w)||g.width===0||g.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const v=await createImageBitmap(g);o.postMessage({id:w,bitmap:v,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Kn(e,t,r,!1),n=Sm(this.processMutation.bind(this),e,t,r),a=Cm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return He(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function eo(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=Em((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=$m(r),u=Mm(o,a);for(const f of s){const w=f.getBoundingClientRect();let v=Tm(),C=0;w.width>0&&w.height>0&&(v=Rm(w,u),C=Om(w,v),C=Math.round(C*100)/100);const b=Nm(f),S=(m=e.get(f))!=null?m:null,x=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,E=C,M=(S==null?void 0:S.isStyleVisible)&&x>i,L=b&&E>i;!S||M!==L||M!==L&&Math.abs(E-x)>n?l.set(f,{target:f,isVisible:L,isStyleVisible:b,intersectionRatio:E,intersectionRect:v,oldValue:S}):l.set(f,S)}return l}function Em(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function $m(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Mm(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Rm(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Om(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Tm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Nm(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class km{constructor(e){var u,c,h,d,p,m;y(this,"frozen",!1),y(this,"locked",!1),y(this,"pending",new Map),y(this,"mirror"),y(this,"mutationCb"),y(this,"rafId",null),y(this,"intervalId",null),y(this,"rafThrottle"),y(this,"lastFlushTime",0),y(this,"elements",new Set),y(this,"previousState",new Map),y(this,"root",null),y(this,"threshold"),y(this,"sensitivity"),y(this,"rootMargin"),y(this,"hasInitialized",!1),y(this,"mode","none"),y(this,"debounce",50),y(this,"throttle",100),y(this,"buffer",new Map),y(this,"debounceTimer",null),y(this,"lastThrottleTime",0),y(this,"disabled",!1),y(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&(this.observe(w),w.querySelectorAll("*").forEach(v=>this.observe(v)))}),f.removedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&this.unobserve(w)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=eo(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=eo(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Dm=150,Lm=5e3,Pm=100;class _m{constructor(e){var n,a,l;y(this,"frozen",!1),y(this,"locked",!1),y(this,"disabled",!1),y(this,"settleTimeout"),y(this,"maxWait"),y(this,"debounceMs"),y(this,"settlingObserver",null),y(this,"debounceTimer",null),y(this,"settleCheckTimer",null),y(this,"maxWaitTimer",null),y(this,"lastMutationTime",0),y(this,"pendingNavigation",null),y(this,"doc"),y(this,"onSnapshot");const{doc:t,config:r,onSnapshot:i}=e;this.doc=t,this.onSnapshot=N(i),this.settleTimeout=(n=r.settleTimeout)!=null?n:Dm,this.maxWait=(a=r.maxWait)!=null?a:Lm,this.debounceMs=(l=r.debounce)!=null?l:Pm}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=xi();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class zm{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new rp),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;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:so(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Fm{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const Bm="3.5.0-alpha.1";let G,Oe,hs,Rt=!1;const Mr=[];let ft;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Pi=s.contentWindow)==null?void 0:Pi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const fe=_l();function le(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,checkoutDebounce:n,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,excludeAttribute:c,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:f,maskInputFn:w,maskTextFn:v,hooks:C,packFn:b,sampling:S={},dataURLOptions:x={},mousemoveWait:E,recordDOM:M=!0,recordCanvas:L=!1,recordCrossOriginIframes:z=!1,recordAfter:D=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:U=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:K=!1,inlineImages:I=!1,plugins:P,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:X=new Set([]),selector:ue,errorHandler:st}=s;Qp(st);const pe=z?window.parent===window:!0;let it=!1;if(!pe)try{window.parent.document&&(it=!1)}catch($){it=!0}if(pe&&!e)throw new Error("emit function is required");if(!pe&&!it)return()=>{};E!==void 0&&S.mousemove===void 0&&(S.mousemove=E),fe.reset();const Br=c===void 0?/.^/:c,Wr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:g!==void 0?g:{password:!0},Hr=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},$i=Gp(ue);tp();let Mi,Ur=0,Dt=0,Ri=0,Re=!1,ce=null,We=null;const Oi=$=>{for(const ie of P||[])ie.eventProcessor&&($=ie.eventProcessor($));return b&&!it&&($=b($)),$},Lt=()=>{ce=null,Re=!1,We=null,se==null||se.cancelPending(),Oe(!0),me.forEach($=>{$.resetBuffers(),$.unsetFrozen()}),re&&re.unsetFrozen(),se&&se.unsetFrozen()};G=($,ie)=>{var H;const V=$;if(V.timestamp=ge(),V.checkoutId=Ri,(H=me[0])!=null&&H.isFrozen()&&!Re&&V.type!==_.FullSnapshot&&!(V.type===_.IncrementalSnapshot&&V.data.source===k.Mutation)&&(me.forEach(he=>he.unfreeze()),re==null||re.unfreeze(),se==null||se.unfreeze()),pe)e==null||e(Oi(V),ie);else if(it){const he={type:"rrweb",event:Oi(V),isCheckout:ie};window.parent.postMessage(he,"*")}if(V.type===_.FullSnapshot)Mi=V,Ur=0,Dt=0;else if(V.type===_.IncrementalSnapshot){if(V.data.source===k.Mutation&&V.data.isAttachIframe)return;if(V.data.source!==k.Visibility){Ur++;const he=r&&Ur>=r,F=t&&V.timestamp-Mi.timestamp>t;if(he||F)if(n){Re||(Re=!0,We=ge(),me.forEach(ll=>ll.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const nt=ge()-We,al=n*3;nt>=al?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}}};const Pt=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Mutation},$)})},il=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Visibility},$)})},Ti=$=>G({type:_.IncrementalSnapshot,data:A({source:k.Scroll},$)}),Ni=$=>G({type:_.IncrementalSnapshot,data:A({source:k.CanvasMutation},$)}),nl=$=>G({type:_.IncrementalSnapshot,data:A({source:k.AdoptedStyleSheet},$)}),Pe=new zm({mutationCb:Pt,adoptedStyleSheetCb:nl}),_e=new mm({mirror:fe,mutationCb:Pt,stylesheetManager:Pe,recordCrossOriginIframes:z,wrappedEmit:G});for(const $ of P||[])$.getMirror&&$.getMirror({nodeMirror:fe,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const Vr=new Fm;hs=new Im({recordCanvas:L,mutationCb:Ni,win:window,blockClass:a,blockSelector:l,mirror:fe,sampling:S.canvas,dataURLOptions:x});const _t=new gm({mutationCb:Pt,scrollCb:Ti,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskInputOptions:Wr,dataURLOptions:x,maskTextFn:v,maskInputFn:w,recordCanvas:L,inlineImages:I,sampling:S,slimDOMOptions:Hr,iframeManager:_e,stylesheetManager:Pe,canvasManager:hs,keepIframeSrcFn:te,processedNodeManager:Vr,selectorOptions:$i},mirror:fe}),ol=M&&(i!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let re;if(ol){const $=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},ie=$.recordVisibility===!0;re=new km({doc:document,mirror:fe,sampling:$,mutationCb:ie?il:()=>{},notifyActivity:i!=null?H=>{if(Dt+=H,Dt>=i)if(Dt=0,n){Re||(Re=!0,We=ge(),me.forEach(F=>F.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const V=ge()-We,he=n*3;V>=he?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}:void 0})}Oe=($=!1)=>{if(!M)return;Ri++,G({type:_.Meta,data:{href:window.location.href,width:za(),height:_a()}},$),Pe.reset(),_t.init(),me.forEach(H=>H.lock()),re==null||re.lock(),se==null||se.lock();const ie=ru(document,{mirror:fe,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskAllInputs:Wr,maskTextFn:v,maskInputFn:w,slimDOM:Hr,dataURLOptions:x,recordCanvas:L,inlineImages:I,onSerialize:H=>{Ba(H,fe)&&_e.addIframe(H),Wa(H,fe)&&Pe.trackLinkElement(H),Gs(H)&&_t.addShadowRoot(T.shadowRoot(H),document)},onIframeLoad:(H,V)=>{_e.attachIframe(H,V),_t.observeAttachShadow(H)},onStylesheetLoad:(H,V)=>{Pe.attachLinkElement(H,V)},keepIframeSrcFn:te,selector:ue});if(!ie)return console.warn("Failed to snapshot the document");G({type:_.FullSnapshot,data:{node:ie,initialOffset:Pa(window)}},$),me.forEach(H=>H.unlock()),re==null||re.unlock(),se==null||se.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))},ft=()=>{for(const $ of Mr)G($);Mr.length=0};let se;const jr=S.navigation;if(jr!==!1){const $=typeof jr=="object"?jr:{};se=new _m({doc:document,config:$,onSnapshot:ie=>{Re&&(ce&&(clearTimeout(ce),ce=null),Re=!1,We=null,me.forEach(H=>{H.resetBuffers(),H.unsetFrozen()}),re==null||re.unsetFrozen()),Oe(ie)}})}try{const $=[],ie=V=>{var he;return N(pm)({mutationCb:Pt,mousemoveCb:(F,nt)=>G({type:_.IncrementalSnapshot,data:{source:nt,positions:F}}),mouseInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MouseInteraction},F)}),scrollCb:Ti,viewportResizeCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.ViewportResize},F)}),navigationCb:F=>{se?se.handleNavigation(F):Oe(!0)},inputCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Input},F)}),mediaInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MediaInteraction},F)}),styleSheetRuleCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleSheetRule},F)}),styleDeclarationCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleDeclaration},F)}),canvasMutationCb:Ni,visibilityManager:re,fontCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Font},F)}),selectionCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.Selection},F)})},customElementCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.CustomElement},F)})},blockClass:a,ignoreClass:o,ignoreSelector:u,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,maskInputOptions:Wr,inlineStylesheet:p,sampling:S,recordDOM:M,recordCanvas:L,inlineImages:I,userTriggeredOnInput:J,collectFonts:K,doc:V,maskInputFn:w,maskTextFn:v,keepIframeSrcFn:te,blockSelector:l,slimDOMOptions:Hr,dataURLOptions:x,selectorOptions:$i,mirror:fe,iframeManager:_e,stylesheetManager:Pe,shadowDomManager:_t,processedNodeManager:Vr,canvasManager:hs,ignoreCSSAttributes:X,plugins:((he=P==null?void 0:P.filter(F=>F.observer))==null?void 0:he.map(F=>({observer:F.observer,options:F.options,callback:nt=>G({type:_.Plugin,data:{plugin:F.name,payload:nt}})})))||[]},C)};_e.addLoadListener(V=>{try{$.push(ie(V.contentDocument))}catch(he){console.warn(he)}});const H=()=>{U==="before"&&ft(),Oe(),$.push(ie(document)),Rt=!0,U==="after"&&ft()};return document.readyState==="interactive"||document.readyState==="complete"?H():($.push(ee("DOMContentLoaded",()=>{G({type:_.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&H()})),$.push(ee("load",()=>{G({type:_.Load,data:{}}),D==="load"&&H()},window))),()=>{ce&&(clearTimeout(ce),ce=null),ft(),$.forEach(V=>V()),se==null||se.destroy(),Vr.destroy(),Rt=!1,em()}}catch($){console.warn($)}}le.getVersion=()=>Bm;le.isRecording=()=>Rt;le.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Mr.length} events`),ft()};le.addCustomEvent=(s,e)=>{const t={type:_.Custom,data:{tag:s,payload:e}};if(!Rt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Mr.push(t);return}G(t)};le.freezePage=()=>{me.forEach(s=>s.freeze())};le.takeFullSnapshot=s=>{if(!Rt)throw new Error("please take full snapshot after start recording");Oe(s)};le.mirror=fe;var to;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(to||(to={}));const{getVersion:Eg}=le,{isRecording:$g}=le,{flushCustomEventQueue:Mg}=le,{addCustomEvent:Rg}=le,{freezePage:Og}=le,{takeFullSnapshot:Tg}=le;exports.record=le;
78
+ Solution: Ensure element and root parameter are from the same document context.`)}function Hp(s,e={}){var V,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},dp),e);if(r.root)try{Wp(s,r.root)}catch(_){return console.error("Cross-document generation detected:",_),null}const i=(V=r.cache)!=null?V:Bp(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const _=new Vn(r,i),re=jp(s,r,_);return i.setEID(s,re),re}const a=new fp(r,i),l=new wp(r,i),o=new Vn(r,i),u=new Lp,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const _=Array.from(m.children).indexOf(h);_!==-1&&(g=_+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:Ce.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&Up(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const _=Array.from(b.children).indexOf(s);_!==-1&&(S=_+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},$=[],R={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},P=w.degraded||v.degraded,F=Vp(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:$,fallback:R,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:P,degradationReason:F}};return D.meta.confidence=Pp(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function Up(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Vp(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function jp(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const el={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Gn(s){return s==="id"?101:ke[s]!==void 0?ke[s]:s.startsWith("data-")?ke["data-*"]:s.startsWith("aria-")?ke["aria-*"]:0}function Gp(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Yp(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Zp(s,e){const t=A(A({},el),e),r=`v${s.version}`,i=ds(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>ds(o,!1,t)).join(" > ")+" > ":"",a=ds(s.target,!0,t),l=t.includeConstraints?Jp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function ds(s,e=!1,t=el){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=Gn(h),m=h==="href"||h==="src"?Qa(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Xa.has(h.name)||Ka.has(h.name)&&qa(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Xs(d)}"`);if(t.includeText&&i.text&&!Yp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Xs(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return Gn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=yp(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Gp);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Jp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Xs(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Xs(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Xp(s,e,t){const r=Hp(s,e);return r?Zp(r,t):null}const dt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Kp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},dt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:dt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:dt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:dt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:dt.fallbackToBody}}function Yn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:$i(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=Xp(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Zn(s){return"__ln"in s}class qp{constructor(){y(this,"length",0),y(this,"head",null),y(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){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Zn(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Zn(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Jn=(s,e)=>`${s}@${e}`,Qp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function em(s){const e=s.toLowerCase();return Qp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class tm{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"excludeAttribute"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"selectorOptions",null),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new qp,i=o=>{let u=o,c=bt;for(;c===bt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=T.parentNode(o);if(!u||!Za(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=pt(u)?this.mirror.getId(Ya(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ze(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{ja(m,this.mirror)&&this.iframeManager.addIframe(m),Ga(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Js(o)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)Xn(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(T.parentNode(o))||n(o);for(const o of this.addedSet)!Kn(this.droppedSet,o)&&!Xn(this.removesSubTreeCache,o,this.mirror)||Kn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(T.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(T.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=T.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=T.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=T.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Yn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Yn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(em)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.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))}),y(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));const r=Array.from(T.childNodes(e),i=>T.textContent(i)||"").join("");t.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!us(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=T.textContent(e.target);!oe(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:So(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,$i(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Qs(t),c=ys(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${ce()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(ys(r,this.excludeAttribute)){console.debug(`[${ce()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=gr(t);i=mr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(oe(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!wo(t.tagName,r))if(d.attributes[r]=bo(this.doc,Fe(t.tagName),Fe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${ce()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),w=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||w!==m.style.getPropertyPriority(g)?w===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,w]:d._unchangedStyles[g]=[f,w]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(oe(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=pt(e.target)?this.mirror.getId(T.host(e.target)):this.mirror.getId(e.target);oe(e.target,this.blockClass,this.blockSelector,!1)||us(t,this.mirror,this.slimDOMOptions)||!np(t,this.mirror)||(this.addedSet.has(t)?(Ks(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Va(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Jn(r,i)]?Ks(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:pt(e.target)&&mt(e.target)?!0:void 0}),rm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(us(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[Jn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);oe(e,this.blockClass,this.blockSelector,!1)||(T.childNodes(e).forEach(r=>this.genAdds(r)),Js(e)&&T.childNodes(T.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function Ks(s,e){s.delete(e),T.childNodes(e).forEach(t=>Ks(s,t))}function rm(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),T.childNodes(r).forEach(i=>t.push(i)))}}function Xn(s,e,t){return s.size===0?!1:sm(s,e)}function sm(s,e,t){const r=T.parentNode(e);return r?s.has(r):!1}function Kn(s,e){return s.size===0?!1:tl(s,e)}function tl(s,e){const t=T.parentNode(e);return t?s.has(t)?!0:tl(s,t):!1}let gt;function im(s){gt=s}function nm(){gt=void 0}const N=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&&gt(r)===!0)return;throw r}}:s,ge=[];function st(s){try{if("composedPath"in s){const 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 rl(s,e){const t=new tm;ge.push(t),t.init(s);const r=new(Ei())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function om({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=$t(N(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=N($t(N(h=>{const d=st(h),{clientX:p,clientY:m}=Zs(h)?h.changedTouches[0]:h;l||(l=ce()),a.push({x:p,y:m,id:r.getId(d),timeOffset:ce()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return N(()=>{c.forEach(h=>h())})}function am({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=st(h);if(oe(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ie.Mouse;break;case"touch":p=Ie.Touch;break;case"pen":p=Ie.Pen;break}p===Ie.Touch?le[c]===le.MouseDown?m="TouchStart":le[c]===le.MouseUp&&(m="TouchEnd"):Ie.Pen}else Zs(h)&&(p=Ie.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ie.Touch||m.startsWith("Mouse")&&p===Ie.Mouse)&&(p=null)):le[c]===le.Click&&(p=o,o=null);const g=Zs(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:w,clientY:v}=g;N(s)(A({type:le[m],id:f,x:w,y:v},p!==null&&{pointerType:p}))};return Object.keys(le).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=Fe(c);const d=u(c);if(window.PointerEvent)switch(le[c]){case le.MouseDown:case le.MouseUp:h=h.replace("mouse","pointer");break;case le.TouchStart:case le.TouchEnd:return}l.push(te(h,d,e))}),N(()=>{l.forEach(c=>c())})}function sl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=N($t(N(l=>{const o=st(l);if(!o||oe(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=Wa(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return te("scroll",a,e)}function lm({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=N($t(N(()=>{const n=Ha(),a=Ua();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return te("resize",i,e)}function cm({navigationCb:s,doc:e,sampling:t}){var c;if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=N(h=>{const d=r.location.href;d!==i&&(s({href:d,oldHref:i,navigationType:h}),i=d)}),l=Re(r.history,"pushState",function(h){return function(...d){const p=h.apply(this,d);return a("pushState"),p}});n.push(l);const o=Re(r.history,"replaceState",function(h){return function(...d){const p=h.apply(this,d);return a("replaceState"),p}});if(n.push(o),n.push(te("popstate",()=>a("popstate"),r)),n.push(te("hashchange",()=>a("hashchange"),r)),(typeof t.navigation=="object"&&(c=t.navigation.useNavigationAPI)!=null?c:!0)&&"navigation"in r)try{const h=r.navigation,d=p=>{var m;const g=p;if(g.navigationType==="push"||g.navigationType==="replace"){const f=(m=g.destination)==null?void 0:m.url;f&&f!==i&&(s({href:f,oldHref:i,navigationType:"navigate"}),i=f)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return N(()=>{n.forEach(h=>h())})}const fs=["INPUT","TEXTAREA","SELECT"],qn=new WeakMap,um=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Qn=new WeakMap;function hm({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(C){let b=st(C);const S=C.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=T.parentElement(b)),!b||!x||fs.indexOf(x)<0||oe(b,r,i,!0)||b.classList.contains(n)||a&&b.matches(a))return;let $=b.value,R=!1;const P=gr(b)||"";P==="radio"||P==="checkbox"?R=b.checked:(l[x.toLowerCase()]||l[P])&&($=mr({element:b,maskInputOptions:l,tagName:x,type:P,value:$,maskInputFn:o})),d(b,c?{text:$,isChecked:R,userTriggered:S}:{text:$,isChecked:R});const F=b.name;P==="radio"&&F&&R&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(D=>{if(D!==b){const V=D.value;d(D,c?{text:V,isChecked:!R,userTriggered:!1}:{text:V,isChecked:!R})}})}function d(C,b){const S=qn.get(C),x=C,$=x.hasAttribute("placeholder"),R=x.value==="",P=typeof x.defaultValue=="string"?x.defaultValue==="":!0,F=!b.userTriggered,D=!S||S.text==="",V=$&&R&&P&&D&&F&&!b.isChecked&&x.type!=="hidden"&&fs.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!S&&x.hasAttribute("placeholder"),K=!b.userTriggered&&x.value===x.defaultValue&&!S&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&fs.includes(x.tagName),I=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!S,_=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!S;if(V||J||K||I||_){console.debug(`[${ce()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:T.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:V,isRenderDrivenTextInput:J,isValueFromDefault:K,isPhantomCheckbox:I,isPhantomRadio:_});return}if(!S||S.text!==b.text||S.isChecked!==b.isChecked){qn.set(C,b);const re=t.getId(C);N(s)(ae(A({},b),{id:re}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(C=>te(C,N(h),e)),g=C=>{const b=st(C);if(!b||!b.tagName)return;if(u.input==="all"){h(C);return}const S=b.tagName,x=C.key,$=um.includes(x),R=S==="TEXTAREA",P=e.activeElement===b,F=b.value,D=Qn.get(b);if(Qn.set(b,F),!P){h(C);return}if($){if(!R){h(C);return}let V=D!=null?D:"",J=0;const K=2,I=()=>{const _=b.value,re=e.activeElement===b,X=_!==V;if(!re){h(C);return}if(X)J=0,V=_;else if(J++,J>=K){h(C);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(te("keydown",N(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(C=>C())};const w=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),v=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&m.push(...v.map(C=>Fr(C[0],C[1],{set(){N(h)({target:this,isTrusted:!1})}},!1,f))),N(()=>{m.forEach(C=>C())})}function $r(s){const e=[];function t(r,i){if(or("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||or("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||or("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||or("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function Te(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function dm({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:N((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=Te(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};ar("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(ar("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),ar("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),ar("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:N((d,p,m)=>{const[g,f]=m,{id:w,styleId:v}=Te(p.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||v&&v!==-1)&&s({id:w,styleId:v,adds:[{rule:g,index:[...$r(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:N((d,p,m)=>{const[g]=m,{id:f,styleId:w}=Te(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||w&&w!==-1)&&s({id:f,styleId:w,removes:[{index:[...$r(p),g]}]}),d.apply(p,m)})})}),N(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function il({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(T.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function fm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:N((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:$r(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:N((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:$r(o.parentRule)}),l.apply(o,u)})}),N(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function pm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=N(o=>$t(N(u=>{const c=st(u);if(!c||oe(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[te("play",a(Ge.Play),n),te("pause",a(Ge.Pause),n),te("seeked",a(Ge.Seeked),n),te("volumechange",a(Ge.VolumeChange),n),te("ratechange",a(Ge.RateChange),n)];return N(()=>{l.forEach(o=>o())})}function mm({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=Re(e.fonts,"add",function(l){return function(o){return setTimeout(N(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),N(()=>{r.forEach(l=>l())})}function gm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=N(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;oe(p,r,i,!0)||oe(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),te("selectionchange",l)}function ym({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Re(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function bm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function wm(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};bm(s,e);let r;s.recordDOM&&(r=rl(s,s.doc));const i=om(s),n=am(s),a=sl(s),l=lm(s,{win:t}),o=cm(s),u=hm(s),c=pm(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=dm(s,{win:t}),d=il(s,s.doc),p=fm(s,{win:t}),s.collectFonts&&(m=mm(s)));const g=gm(s),f=ym(s),w=[];for(const v of s.plugins)w.push(v.observer(v.callback,t,v.options));return N(()=>{var v;ge.forEach(C=>C.reset()),(v=s.visibilityManager)==null||v.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),w.forEach(C=>C())})}function or(s){return typeof window[s]!="undefined"}function ar(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class eo{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,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}}class Sm{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new eo(yo)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new eo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.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){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case z.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:z.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case z.Meta:case z.Load:case z.DomContentLoaded:return!1;case z.Plugin:return t;case z.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case z.IncrementalSnapshot:switch(t.data.source){case k.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),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 k.Drag:case k.TouchMove:case k.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(t.data,e,["id"]),t;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case k.Font:return t;case k.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case k.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Ja.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class vm{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(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(!mt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=rl(ae(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sl(ae(A({},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(T.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){const r=this;this.restoreHandlers.push(Re(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=T.shadowRoot(this);return l&&Za(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var lr=0;lr<Je.length;lr++)Cm[Je.charCodeAt(lr)]=lr;var xm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Je[e[t]>>2],i+=Je[(e[t]&3)<<4|e[t+1]>>4],i+=Je[(e[t+1]&15)<<2|e[t+2]>>6],i+=Je[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const to=new Map;function Am(s,e){let t=to.get(s);return t||(t=new Map,to.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const nl=(s,e,t)=>{if(!s||!(al(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Am(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function pr(s,e,t){if(s instanceof Array)return s.map(r=>pr(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){const r=s.constructor.name,i=xm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[pr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[pr(s.data,e,t),s.width,s.height]};if(al(s,e)||typeof s=="object"){const r=s.constructor.name,i=nl(s,e,t);return{rr_type:r,index:i}}}}return s}const ol=(s,e,t)=>s.map(r=>pr(r,e,t)),al=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Im(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Re(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return oe(this.canvas,t,r,!0)||setTimeout(()=>{const c=ol(u,e,this);s(this.canvas,{type:rt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=Fr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:rt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function Em(s){return s==="experimental-webgl"?"webgl":s}function ro(s,e,t,r){const i=[];try{const n=Re(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!oe(this,e,t,!0)){const u=Em(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function so(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=Re(s,o,function(c){return function(...h){const d=c.apply(this,h);if(nl(d,n,this),"tagName"in this.canvas&&!oe(this.canvas,r,i,!0)){const p=ol(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=Fr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function $m(s,e,t,r){const i=[];return i.push(...so(e.WebGLRenderingContext.prototype,rt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...so(e.WebGL2RenderingContext.prototype,rt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const ll="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Rm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),io=typeof self!="undefined"&&self.Blob&&new Blob([Rm(ll)],{type:"text/javascript;charset=utf-8"});function Mm(s){let e;try{if(e=io&&(self.URL||self.webkitURL).createObjectURL(io),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+ll,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Om{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=ro(t,r,i,!0),l=new Map,o=new Mm;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:w,width:v,height:C}=m.data;this.mutationCb({id:g,type:rt["2D"],commands:[{property:"clearRect",args:[0,0,v,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{oe(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const w=this.mirror.getId(g);if(l.get(w)||g.width===0||g.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const v=await createImageBitmap(g);o.postMessage({id:w,bitmap:v,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=ro(e,t,r,!1),n=Im(this.processMutation.bind(this),e,t,r),a=$m(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return Ue(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function no(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=Tm((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=Nm(r),u=km(o,a);for(const f of s){const w=f.getBoundingClientRect();let v=Pm(),C=0;w.width>0&&w.height>0&&(v=Dm(w,u),C=Lm(w,v),C=Math.round(C*100)/100);const b=_m(f),S=(m=e.get(f))!=null?m:null,x=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,$=C,R=(S==null?void 0:S.isStyleVisible)&&x>i,P=b&&$>i;!S||R!==P||R!==P&&Math.abs($-x)>n?l.set(f,{target:f,isVisible:P,isStyleVisible:b,intersectionRatio:$,intersectionRect:v,oldValue:S}):l.set(f,S)}return l}function Tm(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function Nm(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function km(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Dm(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Lm(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Pm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function _m(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class zm{constructor(e){var u,c,h,d,p,m;y(this,"frozen",!1),y(this,"locked",!1),y(this,"pending",new Map),y(this,"mirror"),y(this,"mutationCb"),y(this,"rafId",null),y(this,"intervalId",null),y(this,"rafThrottle"),y(this,"lastFlushTime",0),y(this,"elements",new Set),y(this,"previousState",new Map),y(this,"root",null),y(this,"threshold"),y(this,"sensitivity"),y(this,"rootMargin"),y(this,"hasInitialized",!1),y(this,"mode","none"),y(this,"debounce",50),y(this,"throttle",100),y(this,"buffer",new Map),y(this,"debounceTimer",null),y(this,"lastThrottleTime",0),y(this,"disabled",!1),y(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&(this.observe(w),w.querySelectorAll("*").forEach(v=>this.observe(v)))}),f.removedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&this.unobserve(w)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=no(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=no(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Fm=150,Bm=5e3,Wm=100;class Hm{constructor(e){var n,a,l;y(this,"frozen",!1),y(this,"locked",!1),y(this,"disabled",!1),y(this,"settleTimeout"),y(this,"maxWait"),y(this,"debounceMs"),y(this,"settlingObserver",null),y(this,"debounceTimer",null),y(this,"settleCheckTimer",null),y(this,"maxWaitTimer",null),y(this,"lastMutationTime",0),y(this,"pendingNavigation",null),y(this,"doc"),y(this,"onSnapshot");const{doc:t,config:r,onSnapshot:i}=e;this.doc=t,this.onSnapshot=N(i),this.settleTimeout=(n=r.settleTimeout)!=null?n:Fm,this.maxWait=(a=r.maxWait)!=null?a:Bm,this.debounceMs=(l=r.debounce)!=null?l:Wm}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=Ei();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class Um{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new ap),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;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:lo(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Vm{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const jm="3.6.0-alpha.1";let G,Oe,ps,Mt=!1;const Rr=[];let ft;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Wi=s.contentWindow)==null?void 0:Wi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const pe=Hl();function ue(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,checkoutDebounce:n,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,excludeAttribute:c,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:f,maskInputFn:w,maskTextFn:v,hooks:C,packFn:b,sampling:S={},dataURLOptions:x={},mousemoveWait:$,recordDOM:R=!0,recordCanvas:P=!1,recordCrossOriginIframes:F=!1,recordAfter:D=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:V=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:K=!1,inlineImages:I=!1,plugins:_,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:X=new Set([]),selector:de,errorHandler:it}=s;im(it);const me=F?window.parent===window:!0;let nt=!1;if(!me)try{window.parent.document&&(nt=!1)}catch(E){nt=!0}if(me&&!e)throw new Error("emit function is required");if(!me&&!nt)return()=>{};$!==void 0&&S.mousemove===void 0&&(S.mousemove=$),pe.reset();const Br=c===void 0?/.^/:c,Wr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:g!==void 0?g:{password:!0},Hr=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},Oi=Kp(de);op();let Ti,Ur=0,Dt=0,Ni=0,Me=!1,he=null,He=null,ki=0;const cl=(S.scroll||100)*2;let Di=0;const ul=500;let Vr=!1;const Li=E=>{for(const Q of _||[])Q.eventProcessor&&(E=Q.eventProcessor(E));return b&&!nt&&(E=b(E)),E},Lt=()=>{he=null,Me=!1,He=null,ie==null||ie.cancelPending(),Oe(!0),ge.forEach(E=>{E.resetBuffers(),E.unsetFrozen()}),se&&se.unsetFrozen(),ie&&ie.unsetFrozen()};G=(E,Q)=>{var B;const U=E;if(U.timestamp=ce(),U.checkoutId=Ni,(B=ge[0])!=null&&B.isFrozen()&&!Me&&U.type!==z.FullSnapshot&&!(U.type===z.IncrementalSnapshot&&U.data.source===k.Mutation)&&(ge.forEach(ne=>ne.unfreeze()),se==null||se.unfreeze(),ie==null||ie.unfreeze()),me)e==null||e(Li(U),Q);else if(nt){const ne={type:"rrweb",event:Li(U),isCheckout:Q};window.parent.postMessage(ne,"*")}if(U.type===z.FullSnapshot)Ti=U,Ur=0,Dt=0;else if(U.type===z.IncrementalSnapshot){if(U.data.source===k.Mutation&&U.data.isAttachIframe)return;if(U.data.source!==k.Visibility){Ur++;const ne=r&&Ur>=r,L=t&&U.timestamp-Ti.timestamp>t;if(ne||L)if(n){Me||(Me=!0,He=ce(),ge.forEach(Zr=>Zr.freeze()),se==null||se.freeze()),he&&clearTimeout(he);const ze=ce()-He,Yr=n*3;ze>=Yr?Lt():he=setTimeout(()=>Lt(),n)}else Oe(!0)}}};const Pt=E=>{var ne,L;var Q,B;((ne=(Q=E.adds)==null?void 0:Q.length)!=null?ne:0)+((L=(B=E.removes)==null?void 0:B.length)!=null?L:0)>10&&(Di=ce(),Vr=!1),G({type:z.IncrementalSnapshot,data:A({source:k.Mutation},E)})},hl=E=>{G({type:z.IncrementalSnapshot,data:A({source:k.Visibility},E)})},Pi=E=>{ki=ce(),G({type:z.IncrementalSnapshot,data:A({source:k.Scroll},E)})},_i=E=>G({type:z.IncrementalSnapshot,data:A({source:k.CanvasMutation},E)}),dl=E=>G({type:z.IncrementalSnapshot,data:A({source:k.AdoptedStyleSheet},E)}),Pe=new Um({mutationCb:Pt,adoptedStyleSheetCb:dl}),_e=new Sm({mirror:pe,mutationCb:Pt,stylesheetManager:Pe,recordCrossOriginIframes:F,wrappedEmit:G});for(const E of _||[])E.getMirror&&E.getMirror({nodeMirror:pe,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const jr=new Vm;ps=new Om({recordCanvas:P,mutationCb:_i,win:window,blockClass:a,blockSelector:l,mirror:pe,sampling:S.canvas,dataURLOptions:x});const _t=new vm({mutationCb:Pt,scrollCb:Pi,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskInputOptions:Wr,dataURLOptions:x,maskTextFn:v,maskInputFn:w,recordCanvas:P,inlineImages:I,sampling:S,slimDOMOptions:Hr,iframeManager:_e,stylesheetManager:Pe,canvasManager:ps,keepIframeSrcFn:re,processedNodeManager:jr,selectorOptions:Oi},mirror:pe}),fl=R&&(i!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let se;if(fl){const E=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},Q=E.recordVisibility===!0;se=new zm({doc:document,mirror:pe,sampling:E,mutationCb:Q?hl:()=>{},notifyActivity:i!=null?B=>{const U=ce(),ne=U-ki<cl,L=U-Di<ul;if(!(ne&&!L)&&!(L&&Vr)&&(Dt+=B,Dt>=i))if(Dt=0,Vr=!0,n){Me||(Me=!0,He=ce(),ge.forEach(Zr=>Zr.freeze()),se==null||se.freeze()),he&&clearTimeout(he);const ze=ce()-He,Yr=n*3;ze>=Yr?Lt():he=setTimeout(()=>Lt(),n)}else Oe(!0)}:void 0})}Oe=(E=!1)=>{if(!R)return;Ni++,G({type:z.Meta,data:{href:window.location.href,width:Ua(),height:Ha()}},E),Pe.reset(),_t.init(),ge.forEach(B=>B.lock()),se==null||se.lock(),ie==null||ie.lock();const Q=au(document,{mirror:pe,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskAllInputs:Wr,maskTextFn:v,maskInputFn:w,slimDOM:Hr,dataURLOptions:x,recordCanvas:P,inlineImages:I,onSerialize:B=>{ja(B,pe)&&_e.addIframe(B),Ga(B,pe)&&Pe.trackLinkElement(B),Js(B)&&_t.addShadowRoot(T.shadowRoot(B),document)},onIframeLoad:(B,U)=>{_e.attachIframe(B,U),_t.observeAttachShadow(B)},onStylesheetLoad:(B,U)=>{Pe.attachLinkElement(B,U)},keepIframeSrcFn:re,selector:de});if(!Q)return console.warn("Failed to snapshot the document");G({type:z.FullSnapshot,data:{node:Q,initialOffset:Wa(window)}},E),ge.forEach(B=>B.unlock()),se==null||se.unlock(),ie==null||ie.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,pe.getId(document))},ft=()=>{for(const E of Rr)G(E);Rr.length=0};let ie;const Gr=S.navigation;if(Gr!==!1){const E=typeof Gr=="object"?Gr:{};ie=new Hm({doc:document,config:E,onSnapshot:Q=>{Me&&(he&&(clearTimeout(he),he=null),Me=!1,He=null,ge.forEach(B=>{B.resetBuffers(),B.unsetFrozen()}),se==null||se.unsetFrozen()),Oe(Q)}})}try{const E=[],Q=U=>{var ne;return N(wm)({mutationCb:Pt,mousemoveCb:(L,ze)=>G({type:z.IncrementalSnapshot,data:{source:ze,positions:L}}),mouseInteractionCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.MouseInteraction},L)}),scrollCb:Pi,viewportResizeCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.ViewportResize},L)}),navigationCb:L=>{ie?ie.handleNavigation(L):Oe(!0)},inputCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.Input},L)}),mediaInteractionCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.MediaInteraction},L)}),styleSheetRuleCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.StyleSheetRule},L)}),styleDeclarationCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.StyleDeclaration},L)}),canvasMutationCb:_i,visibilityManager:se,fontCb:L=>G({type:z.IncrementalSnapshot,data:A({source:k.Font},L)}),selectionCb:L=>{G({type:z.IncrementalSnapshot,data:A({source:k.Selection},L)})},customElementCb:L=>{G({type:z.IncrementalSnapshot,data:A({source:k.CustomElement},L)})},blockClass:a,ignoreClass:o,ignoreSelector:u,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,maskInputOptions:Wr,inlineStylesheet:p,sampling:S,recordDOM:R,recordCanvas:P,inlineImages:I,userTriggeredOnInput:J,collectFonts:K,doc:U,maskInputFn:w,maskTextFn:v,keepIframeSrcFn:re,blockSelector:l,slimDOMOptions:Hr,dataURLOptions:x,selectorOptions:Oi,mirror:pe,iframeManager:_e,stylesheetManager:Pe,shadowDomManager:_t,processedNodeManager:jr,canvasManager:ps,ignoreCSSAttributes:X,plugins:((ne=_==null?void 0:_.filter(L=>L.observer))==null?void 0:ne.map(L=>({observer:L.observer,options:L.options,callback:ze=>G({type:z.Plugin,data:{plugin:L.name,payload:ze}})})))||[]},C)};_e.addLoadListener(U=>{try{E.push(Q(U.contentDocument))}catch(ne){console.warn(ne)}});const B=()=>{V==="before"&&ft(),Oe(),E.push(Q(document)),Mt=!0,V==="after"&&ft()};return document.readyState==="interactive"||document.readyState==="complete"?B():(E.push(te("DOMContentLoaded",()=>{G({type:z.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&B()})),E.push(te("load",()=>{G({type:z.Load,data:{}}),D==="load"&&B()},window))),()=>{he&&(clearTimeout(he),he=null),ft(),E.forEach(U=>U()),ie==null||ie.destroy(),jr.destroy(),Mt=!1,nm()}}catch(E){console.warn(E)}}ue.getVersion=()=>jm;ue.isRecording=()=>Mt;ue.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Rr.length} events`),ft()};ue.addCustomEvent=(s,e)=>{const t={type:z.Custom,data:{tag:s,payload:e}};if(!Mt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Rr.push(t);return}G(t)};ue.freezePage=()=>{ge.forEach(s=>s.freeze())};ue.takeFullSnapshot=s=>{if(!Mt)throw new Error("please take full snapshot after start recording");Oe(s)};ue.mirror=pe;var oo;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(oo||(oo={}));const{getVersion:Tg}=ue,{isRecording:Ng}=ue,{flushCustomEventQueue:kg}=ue,{addCustomEvent:Dg}=ue,{freezePage:Lg}=ue,{takeFullSnapshot:Pg}=ue;exports.record=ue;
79
79
  ;if (typeof module.exports == "object" && typeof exports == "object") {
80
80
  var __cp = (to, from, except, desc) => {
81
81
  if ((from && typeof from === "object") || typeof from === "function") {