@appsurify-testmap/rrweb 3.1.1-alpha.1 → 3.1.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/image-bitmap-data-url-worker-IJpC7g_b.js.map +1 -1
- package/dist/rrweb.cjs +6085 -3847
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +5 -3
- package/dist/rrweb.d.ts +5 -3
- package/dist/rrweb.js +6085 -3847
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +6039 -3759
- package/dist/rrweb.umd.cjs.map +4 -4
- package/dist/rrweb.umd.min.cjs +54 -44
- package/dist/rrweb.umd.min.cjs.map +4 -4
- package/package.json +6 -5
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -1,72 +1,82 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
if ("object" == typeof exports && "object" == typeof module) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}(this, () => {
|
|
12
|
-
var exports = {};
|
|
13
|
-
|
|
14
|
-
"use strict";var Ll=Object.defineProperty,Pl=Object.defineProperties;var Fl=Object.getOwnPropertyDescriptors;var Wt=Object.getOwnPropertySymbols;var nn=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable;var rn=(r,e,t)=>e in r?Ll(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,A=(r,e)=>{for(var t in e||(e={}))nn.call(e,t)&&rn(r,t,e[t]);if(Wt)for(var t of Wt(e))on.call(e,t)&&rn(r,t,e[t]);return r},ie=(r,e)=>Pl(r,Fl(e));var Ge=(r,e)=>{var t={};for(var s in r)nn.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&Wt)for(var s of Wt(r))e.indexOf(s)<0&&on.call(r,s)&&(t[s]=r[s]);return t};var Bl=Object.defineProperty,Ul=(r,e,t)=>e in r?Bl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,w=(r,e,t)=>Ul(r,typeof e!="symbol"?e+"":e,t),an;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var zl=Object.defineProperty,Vl=(r,e,t)=>e in r?zl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ln=(r,e,t)=>Vl(r,typeof e!="symbol"?e+"":e,t),D=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(D||{});const cn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},un={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ht={},Wl=()=>!!globalThis.Zone;function ai(r){if(Ht[r])return Ht[r];const e=globalThis[r],t=e.prototype,s=r in cn?cn[r]:void 0,i=!!(s&&s.every(a=>{var l,c;return!!((c=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&c.toString().includes("[native code]"))})),o=r in un?un[r]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Wl())return Ht[r]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const c=l[r].prototype;return document.body.removeChild(a),c?Ht[r]=c:t}catch(a){return t}}const ir={};function $e(r,e,t){var s;const i=`${r}.${String(t)}`;if(ir[i])return ir[i].call(e);const o=ai(r),n=(s=Object.getOwnPropertyDescriptor(o,t))==null?void 0:s.get;return n?(ir[i]=n,n.call(e)):e[t]}const nr={};function Ao(r,e,t){const s=`${r}.${String(t)}`;if(nr[s])return nr[s].bind(e);const o=ai(r)[t];return typeof o!="function"?e[t]:(nr[s]=o,o.bind(e))}function Hl(r){return $e("Node",r,"childNodes")}function Gl(r){return $e("Node",r,"parentNode")}function jl(r){return $e("Node",r,"parentElement")}function Yl(r){return $e("Node",r,"textContent")}function Zl(r,e){return Ao("Node",r,"contains")(e)}function Xl(r){return Ao("Node",r,"getRootNode")()}function Jl(r){return!r||!("host"in r)?null:$e("ShadowRoot",r,"host")}function Kl(r){return r.styleSheets}function ql(r){return!r||!("shadowRoot"in r)?null:$e("Element",r,"shadowRoot")}function Ql(r,e){return $e("Element",r,"querySelector")(e)}function ec(r,e){return $e("Element",r,"querySelectorAll")(e)}function tc(){return ai("MutationObserver").constructor}function sc(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function rc(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function ic(r){var f;var e,t;const s=(f=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=r.getBoundingClientRect(),o=s.innerWidth||s.document.documentElement.clientWidth||0,n=s.innerHeight||s.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=s.getComputedStyle)==null?void 0:t.call(s,r),u=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(u){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),y=m*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:u,ratio:h}}const ne={childNodes:Hl,parentNode:Gl,parentElement:jl,textContent:Yl,contains:Zl,getRootNode:Xl,host:Jl,styleSheets:Kl,shadowRoot:ql,querySelector:Ql,querySelectorAll:ec,mutationObserver:tc,patch:sc,describeNode:rc,getElementVisibility:ic};function wt(r){return r.nodeType===r.ELEMENT_NODE}function vt(r){const e=r&&"host"in r&&"mode"in r&&ne.host(r)||null;return!!(e&&"shadowRoot"in e&&ne.shadowRoot(e)===r)}function St(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function nc(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function oc(r){const{cssText:e}=r;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function Er(r){try{const e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&r.ownerNode.ownerDocument&&(t=r.ownerNode.ownerDocument.location.href);const s=Array.from(e,i=>Ro(i,t)).join("");return nc(s)}catch(e){return null}}function Ro(r,e){if(lc(r)){let t;try{t=Er(r.styleSheet)||oc(r)}catch(s){t=r.cssText}return r.styleSheet.href?xs(t,r.styleSheet.href):t}else{let t=r.cssText;return r.type===CSSRule.KEYFRAMES_RULE||(r.type,CSSRule.KEYFRAME_RULE),cc(r)&&r.selectorText.includes(":")&&(t=ac(t)),e?xs(t,e):t}}function ac(r){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function lc(r){return"styleSheet"in r}function cc(r){return"selectorText"in r}class li{constructor(){ln(this,"idNodeMap",new Map),ln(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function No(){return new li}function Cs({element:r,maskInputOptions:e,tagName:t,type:s,value:i,maskInputFn:o}){let n=i||"";const a=s&&ke(s);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,r):n="*".repeat(n.length)),n}function ke(r){return r.toLowerCase()}const hn="__rrweb_original__";function uc(r){const e=r.getContext("2d");if(!e)return!0;const t=50;for(let s=0;s<r.width;s+=t)for(let i=0;i<r.height;i+=t){const o=e.getImageData,n=hn in o?o[hn]:o;if(new Uint32Array(n.call(e,s,i,Math.min(t,r.width-s),Math.min(t,r.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function hc(r,e){return!r||!e||r.type!==e.type?!1:r.type===D.Document?r.compatMode===e.compatMode:r.type===D.DocumentType?r.name===e.name&&r.publicId===e.publicId&&r.systemId===e.systemId:r.type===D.Comment||r.type===D.Text||r.type===D.CDATA?r.textContent===e.textContent:r.type===D.Element?r.tagName===e.tagName&&JSON.stringify(r.attributes)===JSON.stringify(e.attributes)&&r.isSVG===e.isSVG&&r.needBlock===e.needBlock:!1}function Es(r){const e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?ke(e):null}function ci(r,e){var o;let t;try{t=new URL(r,e!=null?e:window.location.href)}catch(n){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(s);return(o=i==null?void 0:i[1])!=null?o:null}function fc(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}const dc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pc=/^(?:[a-z+]+:)?\/\//i,mc=/^www\..*/i,gc=/^(data:)([^,]*),(.*)/i;function xs(r,e){return(r||"").replace(dc,(t,s,i,o,n,a)=>{const l=i||n||a,c=s||o||"";if(!l)return t;if(pc.test(l)||mc.test(l))return`url(${c}${l}${c})`;if(gc.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${fc(e)+l}${c})`;const u=e.split("/"),h=l.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function Gt(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function yc(r,e,t=!1){const s=Array.from(e.childNodes),i=[];let o=0;if(s.length>1&&r&&typeof r=="string"){let n=Gt(r,t);const a=n.length/r.length;for(let l=1;l<s.length;l++)if(s[l].textContent&&typeof s[l].textContent=="string"){const c=Gt(s[l].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),m=n.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&s[l-1].textContent!=="")p=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return i.push(r),i;h=u+1}else h===c.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>u){const y=s[l-1].textContent;if(y&&typeof y=="string"){const d=Gt(y).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<r.length;){if(o+=1,o>50*s.length)return i.push(r),i;const d=Gt(r.substring(0,y),t);if(d.length===p){i.push(r.substring(0,y)),r=r.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(r),i}function bc(r,e){return yc(r,e).join("/* rr_split */")}function wc(r){var e;const t=ne.parentNode(r),s=t&&t;return!s||!ui(s)?!1:((e=r.textContent)==null?void 0:e.trim())!==""}function ui(r){return ne.getElementVisibility(r).isVisible}const vc=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Sc=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Cc=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],hi=new WeakSet,Ec=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(Ec.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();vc.includes(s)&&hi.add(this)}};const xc=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){xc.call(this,r,e,t)};function Mc(r){return r instanceof Element&&hi.has(r)}function Ic(r){if(r.nodeType===Node.ELEMENT_NODE){const e=r,t=e.tagName.toLowerCase();if(Sc.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Mc(e)||s||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function fn(){document.querySelectorAll("*").forEach(e=>{Cc.forEach(t=>{e.hasAttribute(t)&&hi.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?fn():document.addEventListener("DOMContentLoaded",fn)}catch(r){}const jt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},we={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.1,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},Ac={MIN_CONFIDENCE_FOR_SKIP:.7},dn=["form","main","nav","section","article","footer","header"],pn=["form","navigation","main","region","contentinfo","complementary","banner","search"],Rc=["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"],Oe={"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"]),Nc={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.1,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function xt(r){return!!(/^[a-z]+-\d+$/i.test(r)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(r)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(r)||/^\d+$/.test(r)||/^:[a-z0-9]+:$/i.test(r)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r)&&(/\d/.test(r)||/[A-Z]/.test(r))||/^radix-/.test(r)||/^mui-\d+$/.test(r))}const To=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Do(r){return r.trim().split(/\s+/).some(e=>xt(e))}class Oc{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}findAnchor(e){if(this.cache){const n=this.cache.getAnchor(e);if(n!==void 0)return n}let t=e.parentElement,s=0,i=null;for(;t&&s<this.maxDepth;){if(t.tagName.toLowerCase()==="body")return i||{element:t,score:we.DEGRADED_SCORE,tier:"C",depth:s};const n=this.scoreAnchor(t);if(n>0){const a=this.applyDepthPenalty(n,s),l=this.getTier(t),c={element:t,score:a,tier:l,depth:s};if(l==="A")return c;(!i||a>i.score)&&(i=c)}t=t.parentElement,s++}const o=i;return this.cache&&this.cache.setAnchor(e,o),o}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();dn.includes(s)&&(t+=we.SEMANTIC_TAG);const i=e.getAttribute("role");i&&pn.includes(i)&&(t+=we.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=we.ARIA_LABEL);const o=e.id;return o&&!xt(o)&&(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 s=(t-we.DEPTH_PENALTY_THRESHOLD)*we.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(dn.includes(t))return"A";const s=e.getAttribute("role");return s&&pn.includes(s)?"B":"C"}}const Tc=[/^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,}/],Dc=[/^\[/,/^(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)?:/,/\/([\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 fi(r){return Tc.some(e=>e.test(r))}function di(r){return r.length<=2||/^\d/.test(r)?!0:Dc.some(e=>e.test(r))}function kc(r){return!fi(r)&&!di(r)}function $c(r){return r.filter(e=>kc(e))}function _c(r){const e=[],t=[];for(const s of r)di(s)||fi(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function mn(r){return di(r)||fi(r)}const gn=r=>r.replace(/([#:.[\]@])/g,"\\$1");class Lc{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const i=[];let o=t.parentElement;for(;o&&o!==e&&i.length<this.maxDepth;)i.unshift(o),o=o.parentElement;const n=i.length>=this.maxDepth&&o!==e;let a=this.filterNoise(i);return a=this.ensureUniqueness(i,a,e,t,s),{path:a.map(l=>{const c=l.parentElement;let u;if(c){const h=Array.from(c.children).indexOf(l);h!==-1&&(u=h+1)}return{tag:l.tagName.toLowerCase(),semantics:s.extract(l),score:s.scoreElement(l),nthChild:u}}),degraded:n,degradationReason:n?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,i,o){const n=this.buildTestSelector(s,t,i);try{const a=i.ownerDocument;if(!a)return t;let l;if(this.cache){const u=this.cache.getSelectorResults(n);u!==void 0?l=u:(l=Array.from(a.querySelectorAll(n)),this.cache.setSelectorResults(n,l))}else l=a.querySelectorAll(n);if(l.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(o.scoreElement(u)<Ac.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),f=this.buildTestSelector(s,h,i);try{let m;if(this.cache){const p=this.cache.getSelectorResults(f);p!==void 0?m=p:(m=Array.from(a.querySelectorAll(f)),this.cache.setSelectorResults(f,m))}else m=a.querySelectorAll(f);if(m.length===1)return h;m.length<l.length&&(t=h)}catch(m){}}return t}catch(a){return t}}insertNodeInOrder(e,t,s){const i=s.indexOf(t),o=[...e];let n=0;for(let a=0;a<o.length&&!(s.indexOf(o[a])>i);a++)n=a+1;return o.splice(n,0,t),o}buildTestSelector(e,t,s){const i=[];i.push(this.elementToSelector(e));for(const o of t)i.push(this.elementToSelector(o));return i.push(this.elementToSelector(s)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!xt(e.id)&&(t+=`#${gn(e.id)}`);for(const s of Array.from(e.classList))mn(s)||(t+=`.${gn(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Rc.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!mn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!xt(t))}}function Pc(r){return r?r.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Fc={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Bc(r){return r?[/\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(r)):!1}function Uc(r,e){if(!r)return r;const t=r.startsWith("http://")||r.startsWith("https://"),[s,i]=r.split("#"),[o,n]=s.split("?");let a=o;return t&&e.preserveQueryForAbsolute&&n&&(a+=`?${n}`),i&&(e.removeDynamicHashes&&Bc(i)||(a+=`#${i}`)),a}function ko(r,e,t={}){if(!e)return e;const s=A(A({},Fc),t);return r==="href"||r==="src"?Uc(e,s):e}const zc=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Vc=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Wc=["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"],Hc=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Gc=["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"],jc=["id","name","type","placeholder","title","for","alt","href"],Yc=["disabled","checked","selected","hidden","readonly","required","value"],Zc=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Xc(r,e){return zc.includes(r)?!0:Vc.includes(r)||Wc.includes(r)||Hc.some(t=>r.startsWith(t))?!1:Gc.includes(r)||r.startsWith("data-")&&r.endsWith("-id")?!0:r==="id"?!Zc.some(t=>t.test(e)):jc.includes(r)?!0:Yc.includes(r)?!1:!!r.startsWith("data-")}class Jc{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const n=this.cache.getSemantics(e);if(n!==void 0)return n}const t={},s=e.id;if(s&&!xt(s)&&(t.id=s),e.classList.length>0){const n=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=n;else{const{semantic:a}=_c(n);a.length>0&&(t.classes=a)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const o=e.getAttribute("role");if(o&&(t.role=o),this.shouldExtractText(e)){const n=this.extractText(e);n&&(t.text=n)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.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 Oe[e]!==void 0?Oe[e]:e.startsWith("data-")?Oe["data-*"]:e.startsWith("aria-")?Oe["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 s of Array.from(e.attributes)){const i=s.name;if(this.shouldIgnoreAttribute(i)||!Xc(i,s.value)||To.has(i)&&Do(s.value)||this.getAttributePriority(i)===0)continue;const o=i==="href"||i==="src"?ko(i,s.value):s.value;!o||o.trim()===""||this.isDynamicValue(o)||(t[i]=o)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=Pc(t);if(!s)return null;const i=100,o=t.length>i?t.slice(0,i)+"...":t,n=s.length>i?s.slice(0,i)+"...":s;return{raw:o,normalized:n}}getDirectTextContent(e){var s;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const o=i.textContent.trim();o&&t.push(o)}return t.length>0?t.join(" "):(s=e.textContent)!=null?s: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 Kc{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),i={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const a=e.getAttribute("d");a&&(i.dHash=this.computePathHash(a))}else["circle","rect","ellipse","line"].includes(s)&&(i.geomHash=this.computeGeomHash(e,s));const o=e.getAttribute("role");o&&(i.role=o);const n=e.querySelector("title");return n!=null&&n.textContent&&(i.titleText=n.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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,o,n,a,l,c,u,h,f;const s=[];switch(t){case"circle":s.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const m=parseFloat((o=e.getAttribute("width"))!=null?o:"0"),p=parseFloat((n=e.getAttribute("height"))!=null?n:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((a=e.getAttribute("rx"))!=null?a:"0"),p=parseFloat((l=e.getAttribute("ry"))!=null?l:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),d=parseFloat((f=e.getAttribute("y2"))!=null?f:"0"),g=Math.atan2(d-p,y-m);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function qc(r,e=0){const t=r.anchor.score,s=r.path.length>0?r.path.reduce((a,l)=>a+l.score,0)/r.path.length:.5,i=r.target.score,o=t*jt.ANCHOR+s*jt.PATH+i*jt.TARGET+e*jt.UNIQUENESS,n=r.anchor.degraded?.2:0;return Math.max(0,Math.min(1,o-n))}class Qc{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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 eu{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Qc((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:(s=e.maxSelectorCacheSize)!=null?s: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 ie(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,s=e+t;return s>0?e/s:0}}function tu(r){return new eu(r)}let or=null;function su(){return or||(or=tu()),or}function ru(r,e={}){var H,Q,ee,R;var t;if(!r||!r.ownerDocument||!r.isConnected)return null;const s=A(A({},Nc),e),i=(H=s.cache)!=null?H:su(),o=i.getEID(r);if(o!==void 0)return o;const n=new Oc(s,i),a=new Lc(s,i),l=new Jc(s,i),c=new Kc,u=n.findAnchor(r);if(!u&&!s.fallbackToBody)return null;const h=(ee=(Q=u==null?void 0:u.element)!=null?Q:(t=r.ownerDocument)==null?void 0:t.body)!=null?ee:null;if(!h)return null;const f=!u||u.tier==="C",m=h.tagName.toLowerCase(),p=h.parentElement;let y;if(p&&m!=="body"&&m!=="html"){const te=Array.from(p.children).indexOf(h);te!==-1&&(y=te+1)}const d=l.extract(h),g={tag:h.tagName.toLowerCase(),semantics:d,score:(R=u==null?void 0:u.score)!=null?R:we.DEGRADED_SCORE,degraded:f,nthChild:y},S=a.buildPath(h,r,l),v=l.extract(r);s.enableSvgFingerprint&&iu(r)&&(v.svg=c.fingerprint(r));const b=r.parentElement;let C;if(b){const te=Array.from(b.children).indexOf(r);te!==-1&&(C=te+1)}const E={tag:r.tagName.toLowerCase(),semantics:v,score:l.scoreElement(r),nthChild:C},N=[],O={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},U=g.degraded||S.degraded,L=nu(g.degraded,S),P={version:"1.0",anchor:g,path:S.path,target:E,constraints:N,fallback:O,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:U,degradationReason:L}};return P.meta.confidence=qc(P),P.meta.confidence<s.confidenceThreshold?null:(i.setEID(r,P),P)}function iu(r){return r.namespaceURI==="http://www.w3.org/2000/svg"||r.tagName.toLowerCase()==="svg"||r instanceof SVGElement}function nu(r,e){if(r&&e.degraded)return"anchor-and-path-degraded";if(r)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}const $o={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function yn(r){return r==="id"?101:Oe[r]!==void 0?Oe[r]:r.startsWith("data-")?Oe["data-*"]:r.startsWith("aria-")?Oe["aria-*"]:0}function ou(r){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(r)}function au(r){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r))}function lu(r,e){const t=A(A({},$o),e),s=`v${r.version}`,i=ar(r.anchor,!1,t),o=r.path.length>0?r.path.map(l=>ar(l,!1,t)).join(" > ")+" > ":"",n=ar(r.target,!0,t),a=t.includeConstraints?cu(r):"";return`${s}: ${i} :: ${o}${n}${a}`}function ar(r,e=!1,t=$o){const{tag:s,semantics:i}=r;let o=s;const n=[],a=A({},i.attributes);i.id&&(a.id=i.id),i.role&&!a.role&&(a.role=i.role);const l=Object.entries(a).map(([h,f])=>{const m=yn(h),p=h==="href"||h==="src"?ko(h,f):f;return{name:h,value:p,priority:m}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Oo.has(h.name)||To.has(h.name)&&Do(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");l.sort((h,f)=>f.priority-h.priority);const c=l.slice(0,t.maxAttributes);c.sort((h,f)=>h.name.localeCompare(f.name));for(const{name:h,value:f}of c)n.push(`${h}="${xr(f)}"`);if(t.includeText&&i.text&&!au(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&n.push(`text="${xr(h)}"`)}let u=n;if(n.length>0&&(e&&t.simplifyTarget&&i.id&&(u=n.filter(h=>{const f=h.split("=")[0];return yn(f)>=60||f==="text"||f==="id"||f==="role"})),u.length>0&&u.sort((h,f)=>h.localeCompare(f))),i.classes&&i.classes.length>0){const h=$c(i.classes),f=!!i.id||n.some(m=>m.startsWith("href=")||m.startsWith("data-testid=")||m.startsWith("text=")||m.startsWith("role="));if(!(e&&t.simplifyTarget&&f)&&h.length>0){const m=h.sort().slice(0,t.maxClasses);o+=m.map(p=>`.${p}`).join("")}}if(u.length>0&&(o+=`[${u.join(",")}]`),"nthChild"in r&&r.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(ou);e&&t.simplifyTarget&&h||(o+=`#${r.nthChild}`)}return o}function cu(r){if(!r.constraints||r.constraints.length===0)return"";const e=[];for(const t of r.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 s=xr(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function xr(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function uu(r,e,t){const s=ru(r,e);return s?lu(s,t):null}let hu=1;const fu=new RegExp("[^a-z0-9-_:]"),Mt=-2;function _o(){return hu++}function du(r){if(r instanceof HTMLFormElement)return"form";const e=ke(r.tagName);return fu.test(e)?"div":e}let je,bn;const pu=/^[^ \t\n\r\u000c]+/,mu=/^[, \t\n\r\u000c]+/;function gu(r,e){if(e.trim()==="")return e;let t=0;function s(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;s(mu),!(t>=e.length);){let o=s(pu);if(o.slice(-1)===",")o=Ke(r,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ke(r,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const wn=new WeakMap;function Ke(r,e){return!e||e.trim()===""?e:pi(r,e)}function yu(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}function pi(r,e){let t=wn.get(r);if(t||(t=r.createElement("a"),wn.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Lo(r,e,t,s){return s&&(t==="src"||t==="href"&&!(e==="use"&&s[0]==="#")||t==="xlink:href"&&s[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ke(r,s):t==="srcset"?gu(r,s):t==="style"?xs(s,pi(r)):e==="object"&&t==="data"?Ke(r,s):s)}function Po(r,e,t){return(r==="video"||r==="audio")&&e==="autoplay"}function Mr(r,e){return e?typeof e=="string"?r.includes(e):e.test(r):!1}function bu(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}if(t)return r.matches(t)}catch(s){}return!1}function Ms(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?Ms(ne.parentNode(r),e,t):!1;for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}return t?Ms(ne.parentNode(r),e,t):!1}function Fo(r,e,t,s){let i;if(wt(r)){if(i=r,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(r)===null)return!1;i=ne.parentElement(r)}try{if(typeof e=="string"){if(s){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ms(i,e,s))return!0;if(t){if(s){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function wu(r,e,t){const s=r.contentWindow;if(!s)return;let i=!1,o;try{o=s.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(s.location.href!==n||r.src===n||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}function vu(r,e,t){let s=!1,i;try{i=r.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{s||(e(),s=!0)},t);r.addEventListener("load",()=>{clearTimeout(o),s=!0,e()})}function Su(r,e){const{doc:t,mirror:s,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,S=Cu(t,s);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:D.Document,childNodes:[],compatMode:r.compatMode}:{type:D.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:D.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:S};case r.ELEMENT_NODE:return xu(r,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:c,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:S});case r.TEXT_NODE:return Eu(r,{doc:t,needsMask:a,maskTextFn:u,rootId:S,cssCaptured:g});case r.CDATA_SECTION_NODE:return{type:D.CDATA,textContent:"",rootId:S};case r.COMMENT_NODE:return{type:D.Comment,textContent:ne.textContent(r)||"",rootId:S};default:return!1}}function Cu(r,e){if(!e.hasNode(r))return;const t=e.getId(r);return t===1?void 0:t}function Eu(r,e){const{needsMask:t,maskTextFn:s,rootId:i,cssCaptured:o}=e,n=ne.parentNode(r),a=n&&n.tagName;let l="";const c=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?l="SCRIPT_PLACEHOLDER":o||(l=ne.textContent(r),c&&l&&(l=xs(l,pi(e.doc)))),!c&&!u&&l&&t&&(l=s?s(l,ne.parentElement(r)):l.replace(/[\S]/g,"*")),{type:D.Text,textContent:l||"",rootId:i}}function xu(r,e){const{doc:t,blockClass:s,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p}=e,y=bu(r,s,i),d=du(r);let g={};const S=r.attributes.length;for(let b=0;b<S;b++){const C=r.attributes[b];Mr(C.name,o)||Po(d,C.name,C.value)||(g[C.name]=Lo(t,d,ke(C.name),C.value))}if(d==="link"&&n){const b=Array.from(t.styleSheets).find(E=>E.href===r.href);let C=null;b&&(C=Er(b)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(d==="style"&&r.sheet){let b=Er(r.sheet);b&&(r.childNodes.length>1&&(b=bc(b,r)),g._cssText=b)}if(d==="input"||d==="textarea"||d==="select"){const b=r.value,C=r.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=Cs({element:r,type:Es(r),tagName:d,value:b,maskInputOptions:a,maskInputFn:l}):C&&(g.checked=C)}if(d==="option"&&(r.selected&&!a.select?g.selected=!0:delete g.selected),d==="dialog"&&r.open&&(g.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(r.__context==="2d")uc(r)||(g.rr_dataURL=r.toDataURL(c.type,c.quality));else if(!("__context"in r)){const b=r.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=r.width,C.height=r.height;const E=C.toDataURL(c.type,c.quality);b!==E&&(g.rr_dataURL=b)}}if(d==="img"&&u){je||(je=t.createElement("canvas"),bn=je.getContext("2d"));const b=r,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,N=()=>{b.removeEventListener("load",N);try{je.width=b.naturalWidth,je.height=b.naturalHeight,bn.drawImage(b,0,0),g.rr_dataURL=je.toDataURL(c.type,c.quality)}catch(O){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?N():b.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${C}! Error: ${O}`)}b.crossOrigin==="anonymous"&&(E?g.crossOrigin=E:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?N():b.addEventListener("load",N)}if(d==="audio"||d==="video"){const b=g;b.rr_mediaState=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume}if(m||(r.scrollLeft&&(g.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(g.rr_scrollTop=r.scrollTop)),y){const{width:b,height:C}=r.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}d==="iframe"&&!f(g.src)&&(r.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(d)&&(v=!0)}catch(b){}return{type:D.Element,tagName:d,attributes:g,childNodes:[],isSVG:yu(r)||void 0,needBlock:y,rootId:p,isCustom:v}}function Y(r){return r==null?"":r.toLowerCase()}function Mu(r,e){if(e.comment&&r.type===D.Comment)return!0;if(r.type===D.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ci(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(Y(r.attributes.name).match(/^msapplication-tile(image|color)$/)||Y(r.attributes.name)==="application-name"||Y(r.attributes.rel)==="icon"||Y(r.attributes.rel)==="apple-touch-icon"||Y(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&Y(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Y(r.attributes.property).match(/^(og|twitter|fb):/)||Y(r.attributes.name).match(/^(og|twitter):/)||Y(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Y(r.attributes.name)==="robots"||Y(r.attributes.name)==="googlebot"||Y(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Y(r.attributes.name)==="author"||Y(r.attributes.name)==="generator"||Y(r.attributes.name)==="framework"||Y(r.attributes.name)==="publisher"||Y(r.attributes.name)==="progid"||Y(r.attributes.property).match(/^article:/)||Y(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Y(r.attributes.name)==="google-site-verification"||Y(r.attributes.name)==="yandex-verification"||Y(r.attributes.name)==="csrf-token"||Y(r.attributes.name)==="p:domain_verify"||Y(r.attributes.name)==="verify-v1"||Y(r.attributes.name)==="verification"||Y(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qe(r,e){const{doc:t,mirror:s,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:O=!1,cssCaptured:U=!1,selectorOptions:L}=e;let{needsMask:P}=e,{preserveWhiteSpace:H=!0}=e;P||(P=Fo(r,n,a,P===void 0));const Q=Su(r,{doc:t,mirror:s,blockClass:i,blockSelector:o,excludeAttribute:l,needsMask:P,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:N,newlyAddedElement:O,cssCaptured:U});if(!Q)return console.warn(r,"not serialized"),null;let ee;s.hasNode(r)?ee=s.getId(r):Mu(Q,p)||!H&&Q.type===D.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?ee=Mt:ee=_o();const R=Object.assign(Q,{id:ee});if(wt(r)||r.nodeType===Node.TEXT_NODE){if(wt(r)&&L!==null&&L!==void 0)try{const j={maxPathDepth:L.maxPathDepth,enableSvgFingerprint:L.enableSvgFingerprint,confidenceThreshold:L.confidenceThreshold,fallbackToBody:L.fallbackToBody},oe=uu(r,j);oe&&(R.selector=oe)}catch(j){console.warn("Failed to generate SEQL selector:",j)}r.nodeType===Node.TEXT_NODE&&(R.isVisible=wc(r)),r.nodeType===Node.ELEMENT_NODE&&(R.isVisible=ui(r),R.isInteractive=Ic(r))}if(s.add(r,R),ee===Mt)return null;S&&S(r);let te=!c;if(R.type===D.Element){te=te&&!R.needBlock,delete R.needBlock;const j=ne.shadowRoot(r);j&&St(j)&&(R.isShadowHost=!0)}if((R.type===D.Document||R.type===D.Element)&&te){p.headWhitespace&&R.type===D.Element&&R.tagName==="head"&&(H=!1);const j={doc:t,mirror:s,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:N,cssCaptured:!1,selectorOptions:L};if(!(R.type===D.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===D.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(j.cssCaptured=!0);for(const fe of Array.from(ne.childNodes(r))){const be=qe(fe,j);be&&R.childNodes.push(be)}}let oe=null;if(wt(r)&&(oe=ne.shadowRoot(r)))for(const fe of Array.from(ne.childNodes(oe))){const be=qe(fe,j);be&&(St(oe)&&(be.isShadow=!0),R.childNodes.push(be))}}const G=ne.parentNode(r);return G&&vt(G)&&St(G)&&(R.isShadow=!0),R.type===D.Element&&R.tagName==="iframe"&&wu(r,()=>{const j=r.contentDocument;if(j&&v){const oe=qe(j,{doc:j,mirror:s,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:N,selectorOptions:L});oe&&v(r,oe)}},b),R.type===D.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&ci(R.attributes.href)==="css")&&vu(r,()=>{if(C){const j=qe(r,{doc:t,mirror:s,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:N,selectorOptions:L});j&&C(r,j)}},E),R}function Iu(r,e){var P,H,Q,ee;const{mirror:t=new li,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:E=()=>!1,selector:N}=e||{},O=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,U=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,L=N===!1?null:N===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:N===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(P=N.maxPathDepth)!=null?P:10,enableSvgFingerprint:(H=N.enableSvgFingerprint)!=null?H:!0,confidenceThreshold:(Q=N.confidenceThreshold)!=null?Q:.3,fallbackToBody:(ee=N.fallbackToBody)!=null?ee:!0};return qe(r,{doc:r,mirror:t,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:O,maskTextFn:f,maskInputFn:m,slimDOMOptions:U,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:E,newlyAddedElement:!1,selectorOptions:L})}const Au=/(max|min)-device-(width|height)/,vn=new RegExp(Au.source,"g"),Ru={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(r){r.params.match(vn)&&(r.params=r.params.replace(vn,"$1-$2"))}}}},Nu={postcssPlugin:"postcss-hover-classes",prepare:function(){const r=[];return{Rule:function(e){r.indexOf(e)===-1&&(r.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
15
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}},Ou={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(r){let e=!1,t=!1,s=null;r.walkDecls(i=>{i.prop==="animation"&&(e=!0,s=i),i.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&r.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function Tu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Du(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var mi={exports:{}},Z=String,Bo=function(){return{isColorSupported:!1,reset:Z,bold:Z,dim:Z,italic:Z,underline:Z,inverse:Z,hidden:Z,strikethrough:Z,black:Z,red:Z,green:Z,yellow:Z,blue:Z,magenta:Z,cyan:Z,white:Z,gray:Z,bgBlack:Z,bgRed:Z,bgGreen:Z,bgYellow:Z,bgBlue:Z,bgMagenta:Z,bgCyan:Z,bgWhite:Z}};mi.exports=Bo();mi.exports.createColors=Bo;var ku=mi.exports;const $u={},_u=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"})),me=Du(_u);let Sn=ku,Cn=me,Ir=class Uo extends Error{constructor(e,t,s,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Uo)}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),Cn&&e&&(t=Cn(t));let s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),n=String(o).length,a,l;if(e){let{bold:c,gray:u,red:h}=Sn.createColors(!0);a=f=>c(h(f)),l=f=>u(f)}else a=l=c=>c;return s.slice(i,o).map((c,u)=>{let h=i+1+u,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+c+`
|
|
16
|
-
`+m+a("^")}return" "+l(f)+c}).join(`
|
|
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 uc=Object.defineProperty,hc=Object.defineProperties;var dc=Object.getOwnPropertyDescriptors;var Jt=Object.getOwnPropertySymbols;var yn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable;var gn=(r,e,t)=>e in r?uc(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e)=>{for(var t in e||(e={}))yn.call(e,t)&&gn(r,t,e[t]);if(Jt)for(var t of Jt(e))bn.call(e,t)&&gn(r,t,e[t]);return r},re=(r,e)=>hc(r,dc(e));var qe=(r,e)=>{var t={};for(var s in r)yn.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&Jt)for(var s of Jt(r))e.indexOf(s)<0&&bn.call(r,s)&&(t[s]=r[s]);return t};var fc=Object.defineProperty,pc=(r,e,t)=>e in r?fc(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,w=(r,e,t)=>pc(r,typeof e!="symbol"?e+"":e,t),wn;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var mc=Object.defineProperty,gc=(r,e,t)=>e in r?mc(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,dr=(r,e,t)=>gc(r,typeof e!="symbol"?e+"":e,t),k=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(k||{});const vn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Sn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},yc=()=>!!globalThis.Zone;function wi(r){if(qt[r])return qt[r];const e=globalThis[r],t=e.prototype,s=r in vn?vn[r]:void 0,i=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=r in Sn?Sn[r]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!yc())return qt[r]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[r].prototype;return document.body.removeChild(l),c?qt[r]=c:t}catch(l){return t}}const fr={};function We(r,e,t){var s;const i=`${r}.${String(t)}`;if(fr[i])return fr[i].call(e);const n=wi(r),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(fr[i]=o,o.call(e)):e[t]}const pr={};function Xo(r,e,t){const s=`${r}.${String(t)}`;if(pr[s])return pr[s].bind(e);const n=wi(r)[t];return typeof n!="function"?e[t]:(pr[s]=n,n.bind(e))}function bc(r){return We("Node",r,"childNodes")}function wc(r){return We("Node",r,"parentNode")}function vc(r){return We("Node",r,"parentElement")}function Sc(r){return We("Node",r,"textContent")}function Cc(r,e){return Xo("Node",r,"contains")(e)}function xc(r){return Xo("Node",r,"getRootNode")()}function Ec(r){return!r||!("host"in r)?null:We("ShadowRoot",r,"host")}function Ac(r){return r.styleSheets}function Mc(r){return!r||!("shadowRoot"in r)?null:We("Element",r,"shadowRoot")}function Ic(r,e){return We("Element",r,"querySelector")(e)}function Nc(r,e){return We("Element",r,"querySelectorAll")(e)}function Rc(){return wi("MutationObserver").constructor}function Tc(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function Oc(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function Dc(r){var d;var e,t;const s=(d=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=r.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,r),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const oe={childNodes:bc,parentNode:wc,parentElement:vc,textContent:Sc,contains:Cc,getRootNode:xc,host:Ec,styleSheets:Ac,shadowRoot:Mc,querySelector:Ic,querySelectorAll:Nc,mutationObserver:Rc,patch:Tc,describeNode:Oc,getElementVisibility:Dc};function Mt(r){return r.nodeType===r.ELEMENT_NODE}function It(r){const e=r&&"host"in r&&"mode"in r&&oe.host(r)||null;return!!(e&&"shadowRoot"in e&&oe.shadowRoot(e)===r)}function Nt(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function $c(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function kc(r){const{cssText:e}=r;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function kr(r){try{const e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&r.ownerNode.ownerDocument&&(t=r.ownerNode.ownerDocument.location.href);const s=Array.from(e,i=>Jo(i,t)).join("");return $c(s)}catch(e){return null}}function Jo(r,e){if(Lc(r)){let t;try{t=kr(r.styleSheet)||kc(r)}catch(s){t=r.cssText}return r.styleSheet.href?Ts(t,r.styleSheet.href):t}else{let t=r.cssText;return r.type===CSSRule.KEYFRAMES_RULE||(r.type,CSSRule.KEYFRAME_RULE),Pc(r)&&r.selectorText.includes(":")&&(t=_c(t)),e?Ts(t,e):t}}function _c(r){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function Lc(r){return"styleSheet"in r}function Pc(r){return"selectorText"in r}class vi{constructor(){dr(this,"idNodeMap",new Map),dr(this,"nodeMetaMap",new WeakMap),dr(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.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 s=t.id;if(this.idNodeMap.set(s,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 s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(s),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 qo(){return new vi}function Ns({element:r,maskInputOptions:e,tagName:t,type:s,value:i,maskInputFn:n}){let o=i||"";const l=s&&ze(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,r):o="*".repeat(o.length)),o}function ze(r){return r.toLowerCase()}const Cn="__rrweb_original__";function Fc(r){const e=r.getContext("2d");if(!e)return!0;const t=50;for(let s=0;s<r.width;s+=t)for(let i=0;i<r.height;i+=t){const n=e.getImageData,o=Cn in n?n[Cn]:n;if(new Uint32Array(o.call(e,s,i,Math.min(t,r.width-s),Math.min(t,r.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Bc(r,e){return!r||!e||r.type!==e.type?!1:r.type===k.Document?r.compatMode===e.compatMode:r.type===k.DocumentType?r.name===e.name&&r.publicId===e.publicId&&r.systemId===e.systemId:r.type===k.Comment||r.type===k.Text||r.type===k.CDATA?r.textContent===e.textContent:r.type===k.Element?r.tagName===e.tagName&&JSON.stringify(r.attributes)===JSON.stringify(e.attributes)&&r.isSVG===e.isSVG&&r.needBlock===e.needBlock:!1}function Rs(r){const e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?ze(e):null}function Si(r,e){var n;let t;try{t=new URL(r,e!=null?e:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(s);return(n=i==null?void 0:i[1])!=null?n:null}function zc(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}const Wc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Uc=/^(?:[a-z+]+:)?\/\//i,Vc=/^www\..*/i,Hc=/^(data:)([^,]*),(.*)/i;function Ts(r,e){return(r||"").replace(Wc,(t,s,i,n,o,l)=>{const a=i||o||l,c=s||n||"";if(!a)return t;if(Uc.test(a)||Vc.test(a))return`url(${c}${a}${c})`;if(Hc.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${zc(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${c}${u.join("/")}${c})`})}function Kt(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Gc(r,e,t=!1){const s=Array.from(e.childNodes),i=[];let n=0;if(s.length>1&&r&&typeof r=="string"){let o=Kt(r,t);const l=o.length/r.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){const c=Kt(s[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let d=c.substring(0,h),f=o.split(d),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&s[a-1].textContent!=="")m=o.indexOf(d,1);else if(f.length===1){if(d=d.substring(0,d.length-1),f=o.split(d),f.length<=1)return i.push(r),i;h=u+1}else h===c.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>u){const y=s[a-1].textContent;if(y&&typeof y=="string"){const p=Kt(y).length;m=o.indexOf(d,p)}m===-1&&(m=f[0].length)}if(m!==-1){let y=Math.floor(m/l);for(;y>0&&y<r.length;){if(n+=1,n>50*s.length)return i.push(r),i;const p=Kt(r.substring(0,y),t);if(p.length===m){i.push(r.substring(0,y)),r=r.substring(y),o=o.substring(m);break}else p.length<m?y+=Math.max(1,Math.floor((m-p.length)/l)):y-=Math.max(1,Math.floor((p.length-m)*l))}break}}}}return i.push(r),i}function jc(r,e){return Gc(r,e).join("/* rr_split */")}function Yc(r){var e;const t=oe.parentNode(r),s=t&&t;return!s||!Ci(s)?!1:((e=r.textContent)==null?void 0:e.trim())!==""}function Ci(r){return oe.getElementVisibility(r).isVisible}const Zc=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Xc=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Jc=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],xi=new WeakSet,qc=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(qc.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();Zc.includes(s)&&xi.add(this)}};const Kc=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){Kc.call(this,r,e,t)};function Qc(r){return r instanceof Element&&xi.has(r)}function eu(r){if(r.nodeType===Node.ELEMENT_NODE){const e=r,t=e.tagName.toLowerCase();if(Xc.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Qc(e)||s||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function xn(){document.querySelectorAll("*").forEach(e=>{Jc.forEach(t=>{e.hasAttribute(t)&&xi.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?xn():document.addEventListener("DOMContentLoaded",xn)}catch(r){}const Qt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},ve={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},tu={MIN_CONFIDENCE_FOR_SKIP:.7},En=["form","main","nav","section","article","footer","header"],An=["form","navigation","main","region","contentinfo","complementary","banner","search"],su=["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"],Le={"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},Ko=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ru={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Ot(r){return!!(/^[a-z]+-\d+$/i.test(r)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(r)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(r)||/^\d+$/.test(r)||/^:[a-z0-9]+:$/i.test(r)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r)&&(/\d/.test(r)||/[A-Z]/.test(r))||/^radix-/.test(r)||/^mui-\d+$/.test(r))}const Qo=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function ea(r){return r.trim().split(/\s+/).some(e=>Ot(e))}let iu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),s=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:ve.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();En.includes(s)&&(t+=ve.SEMANTIC_TAG);const i=e.getAttribute("role");i&&An.includes(i)&&(t+=ve.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=ve.ARIA_LABEL);const n=e.id;return n&&!Ot(n)&&(t+=ve.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=ve.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=ve.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-ve.DEPTH_PENALTY_THRESHOLD)*ve.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(En.includes(t))return"A";const s=e.getAttribute("role");return s&&An.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const nu=[/^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,}/],ou=[/^\[/,/^(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)?:/,/\/([\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 Ei(r){return nu.some(e=>e.test(r))}function Ai(r){return r.length<=2||/^\d/.test(r)?!0:ou.some(e=>e.test(r))}function au(r){return!Ei(r)&&!Ai(r)}function lu(r){return r.filter(e=>au(e))}function cu(r){const e=[],t=[];for(const s of r)Ai(s)||Ei(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Mn(r){return Ai(r)||Ei(r)}const In=r=>r.replace(/([#:.[\]@])/g,"\\$1");let uu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){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,s);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,i,n){const o=this.buildTestSelector(s,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<tu.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,i);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const i=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(s)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Ot(e.id)&&(t+=`#${In(e.id)}`);for(const s of Array.from(e.classList))Mn(s)||(t+=`.${In(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return su.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!Mn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Ot(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){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(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}};function hu(r){return r?r.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const du={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function fu(r){return r?[/\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(r)):!1}function pu(r,e){if(!r)return r;const t=r.startsWith("http://")||r.startsWith("https://"),[s,i]=r.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&fu(i)||(l+=`#${i}`)),l}function ta(r,e,t={}){if(!e)return e;const s=M(M({},du),t);return r==="href"||r==="src"?pu(e,s):e}const mu=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],gu=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],yu=["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"],bu=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],wu=["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"],vu=["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"],Su=["data-category","data-action","data-label","data-value"],Cu=["id","name","type","placeholder","title","for","alt","href"],xu=["disabled","checked","selected","hidden","readonly","required","value"],Eu=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Au(r,e){return mu.includes(r)?!0:gu.includes(r)||yu.includes(r)||bu.some(t=>r.startsWith(t))?!1:wu.includes(r)?!0:vu.some(t=>r.startsWith(t))||Su.includes(r)?!1:r.startsWith("data-")&&r.endsWith("-id")?!0:r==="id"?!Eu.some(t=>t.test(e)):Cu.includes(r)?!0:xu.includes(r)?!1:!!r.startsWith("data-")}let Nn=class{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!Ot(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=cu(o);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 o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Ko.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 Le[e]!==void 0?Le[e]:e.startsWith("data-")?Le["data-*"]:e.startsWith("aria-")?Le["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 s of Array.from(e.attributes)){const i=s.name;if(this.shouldIgnoreAttribute(i)||!Au(i,s.value)||Qo.has(i)&&ea(s.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?ta(i,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=hu(t);if(!s)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=s.length>i?s.slice(0,i)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;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(" "):(s=e.textContent)!=null?s: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)}},Mu=class{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),i={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(i.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function Iu(r,e=0){const t=r.anchor.score,s=r.path.length>0?r.path.reduce((l,a)=>l+a.score,0)/r.path.length:.5,i=r.target.score,n=t*Qt.ANCHOR+s*Qt.PATH+i*Qt.TARGET+e*Qt.UNIQUENESS,o=r.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let Nu=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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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}},Ru=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Nu((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(M({},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,s=e+t;return s>0?e/s:0}};function Tu(r){return new Ru(r)}let mr=null;function Ou(){return mr||(mr=Tu()),mr}function Rn(r){if(r.ownerDocument)return r.ownerDocument;let e=r;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
3
|
+
1. The element is detached from the DOM
|
|
4
|
+
2. The element was created but never attached
|
|
5
|
+
3. You are working with a document node instead of an element`)}function Du(r,e){if(!e)return;const t=Rn(r),s=e instanceof Document?e:Rn(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
6
|
+
Common causes:
|
|
7
|
+
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
8
|
+
2. Element from one iframe, root from another
|
|
9
|
+
3. Element from main document, root from iframe (or vice versa)
|
|
10
|
+
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function $u(r,e={}){var G,J,K,N;var t;if(!r||!r.ownerDocument||!r.isConnected)return null;const s=M(M({},ru),e);if(s.root)try{Du(r,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const i=(G=s.cache)!=null?G:Ou(),n=i.getEID(r);if(n!==void 0)return n;if(r.tagName.toLowerCase()==="html"){const F=new Nn(s,i),H=Lu(r,s,F);return i.setEID(r,H),H}const o=new iu(s,i),l=new uu(s,i),a=new Nn(s,i),c=new Mu,u=o.findAnchor(r);if(!u&&!s.fallbackToBody)return null;const h=(K=(J=u==null?void 0:u.element)!=null?J:(t=r.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:ve.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,r,a),v=a.extract(r);s.enableSvgFingerprint&&ku(r)&&(v.svg=c.fingerprint(r));const b=r.parentElement;let C;if(b){const F=Array.from(b.children).indexOf(r);F!==-1&&(C=F+1)}const x={tag:r.tagName.toLowerCase(),semantics:v,score:a.scoreElement(r),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,W=_u(g.degraded,S),_={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:W}};return _.meta.confidence=Iu(_),_.meta.confidence<s.confidenceThreshold?null:(i.setEID(r,_),_)}function ku(r){return r.namespaceURI==="http://www.w3.org/2000/svg"||r.tagName.toLowerCase()==="svg"||r instanceof SVGElement}function _u(r,e){if(r&&e.degraded)return"anchor-and-path-degraded";if(r)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Lu(r,e,t,s){const i={tag:"html",semantics:t.extract(r),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 sa={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Tn(r){return r==="id"?101:Le[r]!==void 0?Le[r]:r.startsWith("data-")?Le["data-*"]:r.startsWith("aria-")?Le["aria-*"]:0}function Pu(r){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(r)}function Fu(r){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r))}function Bu(r,e){const t=M(M({},sa),e),s=`v${r.version}`,i=gr(r.anchor,!1,t),n=r.path.length>0?r.path.map(a=>gr(a,!1,t)).join(" > ")+" > ":"",o=gr(r.target,!0,t),l=t.includeConstraints?zu(r):"";return`${s}: ${i} :: ${n}${o}${l}`}function gr(r,e=!1,t=sa){const{tag:s,semantics:i}=r;let n=s;const o=[],l=M({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=Tn(h),m=h==="href"||h==="src"?ta(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Ko.has(h.name)||Qo.has(h.name)&&ea(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${_r(d)}"`);if(t.includeText&&i.text&&!Fu(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${_r(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Tn(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=lu(i.classes),d=!!i.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in r&&r.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Pu);e&&t.simplifyTarget&&h||(n+=`#${r.nthChild}`)}return n}function zu(r){if(!r.constraints||r.constraints.length===0)return"";const e=[];for(const t of r.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 s=_r(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function _r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Wu(r,e,t){const s=$u(r,e);return s?Bu(s,t):null}let Uu=1;const Vu=new RegExp("[^a-z0-9-_:]"),Dt=-2;function ra(){return Uu++}function Hu(r){if(r instanceof HTMLFormElement)return"form";const e=ze(r.tagName);return Vu.test(e)?"div":e}let Ke,On;const Gu=/^[^ \t\n\r\u000c]+/,ju=/^[, \t\n\r\u000c]+/;function Yu(r,e){if(e.trim()==="")return e;let t=0;function s(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;s(ju),!(t>=e.length);){let n=s(Gu);if(n.slice(-1)===",")n=st(r,n.substring(0,n.length-1)),i.push(n);else{let o="";n=st(r,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const Dn=new WeakMap;function st(r,e){return!e||e.trim()===""?e:Mi(r,e)}function Zu(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}function Mi(r,e){let t=Dn.get(r);if(t||(t=r.createElement("a"),Dn.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ia(r,e,t,s){return s&&(t==="src"||t==="href"&&!(e==="use"&&s[0]==="#")||t==="xlink:href"&&s[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?st(r,s):t==="srcset"?Yu(r,s):t==="style"?Ts(s,Mi(r)):e==="object"&&t==="data"?st(r,s):s)}function na(r,e,t){return(r==="video"||r==="audio")&&e==="autoplay"}function Lr(r,e){return e?typeof e=="string"?r.includes(e):e.test(r):!1}function Xu(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}if(t)return r.matches(t)}catch(s){}return!1}function Os(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?Os(oe.parentNode(r),e,t):!1;for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}return t?Os(oe.parentNode(r),e,t):!1}function oa(r,e,t,s){let i;if(Mt(r)){if(i=r,!oe.childNodes(i).length)return!1}else{if(oe.parentElement(r)===null)return!1;i=oe.parentElement(r)}try{if(typeof e=="string"){if(s){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Os(i,e,s))return!0;if(t){if(s){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Ju(r,e,t){const s=r.contentWindow;if(!s)return;let i=!1,n;try{n=s.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(s.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}function qu(r,e,t){let s=!1,i;try{i=r.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{s||(e(),s=!0)},t);r.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}function Ku(r,e){const{doc:t,mirror:s,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:l,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p=!1,cssCaptured:g=!1}=e,S=Qu(t,s);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:k.Document,childNodes:[],compatMode:r.compatMode}:{type:k.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:k.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:S};case r.ELEMENT_NODE:return th(r,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p,rootId:S});case r.TEXT_NODE:return eh(r,{doc:t,needsMask:l,maskTextFn:u,rootId:S,cssCaptured:g});case r.CDATA_SECTION_NODE:return{type:k.CDATA,textContent:"",rootId:S};case r.COMMENT_NODE:return{type:k.Comment,textContent:oe.textContent(r)||"",rootId:S};default:return!1}}function Qu(r,e){if(!e.hasNode(r))return;const t=e.getId(r);return t===1?void 0:t}function eh(r,e){const{needsMask:t,maskTextFn:s,rootId:i,cssCaptured:n}=e,o=oe.parentNode(r),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=oe.textContent(r),c&&a&&(a=Ts(a,Mi(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,oe.parentElement(r)):a.replace(/[\S]/g,"*")),{type:k.Text,textContent:a||"",rootId:i}}function th(r,e){const{doc:t,blockClass:s,blockSelector:i,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m}=e,y=Xu(r,s,i),p=Hu(r);let g={};const S=r.attributes.length;for(let b=0;b<S;b++){const C=r.attributes[b];Lr(C.name,n)||na(p,C.name,C.value)||(g[C.name]=ia(t,p,ze(C.name),C.value))}if(p==="link"&&o){const b=Array.from(t.styleSheets).find(x=>x.href===r.href);let C=null;b&&(C=kr(b)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&r.sheet){let b=kr(r.sheet);b&&(r.childNodes.length>1&&(b=jc(b,r)),g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=r.value,C=r.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=Ns({element:r,type:Rs(r),tagName:p,value:b,maskInputOptions:l,maskInputFn:a}):C&&(g.checked=C)}if(p==="option"&&(r.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&r.open&&(g.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&h){if(r.__context==="2d")Fc(r)||(g.rr_dataURL=r.toDataURL(c.type,c.quality));else if(!("__context"in r)){const b=r.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=r.width,C.height=r.height;const x=C.toDataURL(c.type,c.quality);b!==x&&(g.rr_dataURL=b)}}if(p==="img"&&u){Ke||(Ke=t.createElement("canvas"),On=Ke.getContext("2d"));const b=r,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,R=()=>{b.removeEventListener("load",R);try{Ke.width=b.naturalWidth,Ke.height=b.naturalHeight,On.drawImage(b,0,0),g.rr_dataURL=Ke.toDataURL(c.type,c.quality)}catch(T){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?R():b.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${T}`)}b.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?R():b.addEventListener("load",R)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume}if(f||(r.scrollLeft&&(g.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(g.rr_scrollTop=r.scrollTop)),y){const{width:b,height:C}=r.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(r.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(p)&&(v=!0)}catch(b){}return{type:k.Element,tagName:p,attributes:g,childNodes:[],isSVG:Zu(r)||void 0,needBlock:y,rootId:m,isCustom:v}}function q(r){return r==null?"":r.toLowerCase()}function sh(r,e){if(e.comment&&r.type===k.Comment)return!0;if(r.type===k.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&Si(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(q(r.attributes.name).match(/^msapplication-tile(image|color)$/)||q(r.attributes.name)==="application-name"||q(r.attributes.rel)==="icon"||q(r.attributes.rel)==="apple-touch-icon"||q(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&q(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(q(r.attributes.property).match(/^(og|twitter|fb):/)||q(r.attributes.name).match(/^(og|twitter):/)||q(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(q(r.attributes.name)==="robots"||q(r.attributes.name)==="googlebot"||q(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(q(r.attributes.name)==="author"||q(r.attributes.name)==="generator"||q(r.attributes.name)==="framework"||q(r.attributes.name)==="publisher"||q(r.attributes.name)==="progid"||q(r.attributes.property).match(/^article:/)||q(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(q(r.attributes.name)==="google-site-verification"||q(r.attributes.name)==="yandex-verification"||q(r.attributes.name)==="csrf-token"||q(r.attributes.name)==="p:domain_verify"||q(r.attributes.name)==="verify-v1"||q(r.attributes.name)==="verification"||q(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function rt(r,e){const{doc:t,mirror:s,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:T=!1,cssCaptured:z=!1,selectorOptions:W}=e;let{needsMask:_}=e,{preserveWhiteSpace:G=!0}=e;_||(_=oa(r,o,l,_===void 0));const J=Ku(r,{doc:t,mirror:s,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:_,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:T,cssCaptured:z});if(!J)return console.warn(r,"not serialized"),null;let K;s.hasNode(r)?K=s.getId(r):sh(J,m)||!G&&J.type===k.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?K=Dt:K=ra();const N=Object.assign(J,{id:K});if(Mt(r)||r.nodeType===Node.TEXT_NODE){if(Mt(r)&&W!==null&&W!==void 0)try{const X={maxPathDepth:W.maxPathDepth,enableSvgFingerprint:W.enableSvgFingerprint,fallbackToBody:W.fallbackToBody},le=Wu(r,X);le&&(N.selector=le)}catch(X){console.warn("Failed to generate SEQL selector:",X)}r.nodeType===Node.TEXT_NODE&&(N.isVisible=Yc(r)),r.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Ci(r),N.isInteractive=eu(r))}if(s.add(r,N),K===Dt)return null;S&&S(r);let F=!c;if(N.type===k.Element){F=F&&!N.needBlock,delete N.needBlock;const X=oe.shadowRoot(r);X&&Nt(X)&&(N.isShadowHost=!0)}if((N.type===k.Document||N.type===k.Element)&&F){m.headWhitespace&&N.type===k.Element&&N.tagName==="head"&&(G=!1);const X={doc:t,mirror:s,blockClass:i,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:G,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,cssCaptured:!1,selectorOptions:W};if(!(N.type===k.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===k.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(X.cssCaptured=!0);for(const me of Array.from(oe.childNodes(r))){const de=rt(me,X);de&&N.childNodes.push(de)}}let le=null;if(Mt(r)&&(le=oe.shadowRoot(r)))for(const me of Array.from(oe.childNodes(le))){const de=rt(me,X);de&&(Nt(le)&&(de.isShadow=!0),N.childNodes.push(de))}}const H=oe.parentNode(r);return H&&It(H)&&Nt(H)&&(N.isShadow=!0),N.type===k.Element&&N.tagName==="iframe"&&Ju(r,()=>{const X=r.contentDocument;if(X&&v){const le=rt(X,{doc:X,mirror:s,blockClass:i,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:G,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:W});le&&v(r,le)}},b),N.type===k.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Si(N.attributes.href)==="css")&&qu(r,()=>{if(C){const X=rt(r,{doc:t,mirror:s,blockClass:i,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:G,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:W});X&&C(r,X)}},x),N}function rh(r,e){var _,G,J,K;const{mirror:t=new vi,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:f,slimDOM:m=!1,dataURLOptions:y,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:R}=e||{},T=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,z=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,W=R===!1?null:R===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:R===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(_=R.maxPathDepth)!=null?_:10,enableSvgFingerprint:(G=R.enableSvgFingerprint)!=null?G:!0,confidenceThreshold:(J=R.confidenceThreshold)!=null?J:.3,fallbackToBody:(K=R.fallbackToBody)!=null?K:!0};return rt(r,{doc:r,mirror:t,blockClass:s,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:T,maskTextFn:d,maskInputFn:f,slimDOMOptions:z,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:W})}const ih=/(max|min)-device-(width|height)/,$n=new RegExp(ih.source,"g"),nh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(r){r.params.match($n)&&(r.params=r.params.replace($n,"$1-$2"))}}}},oh={postcssPlugin:"postcss-hover-classes",prepare:function(){const r=[];return{Rule:function(e){r.indexOf(e)===-1&&(r.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}},ah={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(r){let e=!1,t=!1,s=null;r.walkDecls(i=>{i.prop==="animation"&&(e=!0,s=i),i.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&r.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function lh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function ch(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var Ii={exports:{}},O=String,aa=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}};Ii.exports=aa();Ii.exports.createColors=aa;var uh=Ii.exports;const hh={},dh=Object.freeze(Object.defineProperty({__proto__:null,default:hh},Symbol.toStringTag,{value:"Module"})),ye=ch(dh);let kn=uh,_n=ye,Pr=class la extends Error{constructor(e,t,s,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,la)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=kn.isColorSupported);let s=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=kn.createColors(!0);i=f=>u(d(f)),s=f=>h(f),_n&&(n=f=>_n(f))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,f=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,p=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),S=u.slice(p,g),v=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return i(">")+s(f)+n(S)+`
|
|
13
|
+
`+v+i("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(f)+n(u)+`
|
|
14
|
+
`+m+i("^")}return" "+s(f)+n(u)}).join(`
|
|
17
15
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
18
16
|
|
|
19
17
|
`+e+`
|
|
20
|
-
`),this.name+": "+this.message+e}};var
|
|
18
|
+
`),this.name+": "+this.message+e}};var Ni=Pr;Pr.default=Pr;const Ln={after:`
|
|
21
19
|
`,beforeClose:`
|
|
22
20
|
`,beforeComment:`
|
|
23
21
|
`,beforeDecl:`
|
|
24
22
|
`,beforeOpen:" ",beforeRule:`
|
|
25
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
26
|
-
`)){let
|
|
23
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function fh(r){return r[0].toUpperCase()+r.slice(1)}let Fr=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
|
|
24
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),i=e.prop+s+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,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ln[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]!="undefined")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+fh(s);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Ln[s]),o.rawCache[s]=i,i}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return t=s.raws.after,t.includes(`
|
|
27
25
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
28
26
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
29
27
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before!="undefined")return t=s.raws.before,t.includes(`
|
|
30
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before!="undefined"){let
|
|
31
|
-
`);return t=
|
|
32
|
-
`?(
|
|
33
|
-
`);s=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)s[a]=n,n+=o[a].length+1;this[ur]=s}t=s[s.length-1];let i=0;if(e>=t)i=s.length-1;else{let o=s.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<s[n])o=n-1;else if(e>=s[n+1])i=n+1;else{i=n;break}}return{col:e-s[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:$r(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof s=="number"&&(a=o.originalPositionFor({column:i,line:s}));let l;kr(n.source)?l=Zt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Zt(this.map.mapFile));let c={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(In)c.file=In(l);else throw new Error("file: protocol is not available in this PostCSS build");let u=o.sourceContentFor(n.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ws=Is;Is.default=Is;cr&&cr.registerInput&&cr.registerInput(Is);let{SourceMapConsumer:Wo,SourceMapGenerator:gs}=me,{dirname:ys,relative:Ho,resolve:Go,sep:jo}=me,{pathToFileURL:Nn}=me,sh=Ws,rh=!!(Wo&&gs),ih=!!(ys&&Go&&Ho&&jo),nh=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
29
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],i=e.raws[t];return i&&i.value===s?i.raw:s}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 ca=Fr;Fr.default=Fr;let ph=ca;function Br(r,e){new ph(e).stringify(r)}var js=Br;Br.default=Br;var Ut={};Ut.isClean=Symbol("isClean");Ut.my=Symbol("my");let mh=Ni,gh=ca,yh=js,{isClean:bt,my:bh}=Ut;function zr(r,e){let t=new r.constructor;for(let s in r){if(!Object.prototype.hasOwnProperty.call(r,s)||s==="proxyCache")continue;let i=r[s],n=typeof i;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=i:Array.isArray(i)?t[s]=i.map(o=>zr(o,t)):(n==="object"&&i!==null&&(i=zr(i)),t[s]=i)}return t}function Ae(r,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,i=0;for(let n=0;n<r.length;n++){if(s===e.line&&t===e.column){i=n;break}r[n]===`
|
|
30
|
+
`?(t=1,s+=1):t+=1}return i}let Wr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[bt]=!1,this[bh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=zr(this);for(let s in e)t[s]=e[s];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:s,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new mh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[bt]=!0}markDirty(){if(this[bt]){this[bt]=!1;let e=this;for(;e=e.parent;)e[bt]=!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 s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(Ae(s,this.source.start),Ae(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Ae(i,this.source.start),o=n+e;for(let l=n;l<o;l++)i[l]===`
|
|
31
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}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,s={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:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Ae(t,this.source.start),Ae(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Ae(t,e.start)}:e.index&&(s=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<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new gh().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,s=!1;for(let i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return i&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=yh){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var Ys=Wr;Wr.default=Wr;let wh=Ys,Ur=class extends wh{constructor(e){super(e),this.type="comment"}};var Zs=Ur;Ur.default=Ur;let vh=Ys,Vr=class extends vh{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Xs=Vr;Vr.default=Vr;let ua=Zs,ha=Xs,Sh=Ys,{isClean:da,my:fa}=Ut,Ri,pa,ma,Ti;function ga(r){return r.map(e=>(e.nodes&&(e.nodes=ga(e.nodes)),delete e.source,e))}function ya(r){if(r[da]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)ya(e)}let Re=class ba extends Sh{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 s=this.normalize(t,this.last);for(let i of s)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(),s,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],i=e(this.proxyOf.nodes[s],s),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")?(...s)=>e[t](...s.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?s=>e[t]((i,...n)=>s(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(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 s=this.index(e),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of i)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),i=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ga(pa(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 ha(e)]}else if(e.selector||e.selectors)e=[new Ti(e)];else if(e.name)e=[new Ri(e)];else if(e.text)e=[new ua(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[fa]||ba.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[da]&&ya(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 s=this.normalize(t,this.first,"prepend").reverse();for(let i of s)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let i;try{i=e(t,s)}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((s,i)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,i)}):this.walk((s,i)=>{if(s.type==="atrule"&&s.name===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="atrule")return t(s,i)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,i)}):this.walk((s,i)=>{if(s.type==="decl"&&s.prop===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="decl")return t(s,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,i)}):this.walk((s,i)=>{if(s.type==="rule"&&s.selector===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="rule")return t(s,i)}))}};Re.registerParse=r=>{pa=r};Re.registerRule=r=>{Ti=r};Re.registerAtRule=r=>{Ri=r};Re.registerRoot=r=>{ma=r};var Ze=Re;Re.default=Re;Re.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Ri.prototype):r.type==="rule"?Object.setPrototypeOf(r,Ti.prototype):r.type==="decl"?Object.setPrototypeOf(r,ha.prototype):r.type==="comment"?Object.setPrototypeOf(r,ua.prototype):r.type==="root"&&Object.setPrototypeOf(r,ma.prototype),r[fa]=!0,r.nodes&&r.nodes.forEach(e=>{Re.rebuild(e)})};let wa=Ze,Ds=class extends wa{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 Oi=Ds;Ds.default=Ds;wa.registerAtRule(Ds);let Ch=Ze,va,Sa,$t=class extends Ch{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new va(new Sa,this,e).stringify()}};$t.registerLazyResult=r=>{va=r};$t.registerProcessor=r=>{Sa=r};var Di=$t;$t.default=$t;let xh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Eh=(r=21)=>{let e="",t=r|0;for(;t--;)e+=xh[Math.random()*64|0];return e};var Ah={nanoid:Eh};let{existsSync:Mh,readFileSync:Ih}=ye,{dirname:yr,join:Nh}=ye,{SourceMapConsumer:Pn,SourceMapGenerator:Fn}=ye;function Rh(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}let Hr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=yr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Pn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return Rh(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}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 s=e.lastIndexOf(t.pop()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=yr(e),Mh(e))return this.mapFile=e,Ih(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 s=t(e);if(s){let i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof Pn)return Fn.fromSourceMap(t).toString();if(t instanceof Fn)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 s=this.annotation;return e&&(s=Nh(yr(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ca=Hr;Hr.default=Hr;let{nanoid:Th}=Ah,{isAbsolute:Gr,resolve:jr}=ye,{SourceMapConsumer:Oh,SourceMapGenerator:Dh}=ye,{fileURLToPath:Bn,pathToFileURL:es}=ye,zn=Ni,$h=Ca,br=ye,wr=Symbol("lineToIndexCache"),kh=!!(Oh&&Dh),Wn=!!(jr&&Gr);function Un(r){if(r[wr])return r[wr];let e=r.css.split(`
|
|
32
|
+
`),t=new Array(e.length),s=0;for(let i=0,n=e.length;i<n;i++)t[i]=s,s+=e[i].length+1;return r[wr]=t,t}let $s=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&&(!Wn||/^\w+:\/\//.test(t.from)||Gr(t.from)?this.file=t.from:this.file=jr(t.from)),Wn&&kh){let s=new $h(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Th(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new zn(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new zn(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,i.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(es&&(c.input.url=es(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Un(this)[e-1]+t-1}fromOffset(e){let t=Un(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<t[o])n=o-1;else if(e>=t[o+1])i=o+1;else{i=o;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:jr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:i,line:s}));let a;Gr(o.source)?a=es(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||es(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Bn)c.file=Bn(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Js=$s;$s.default=$s;br&&br.registerInput&&br.registerInput($s);let xa=Ze,Ea,Aa,ct=class extends xa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="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 s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Ea(new Aa,this,e).stringify()}};ct.registerLazyResult=r=>{Ea=r};ct.registerProcessor=r=>{Aa=r};var Vt=ct;ct.default=ct;xa.registerRoot(ct);let kt={comma(r){return kt.split(r,[","],!0)},space(r){let e=[" ",`
|
|
33
|
+
`," "];return kt.split(r,e)},split(r,e,t){let s=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of r)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(i!==""&&s.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var Ma=kt;kt.default=kt;let Ia=Ze,_h=Ma,ks=class extends Ia{get selectors(){return _h.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var $i=ks;ks.default=ks;Ia.registerRule(ks);let Lh=Oi,Ph=Zs,Fh=Xs,Bh=Js,zh=Ca,Wh=Vt,Uh=$i;function _t(r,e){if(Array.isArray(r))return r.map(o=>_t(o));let i=r,{inputs:t}=i,s=qe(i,["inputs"]);if(t){e=[];for(let o of t){let l=re(M({},o),{__proto__:Bh.prototype});l.map&&(l.map=re(M({},l.map),{__proto__:zh.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=r.nodes.map(o=>_t(o,e))),s.source){let n=s.source,{inputId:o}=n,l=qe(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new Wh(s);if(s.type==="decl")return new Fh(s);if(s.type==="rule")return new Uh(s);if(s.type==="comment")return new Ph(s);if(s.type==="atrule")return new Lh(s);throw new Error("Unknown node type: "+r.type)}var Vh=_t;_t.default=_t;let{dirname:Cs,relative:Na,resolve:Ra,sep:Ta}=ye,{SourceMapConsumer:Oa,SourceMapGenerator:xs}=ye,{pathToFileURL:Vn}=ye,Hh=Js,Gh=!!(Oa&&xs),jh=!!(Cs&&Ra&&Na&&Ta),Yh=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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=`
|
|
34
34
|
`;this.css.includes(`\r
|
|
35
35
|
`)&&(t=`\r
|
|
36
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||
|
|
37
|
-
`),t=
|
|
38
|
-
`.charCodeAt(0),pt=" ".charCodeAt(0),Kt="\f".charCodeAt(0),qt=" ".charCodeAt(0),Qt="\r".charCodeAt(0),uh="[".charCodeAt(0),hh="]".charCodeAt(0),fh="(".charCodeAt(0),dh=")".charCodeAt(0),ph="{".charCodeAt(0),mh="}".charCodeAt(0),gh=";".charCodeAt(0),yh="*".charCodeAt(0),bh=":".charCodeAt(0),wh="@".charCodeAt(0),es=/[\t\n\f\r "#'()/;[\\\]{}]/g,ts=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vh=/.[\r\n"'(/\\]/,Dn=/[\da-f]/i;var Sh=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,c,u,h,f,m,p,y=s.length,d=0,g=[],S=[];function v(){return d}function b(O){throw e.error("Unclosed "+O,d)}function C(){return S.length===0&&d>=y}function E(O){if(S.length)return S.pop();if(d>=y)return;let U=O?O.ignoreUnclosed:!1;switch(o=s.charCodeAt(d),o){case Jt:case pt:case qt:case Qt:case Kt:{n=d;do n+=1,o=s.charCodeAt(n);while(o===pt||o===Jt||o===qt||o===Qt||o===Kt);p=["space",s.slice(d,n)],d=n-1;break}case uh:case hh:case ph:case mh:case bh:case gh:case dh:{let L=String.fromCharCode(o);p=[L,L,d];break}case fh:{if(f=g.length?g.pop()[1]:"",m=s.charCodeAt(d+1),f==="url"&&m!==hr&&m!==On&&m!==pt&&m!==Jt&&m!==qt&&m!==Kt&&m!==Qt){n=d;do{if(u=!1,n=s.indexOf(")",n+1),n===-1)if(i||U){n=d;break}else b("bracket");for(h=n;s.charCodeAt(h-1)===Xt;)h-=1,u=!u}while(u);p=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),l=s.slice(d,n+1),n===-1||vh.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case hr:case On:{a=o===hr?"'":'"',n=d;do{if(u=!1,n=s.indexOf(a,n+1),n===-1)if(i||U){n=d+1;break}else b("string");for(h=n;s.charCodeAt(h-1)===Xt;)h-=1,u=!u}while(u);p=["string",s.slice(d,n+1),d,n],d=n;break}case wh:{es.lastIndex=d+1,es.test(s),es.lastIndex===0?n=s.length-1:n=es.lastIndex-2,p=["at-word",s.slice(d,n+1),d,n],d=n;break}case Xt:{for(n=d,c=!0;s.charCodeAt(n+1)===Xt;)n+=1,c=!c;if(o=s.charCodeAt(n+1),c&&o!==Tn&&o!==pt&&o!==Jt&&o!==qt&&o!==Qt&&o!==Kt&&(n+=1,Dn.test(s.charAt(n)))){for(;Dn.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===pt&&(n+=1)}p=["word",s.slice(d,n+1),d,n],d=n;break}default:{o===Tn&&s.charCodeAt(d+1)===yh?(n=s.indexOf("*/",d+2)+1,n===0&&(i||U?n=s.length:b("comment")),p=["comment",s.slice(d,n+1),d,n],d=n):(ts.lastIndex=d+1,ts.test(s),ts.lastIndex===0?n=s.length-1:n=ts.lastIndex-2,p=["word",s.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function N(O){S.push(O)}return{back:N,endOfFile:C,nextToken:E,position:v}};let oa=Ve,As=class extends oa{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 Si=As;As.default=As;oa.registerAtRule(As);let aa=Ve,la,ca,it=class extends aa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new la(new ca,this,e).stringify()}};it.registerLazyResult=r=>{la=r};it.registerProcessor=r=>{ca=r};var _t=it;it.default=it;aa.registerRoot(it);let At={comma(r){return At.split(r,[","],!0)},space(r){let e=[" ",`
|
|
39
|
-
`," "];return At.split(r,e)},split(r,e,t){let s=[],i="",o=!1,n=0,a=!1,l="",c=!1;for(let u of r)c?c=!1:u==="\\"?c=!0:a?u===l&&(a=!1):u==='"'||u==="'"?(a=!0,l=u):u==="("?n+=1:u===")"?n>0&&(n-=1):n===0&&e.includes(u)&&(o=!0),o?(i!==""&&s.push(i.trim()),i="",o=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var ua=At;At.default=At;let ha=Ve,Ch=ua,Rs=class extends ha{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ch.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ci=Rs;Rs.default=Rs;ha.registerRule(Rs);let Eh=Vs,xh=Sh,Mh=Hs,Ih=Si,Ah=_t,kn=Ci;const $n={empty:!0,space:!0};function Rh(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let Nh=class{constructor(e){this.input=e,this.root=new Ah,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 Ih;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,o,n=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(s+=1,s===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,o;for(let[n,a]of e.entries()){if(s=a,i=s[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(s);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=s}return!1}comment(e){let t=new Mh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=xh(this.input)}decl(e,t){let s=new Eh;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||Rh(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){s.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(o[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let f=c;f>0;f--){let m=u[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(s.important=!0,s.raws.important=h,e=u)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=n.map(c=>c[1]).join(""),n=[]),this.raw(s,"value",n.concat(e),t),s.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="")}}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,s=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(s=c[0],l.push(c),s==="("||s==="[")o||(o=c),n.push(s==="("?")":"]");else if(a&&i&&s==="{")o||(o=c),n.push("}");else if(n.length===0)if(s===";")if(i){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(i=!0);else s===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,s,i){let o,n,a=s.length,l="",c=!0,u,h;for(let f=0;f<a;f+=1)o=s[f],n=o[0],n==="space"&&f===a-1&&!i?c=!1:n==="comment"?(h=s[f-1]?s[f-1][0]:"empty",u=s[f+1]?s[f+1][0]:"empty",!$n[h]&&!$n[u]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=s.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}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,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Oh=Nh;let Th=Ve,Dh=Oh,kh=Ws;function Ns(r,e){let t=new kh(r,e),s=new Dh(t);try{s.parse()}catch(i){throw i}return s.root}var Ei=Ns;Ns.default=Ns;Th.registerParse(Ns);let{isClean:ve,my:$h}=$t,_h=Yo,Lh=Us,Ph=Ve,Fh=wi;let _n=vi,Bh=Ei,Uh=_t;const zh={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},Wh={Once:!0,postcssPlugin:!0,prepare:!0},nt=0;function mt(r){return typeof r=="object"&&typeof r.then=="function"}function fa(r){let e=!1,t=zh[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,nt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,nt,t+"Exit"]:[t,t+"Exit"]}function Ln(r){let e;return r.type==="document"?e=["Document",nt,"DocumentExit"]:r.type==="root"?e=["Root",nt,"RootExit"]:e=fa(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Fr(r){return r[ve]=!1,r.nodes&&r.nodes.forEach(e=>Fr(e)),r}let Br={},ot=class da{constructor(e,t,s){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Fr(t);else if(t instanceof da||t instanceof _n)i=Fr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let o=Bh;s.syntax&&(o=s.syntax.parse),s.parser&&(o=s.parser),o.parse&&(o=o.parse);try{i=o(t,s)}catch(n){this.processed=!0,this.error=n}i&&!i[$h]&&Ph.rebuild(i)}this.result=new _n(e,i,s),this.helpers=ie(A({},Br),{postcss:Br,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?A(A({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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 s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Vh[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wh[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);else typeof t[s]=="function"&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(mt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];){e[ve]=!0;let t=[Ln(e)];for(;t.length>0;){let s=this.visitTick(t);if(mt(s))try{await s}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>s(o,this.helpers));await Promise.all(i)}else await s(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(s=>e.Once(s,this.helpers));return mt(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=Lh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new _h(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(mt(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[s,i]of e){this.result.lastPlugin=s;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(mt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!a[ve]){a[ve]=!0,e.push(Ln(a));return}t.iterator=0,delete s.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===nt){s.nodes&&s.nodes.length&&(s[ve]=!0,t.iterator=s.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ve]=!0;let t=fa(e);for(let s of t)if(s===nt)e.nodes&&e.each(i=>{i[ve]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ot.registerPostcss=r=>{Br=r};var pa=ot;ot.default=ot;Uh.registerLazyResult(ot);Fh.registerLazyResult(ot);let Hh=Yo,Gh=Us;let jh=Ei;const Yh=vi;let Ur=class{constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,o=Gh;this.result=new Yh(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Hh(o,i,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=jh;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Zh=Ur;Ur.default=Ur;let Xh=Zh,Jh=pa,Kh=wi,qh=_t,Rt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Xh(this,e,t):new Jh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qh=Rt;Rt.default=Rt;qh.registerProcessor(Rt);Kh.registerProcessor(Rt);let ef=Vs,tf=Vo,sf=Hs,rf=Si,nf=Ws,of=_t,af=Ci;function Nt(r,e){if(Array.isArray(r))return r.map(n=>Nt(n));let i=r,{inputs:t}=i,s=Ge(i,["inputs"]);if(t){e=[];for(let n of t){let a=ie(A({},n),{__proto__:nf.prototype});a.map&&(a.map=ie(A({},a.map),{__proto__:tf.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=r.nodes.map(n=>Nt(n,e))),s.source){let o=s.source,{inputId:n}=o,a=Ge(o,["inputId"]);s.source=a,n!=null&&(s.source.input=e[n])}if(s.type==="root")return new of(s);if(s.type==="decl")return new ef(s);if(s.type==="rule")return new af(s);if(s.type==="comment")return new sf(s);if(s.type==="atrule")return new rf(s);throw new Error("Unknown node type: "+r.type)}var lf=Nt;Nt.default=Nt;let cf=gi,ma=Vs,uf=pa,hf=Ve,xi=Qh,ff=Us,df=lf,ga=wi,pf=na,ya=Hs,ba=Si,mf=vi,gf=Ws,yf=Ei,bf=ua,wa=Ci,va=_t,wf=zs;function V(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new xi(r)}V.plugin=function(e,t){let s=!1;function i(...n){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
36
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Cs(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Oa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(s)))}}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(),jh&&Gh&&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=xs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new xs({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 xs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
37
|
+
`),t=l.length-n):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,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 s=this.opts.to?Cs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Cs(Ra(s,this.mapOpts.annotation)));let i=Na(s,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 Hh(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));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(Vn){let s=Vn(e).toString();return this.memoizedFileURLs.set(e,s),s}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;Ta==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Da=Yh;const vr="'".charCodeAt(0),Hn='"'.charCodeAt(0),ts="\\".charCodeAt(0),Gn="/".charCodeAt(0),ss=`
|
|
38
|
+
`.charCodeAt(0),wt=" ".charCodeAt(0),rs="\f".charCodeAt(0),is=" ".charCodeAt(0),ns="\r".charCodeAt(0),Zh="[".charCodeAt(0),Xh="]".charCodeAt(0),Jh="(".charCodeAt(0),qh=")".charCodeAt(0),Kh="{".charCodeAt(0),Qh="}".charCodeAt(0),ed=";".charCodeAt(0),td="*".charCodeAt(0),sd=":".charCodeAt(0),rd="@".charCodeAt(0),os=/[\t\n\f\r "#'()/;[\\\]{}]/g,as=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,id=/.[\r\n"'(/\\]/,jn=/[\da-f]/i;var nd=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function b(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case ss:case wt:case is:case ns:case rs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===wt||n===ss||n===is||n===ns||n===rs);u=["space",s.slice(p,a)],p=a-1;break}case Zh:case Xh:case Kh:case Qh:case sd:case ed:case qh:{let W=String.fromCharCode(n);u=[W,W,p];break}case Jh:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==vr&&f!==Hn&&f!==wt&&f!==ss&&f!==is&&f!==rs&&f!==ns){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(i||z){a=p;break}else b("bracket");for(d=a;s.charCodeAt(d-1)===ts;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||id.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case vr:case Hn:{c=n===vr?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(i||z){a=p+1;break}else b("string");for(d=a;s.charCodeAt(d-1)===ts;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case rd:{os.lastIndex=p+1,os.test(s),os.lastIndex===0?a=s.length-1:a=os.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case ts:{for(a=p,l=!0;s.charCodeAt(a+1)===ts;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Gn&&n!==wt&&n!==ss&&n!==is&&n!==ns&&n!==rs&&(a+=1,jn.test(s.charAt(a)))){for(;jn.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===wt&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Gn&&s.charCodeAt(p+1)===td?(a=s.indexOf("*/",p+2)+1,a===0&&(i||z?a=s.length:b("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(as.lastIndex=p+1,as.test(s),as.lastIndex===0?a=s.length-1:a=as.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let od=Oi,ad=Zs,ld=Xs,cd=Vt,Yn=$i,ud=nd;const Zn={empty:!0,space:!0};function hd(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let dd=class{constructor(e){this.input=e,this.root=new cd,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 od;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=i}return!1}comment(e){let t=new ad;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ud(this.input)}decl(e,t){let s=new ld;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||hd(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Yn;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,s=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&i&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(i){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(i=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,i){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!Zn[h]&&!Zn[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Yn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}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 fd=dd;let pd=Ze,md=Js,gd=fd;function _s(r,e){let t=new md(r,e),s=new gd(t);try{s.parse()}catch(i){throw i}return s.root}var ki=_s;_s.default=_s;pd.registerParse(_s);let Yr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}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 $a=Yr;Yr.default=Yr;let yd=$a,Zr=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new yd(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var _i=Zr;Zr.default=Zr;let bd=Ze,wd=Di,vd=Da,Sd=ki,Xn=_i,Cd=Vt,xd=js,{isClean:Se,my:Ed}=Ut;const Ad={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Md={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},Id={Once:!0,postcssPlugin:!0,prepare:!0},ut=0;function vt(r){return typeof r=="object"&&typeof r.then=="function"}function ka(r){let e=!1,t=Ad[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,ut,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,ut,t+"Exit"]:[t,t+"Exit"]}function Jn(r){let e;return r.type==="document"?e=["Document",ut,"DocumentExit"]:r.type==="root"?e=["Root",ut,"RootExit"]:e=ka(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Xr(r){return r[Se]=!1,r.nodes&&r.nodes.forEach(e=>Xr(e)),r}let Jr={},ht=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,s){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Xr(t);else if(t instanceof _a||t instanceof Xn)i=Xr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Sd;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{i=n(t,s)}catch(o){this.processed=!0,this.error=o}i&&!i[Ed]&&bd.rebuild(i)}this.result=new Xn(e,i,s),this.helpers=re(M({},Jr),{postcss:Jr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},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 s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Md[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Id[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);else typeof t[s]=="function"&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(vt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[Jn(e)];for(;t.length>0;){let s=this.visitTick(t);if(vt(s))try{await s}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>s(n,this.helpers));await Promise.all(i)}else await s(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(s=>e.Once(s,this.helpers));return vt(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=xd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new vd(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(vt(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[s,i]of e){this.result.lastPlugin=s;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(vt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Se]){l[Se]=!0,e.push(Jn(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ut){s.nodes&&s.nodes.length&&(s[Se]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Se]=!0;let t=ka(e);for(let s of t)if(s===ut)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ht.registerPostcss=r=>{Jr=r};var La=ht;ht.default=ht;Cd.registerLazyResult(ht);wd.registerLazyResult(ht);let Nd=Da,Rd=ki;const Td=_i;let Od=js;let qr=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=Rd;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,n=Od;this.result=new Td(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Nd(n,i,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Dd=qr;qr.default=qr;let $d=Di,kd=La,_d=Dd,Ld=Vt,Lt=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new _d(this,e,t):new kd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Pd=Lt;Lt.default=Lt;Ld.registerProcessor(Lt);$d.registerProcessor(Lt);let Pa=Oi,Fa=Zs,Fd=Ze,Bd=Ni,Ba=Xs,za=Di,zd=Vh,Wd=Js,Ud=La,Vd=Ma,Hd=Ys,Gd=ki,Li=Pd,jd=_i,Wa=Vt,Ua=$i,Yd=js,Zd=$a;function Y(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Li(r)}Y.plugin=function(e,t){let s=!1;function i(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
40
39
|
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:
|
|
41
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new xi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return V([i(l)]).process(n,a)},i};V.stringify=ff;V.parse=yf;V.fromJSON=df;V.list=bf;V.comment=r=>new ya(r);V.atRule=r=>new ba(r);V.decl=r=>new ma(r);V.rule=r=>new wa(r);V.root=r=>new va(r);V.document=r=>new ga(r);V.CssSyntaxError=cf;V.Declaration=ma;V.Container=hf;V.Processor=xi;V.Document=ga;V.Comment=ya;V.Warning=pf;V.AtRule=ba;V.Result=mf;V.Input=gf;V.Rule=wa;V.Root=va;V.Node=wf;uf.registerPostcss(V);var vf=V;V.default=V;const J=Tu(vf);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;const Pn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Sf(r){let e=Pn[r.tagName]?Pn[r.tagName]:r.tagName;return e==="link"&&r.attributes._cssText&&(e="style"),e}function Gs(r,e){const t=e==null?void 0:e.stylesWithHoverClass.get(r);if(t)return t;let s=r;try{s=J([Ru,Nu,Ou]).process(r).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(r,s),s}function Fn(){return{stylesWithHoverClass:new Map}}function Cf(r,e,t,s){const i=[];for(const l of r.childNodes)l.type===D.Text&&i.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=Gs(o.join(""),s));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const c=i[l];if(!t)c.textContent=o[l];else if(l<o.length-1){let u=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),p=n.substring(a).indexOf(m);if(f=p!==-1,f){u+=p;break}}f||(u+=o[l].length),c.textContent=n.substring(a,u),a=u}else c.textContent=n.substring(a)}}function Ef(r,e,t,s){const{doc:i,hackCss:o,cache:n}=s;r.childNodes.length?Cf(r,t,o,n):(o&&(t=Gs(t,n)),e.appendChild(i.createTextNode(t)))}function xf(r,e){var t;const{doc:s,hackCss:i,cache:o}=e;switch(r.type){case D.Document:return s.implementation.createDocument(null,"",null);case D.DocumentType:return s.implementation.createDocumentType(r.name||"html",r.publicId,r.systemId);case D.Element:{const n=Sf(r);let a;r.isSVG?a=s.createElementNS("http://www.w3.org/2000/svg",n):(r.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(r.tagName)&&s.defaultView.customElements.define(r.tagName,class extends s.defaultView.HTMLElement{}),a=s.createElement(n));const l={};for(const c in r.attributes){if(!Object.prototype.hasOwnProperty.call(r.attributes,c))continue;let u=r.attributes[c];if(!(n==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){l[c]=u;continue}if(typeof u=="string"){if(n==="style"&&c==="_cssText"){Ef(r,a,u,e);continue}else if(n==="textarea"&&c==="value"){a.appendChild(s.createTextNode(u)),r.childNodes=[];continue}}try{if(r.isSVG&&c==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")a.setAttribute("_"+c,u.toString());else if(n==="meta"&&r.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){a.setAttribute("csp-content",u.toString());continue}else n==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||n==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ci(r.attributes.href)==="js"||(n==="img"&&r.attributes.srcset&&r.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",r.attributes.srcset):a.setAttribute(c,u.toString()))}catch(h){}}}for(const c in l){const u=l[c];if(n==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),a.RRNodeType&&(a.rr_dataURL=u.toString())}else if(n==="img"&&c==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",r.attributes.src),h.src=u.toString())}if(c==="rr_width")a.style.setProperty("width",u.toString());else if(c==="rr_height")a.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")a.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?a.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?a.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?a.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?a.volume=u:c==="rr_open_mode"&&a.setAttribute("rr_open_mode",u)}if(r.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case D.Text:return r.isStyle&&i?s.createTextNode(Gs(r.textContent,o)):s.createTextNode(r.textContent);case D.CDATA:return s.createCDATASection(r.textContent);case D.Comment:return s.createComment(r.textContent);default:return null}}function Ct(r,e){const{doc:t,mirror:s,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(s.has(r.id)){const c=s.getNode(r.id),u=s.getMeta(c);if(hc(u,r))return s.getNode(r.id)}let l=xf(r,{doc:t,hackCss:o,cache:a});if(!l)return null;if(r.rootId&&s.getNode(r.rootId)!==t&&s.replace(r.rootId,t),r.type===D.Document&&(t.close(),t.open(),r.compatMode==="BackCompat"&&r.childNodes&&r.childNodes[0].type!==D.DocumentType&&(r.childNodes[0].type===D.Element&&"xmlns"in r.childNodes[0].attributes&&r.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),s.add(l,r),(r.type===D.Document||r.type===D.Element)&&!i)for(const c of r.childNodes){const u=Ct(c,{doc:t,mirror:s,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&wt(l)&&l.shadowRoot)l.shadowRoot.appendChild(u);else if(r.type===D.Document&&c.type==D.Element){const h=u;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(u),h.appendChild(f)):l.appendChild(u)}else l.appendChild(u);n&&n(u,c.id)}return l}function Mf(r,e){function t(s){e(s)}for(const s of r.getIds())r.has(s)&&t(r.getNode(s))}function If(r,e){const t=e.getMeta(r);if((t==null?void 0:t.type)!==D.Element)return;const s=r;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const o=t.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=o),i==="rr_scrollTop"&&(s.scrollTop=o)}}function Af(r,e){const{doc:t,onVisit:s,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new li}=e,l=Ct(r,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return Mf(a,c=>{s&&s(c),If(c,a)}),l}var Rf=Object.defineProperty,Nf=(r,e,t)=>e in r?Rf(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e,t)=>Nf(r,typeof e!="symbol"?e+"":e,t),Of=Object.defineProperty,Tf=(r,e,t)=>e in r?Of(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Bn=(r,e,t)=>Tf(r,typeof e!="symbol"?e+"":e,t);let Df=class{constructor(){Bn(this,"idNodeMap",new Map),Bn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function kf(){return new Df}const $f=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],_f=["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,Lf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(Lf.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();$f.includes(s)&&Sa.add(this)}};const Pf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){Pf.call(this,r,e,t)};function Un(){document.querySelectorAll("*").forEach(e=>{_f.forEach(t=>{e.hasAttribute(t)&&Sa.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Un():document.addEventListener("DOMContentLoaded",Un)}catch(r){}function Ff(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Bf(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var Mi={exports:{}},X=String,Ca=function(){return{isColorSupported:!1,reset:X,bold:X,dim:X,italic:X,underline:X,inverse:X,hidden:X,strikethrough:X,black:X,red:X,green:X,yellow:X,blue:X,magenta:X,cyan:X,white:X,gray:X,bgBlack:X,bgRed:X,bgGreen:X,bgYellow:X,bgBlue:X,bgMagenta:X,bgCyan:X,bgWhite:X}};Mi.exports=Ca();Mi.exports.createColors=Ca;var Uf=Mi.exports;const zf={},Vf=Object.freeze(Object.defineProperty({__proto__:null,default:zf},Symbol.toStringTag,{value:"Module"})),ge=Bf(Vf);let zn=Uf,Vn=ge,zr=class Ea extends Error{constructor(e,t,s,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.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=zn.isColorSupported),Vn&&e&&(t=Vn(t));let s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),n=String(o).length,a,l;if(e){let{bold:c,gray:u,red:h}=zn.createColors(!0);a=f=>c(h(f)),l=f=>u(f)}else a=l=c=>c;return s.slice(i,o).map((c,u)=>{let h=i+1+u,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+c+`
|
|
42
|
-
`+
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Li().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return Y([i(a)]).process(o,l)},i};Y.stringify=Yd;Y.parse=Gd;Y.fromJSON=zd;Y.list=Vd;Y.comment=r=>new Fa(r);Y.atRule=r=>new Pa(r);Y.decl=r=>new Ba(r);Y.rule=r=>new Ua(r);Y.root=r=>new Wa(r);Y.document=r=>new za(r);Y.CssSyntaxError=Bd;Y.Declaration=Ba;Y.Container=Fd;Y.Processor=Li;Y.Document=za;Y.Comment=Fa;Y.Warning=Zd;Y.AtRule=Pa;Y.Result=jd;Y.Input=Wd;Y.Rule=Ua;Y.Root=Wa;Y.Node=Hd;Ud.registerPostcss(Y);var Xd=Y;Y.default=Y;const Q=lh(Xd);Q.stringify;Q.fromJSON;Q.plugin;Q.parse;Q.list;Q.document;Q.comment;Q.atRule;Q.rule;Q.decl;Q.root;Q.CssSyntaxError;Q.Declaration;Q.Container;Q.Processor;Q.Document;Q.Comment;Q.Warning;Q.AtRule;Q.Result;Q.Input;Q.Rule;Q.Root;Q.Node;const qn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Jd(r){let e=qn[r.tagName]?qn[r.tagName]:r.tagName;return e==="link"&&r.attributes._cssText&&(e="style"),e}function qs(r,e){const t=e==null?void 0:e.stylesWithHoverClass.get(r);if(t)return t;let s=r;try{s=Q([nh,oh,ah]).process(r).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(r,s),s}function Kn(){return{stylesWithHoverClass:new Map}}function qd(r,e,t,s){const i=[];for(const a of r.childNodes)a.type===k.Text&&i.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=qs(n.join(""),s));let l=0;for(let a=0;a<i.length&&a!==n.length;a++){const c=i[a];if(!t)c.textContent=n[a];else if(a<n.length-1){let u=l,h=n[a+1].length;h=Math.min(h,30);let d=!1;for(;h>2;h--){const f=n[a+1].substring(0,h),m=o.substring(l).indexOf(f);if(d=m!==-1,d){u+=m;break}}d||(u+=n[a].length),c.textContent=o.substring(l,u),l=u}else c.textContent=o.substring(l)}}function Kd(r,e,t,s){const{doc:i,hackCss:n,cache:o}=s;r.childNodes.length?qd(r,t,n,o):(n&&(t=qs(t,o)),e.appendChild(i.createTextNode(t)))}function Qd(r,e){var t;const{doc:s,hackCss:i,cache:n}=e;switch(r.type){case k.Document:return s.implementation.createDocument(null,"",null);case k.DocumentType:return s.implementation.createDocumentType(r.name||"html",r.publicId,r.systemId);case k.Element:{const o=Jd(r);let l;r.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(r.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(r.tagName)&&s.defaultView.customElements.define(r.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const a={};for(const c in r.attributes){if(!Object.prototype.hasOwnProperty.call(r.attributes,c))continue;let u=r.attributes[c];if(!(o==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){a[c]=u;continue}if(typeof u=="string"){if(o==="style"&&c==="_cssText"){Kd(r,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(s.createTextNode(u)),r.childNodes=[];continue}}try{if(r.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,u.toString());else if(o==="meta"&&r.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||o==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&Si(r.attributes.href)==="js"||(o==="img"&&r.attributes.srcset&&r.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",r.attributes.srcset):l.setAttribute(c,u.toString()))}catch(h){}}}for(const c in a){const u=a[c];if(o==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),l.RRNodeType&&(l.rr_dataURL=u.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",r.attributes.src),h.src=u.toString())}if(c==="rr_width")l.style.setProperty("width",u.toString());else if(c==="rr_height")l.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")l.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?l.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?l.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?l.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?l.volume=u:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",u)}if(r.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case k.Text:return r.isStyle&&i?s.createTextNode(qs(r.textContent,n)):s.createTextNode(r.textContent);case k.CDATA:return s.createCDATASection(r.textContent);case k.Comment:return s.createComment(r.textContent);default:return null}}function Rt(r,e){const{doc:t,mirror:s,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(s.has(r.id)){const c=s.getNode(r.id),u=s.getMeta(c);if(Bc(u,r))return s.getNode(r.id)}let a=Qd(r,{doc:t,hackCss:n,cache:l});if(!a)return null;if(r.rootId&&s.getNode(r.rootId)!==t&&s.replace(r.rootId,t),r.type===k.Document&&(t.close(),t.open(),r.compatMode==="BackCompat"&&r.childNodes&&r.childNodes[0].type!==k.DocumentType&&(r.childNodes[0].type===k.Element&&"xmlns"in r.childNodes[0].attributes&&r.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),s.add(a,r),(r.type===k.Document||r.type===k.Element)&&!i)for(const c of r.childNodes){const u=Rt(c,{doc:t,mirror:s,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&Mt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(r.type===k.Document&&c.type==k.Element){const h=u;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),a.appendChild(u),h.appendChild(d)):a.appendChild(u)}else a.appendChild(u);o&&o(u,c.id)}return a}function ef(r,e){function t(s){e(s)}for(const s of r.getIds())r.has(s)&&t(r.getNode(s))}function tf(r,e){const t=e.getMeta(r);if((t==null?void 0:t.type)!==k.Element)return;const s=r;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=n),i==="rr_scrollTop"&&(s.scrollTop=n)}}function sf(r,e){const{doc:t,onVisit:s,hackCss:i=!0,afterAppend:n,cache:o,mirror:l=new vi}=e,a=Rt(r,{doc:t,mirror:l,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return ef(l,c=>{s&&s(c),tf(c,l)}),a}var rf=Object.defineProperty,nf=(r,e,t)=>e in r?rf(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,A=(r,e,t)=>nf(r,typeof e!="symbol"?e+"":e,t),of=Object.defineProperty,af=(r,e,t)=>e in r?of(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Sr=(r,e,t)=>af(r,typeof e!="symbol"?e+"":e,t);let lf=class{constructor(){Sr(this,"idNodeMap",new Map),Sr(this,"nodeMetaMap",new WeakMap),Sr(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.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 s=t.id;if(this.idNodeMap.set(s,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 s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(s),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 cf(){return new lf}const uf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],hf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Va=new WeakSet,df=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(df.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();uf.includes(s)&&Va.add(this)}};const ff=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){ff.call(this,r,e,t)};function Qn(){document.querySelectorAll("*").forEach(e=>{hf.forEach(t=>{e.hasAttribute(t)&&Va.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Qn():document.addEventListener("DOMContentLoaded",Qn)}catch(r){}function pf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mf(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var Pi={exports:{}},D=String,Ha=function(){return{isColorSupported:!1,reset:D,bold:D,dim:D,italic:D,underline:D,inverse:D,hidden:D,strikethrough:D,black:D,red:D,green:D,yellow:D,blue:D,magenta:D,cyan:D,white:D,gray:D,bgBlack:D,bgRed:D,bgGreen:D,bgYellow:D,bgBlue:D,bgMagenta:D,bgCyan:D,bgWhite:D,blackBright:D,redBright:D,greenBright:D,yellowBright:D,blueBright:D,magentaBright:D,cyanBright:D,whiteBright:D,bgBlackBright:D,bgRedBright:D,bgGreenBright:D,bgYellowBright:D,bgBlueBright:D,bgMagentaBright:D,bgCyanBright:D,bgWhiteBright:D}};Pi.exports=Ha();Pi.exports.createColors=Ha;var gf=Pi.exports;const yf={},bf=Object.freeze(Object.defineProperty({__proto__:null,default:yf},Symbol.toStringTag,{value:"Module"})),be=mf(bf);let eo=gf,to=be,Kr=class Ga extends Error{constructor(e,t,s,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ga)}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=eo.isColorSupported);let s=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=eo.createColors(!0);i=f=>u(d(f)),s=f=>h(f),to&&(n=f=>to(f))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,f=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,p=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),S=u.slice(p,g),v=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return i(">")+s(f)+n(S)+`
|
|
41
|
+
`+v+i("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(f)+n(u)+`
|
|
42
|
+
`+m+i("^")}return" "+s(f)+n(u)}).join(`
|
|
43
43
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
44
44
|
|
|
45
45
|
`+e+`
|
|
46
|
-
`),this.name+": "+this.message+e}};var
|
|
46
|
+
`),this.name+": "+this.message+e}};var Fi=Kr;Kr.default=Kr;const so={after:`
|
|
47
47
|
`,beforeClose:`
|
|
48
48
|
`,beforeComment:`
|
|
49
49
|
`,beforeDecl:`
|
|
50
50
|
`,beforeOpen:" ",beforeRule:`
|
|
51
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
52
|
-
`)){let
|
|
51
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wf(r){return r[0].toUpperCase()+r.slice(1)}let Qr=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
|
|
52
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),i=e.prop+s+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,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return so[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]!="undefined")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+wf(s);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=so[s]),o.rawCache[s]=i,i}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return t=s.raws.after,t.includes(`
|
|
53
53
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
54
54
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
55
55
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before!="undefined")return t=s.raws.before,t.includes(`
|
|
56
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before!="undefined"){let
|
|
57
|
-
`);return t=
|
|
58
|
-
`?(
|
|
59
|
-
`);s=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)s[a]=n,n+=o[a].length+1;this[pr]=s}t=s[s.length-1];let i=0;if(e>=t)i=s.length-1;else{let o=s.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<s[n])o=n-1;else if(e>=s[n+1])i=n+1;else{i=n;break}}return{col:e-s[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Xr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof s=="number"&&(a=o.originalPositionFor({column:i,line:s}));let l;Zr(n.source)?l=rs(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||rs(this.map.mapFile));let c={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(jn)c.file=jn(l);else throw new Error("file: protocol is not available in this PostCSS build");let u=o.sourceContentFor(n.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Xs=Os;Os.default=Os;dr&&dr.registerInput&&dr.registerInput(Os);let{SourceMapConsumer:Ia,SourceMapGenerator:bs}=ge,{dirname:ws,relative:Aa,resolve:Ra,sep:Na}=ge,{pathToFileURL:Xn}=ge,cd=Xs,ud=!!(Ia&&bs),hd=!!(ws&&Ra&&Aa&&Na),fd=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
57
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],i=e.raws[t];return i&&i.value===s?i.raw:s}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 ja=Qr;Qr.default=Qr;let vf=ja;function ei(r,e){new vf(e).stringify(r)}var Ks=ei;ei.default=ei;var Ht={};Ht.isClean=Symbol("isClean");Ht.my=Symbol("my");let Sf=Fi,Cf=ja,xf=Ks,{isClean:St,my:Ef}=Ht;function ti(r,e){let t=new r.constructor;for(let s in r){if(!Object.prototype.hasOwnProperty.call(r,s)||s==="proxyCache")continue;let i=r[s],n=typeof i;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=i:Array.isArray(i)?t[s]=i.map(o=>ti(o,t)):(n==="object"&&i!==null&&(i=ti(i)),t[s]=i)}return t}function Me(r,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,i=0;for(let n=0;n<r.length;n++){if(s===e.line&&t===e.column){i=n;break}r[n]===`
|
|
58
|
+
`?(t=1,s+=1):t+=1}return i}let si=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[St]=!1,this[Ef]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=ti(this);for(let s in e)t[s]=e[s];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:s,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new Sf(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[St]=!0}markDirty(){if(this[St]){this[St]=!1;let e=this;for(;e=e.parent;)e[St]=!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 s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(Me(s,this.source.start),Me(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Me(i,this.source.start),o=n+e;for(let l=n;l<o;l++)i[l]===`
|
|
59
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}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,s={column:this.source.start.column,line:this.source.start.line,offset:Me(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:Me(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Me(t,this.source.start),Me(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Me(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Me(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new Cf().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,s=!1;for(let i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return i&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=xf){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var Qs=si;si.default=si;let Af=Qs,ri=class extends Af{constructor(e){super(e),this.type="comment"}};var er=ri;ri.default=ri;let Mf=Qs,ii=class extends Mf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var tr=ii;ii.default=ii;let Ya=er,Za=tr,If=Qs,{isClean:Xa,my:Ja}=Ht,Bi,qa,Ka,zi;function Qa(r){return r.map(e=>(e.nodes&&(e.nodes=Qa(e.nodes)),delete e.source,e))}function el(r){if(r[Xa]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)el(e)}let Te=class tl extends If{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 s=this.normalize(t,this.last);for(let i of s)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(),s,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],i=e(this.proxyOf.nodes[s],s),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")?(...s)=>e[t](...s.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?s=>e[t]((i,...n)=>s(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(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 s=this.index(e),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of i)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),i=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Qa(qa(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 Za(e)]}else if(e.selector||e.selectors)e=[new zi(e)];else if(e.name)e=[new Bi(e)];else if(e.text)e=[new Ya(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ja]||tl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Xa]&&el(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 s=this.normalize(t,this.first,"prepend").reverse();for(let i of s)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let i;try{i=e(t,s)}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((s,i)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,i)}):this.walk((s,i)=>{if(s.type==="atrule"&&s.name===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="atrule")return t(s,i)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,i)}):this.walk((s,i)=>{if(s.type==="decl"&&s.prop===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="decl")return t(s,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,i)}):this.walk((s,i)=>{if(s.type==="rule"&&s.selector===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="rule")return t(s,i)}))}};Te.registerParse=r=>{qa=r};Te.registerRule=r=>{zi=r};Te.registerAtRule=r=>{Bi=r};Te.registerRoot=r=>{Ka=r};var Xe=Te;Te.default=Te;Te.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Bi.prototype):r.type==="rule"?Object.setPrototypeOf(r,zi.prototype):r.type==="decl"?Object.setPrototypeOf(r,Za.prototype):r.type==="comment"?Object.setPrototypeOf(r,Ya.prototype):r.type==="root"&&Object.setPrototypeOf(r,Ka.prototype),r[Ja]=!0,r.nodes&&r.nodes.forEach(e=>{Te.rebuild(e)})};let sl=Xe,Ls=class extends sl{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 Wi=Ls;Ls.default=Ls;sl.registerAtRule(Ls);let Nf=Xe,rl,il,Pt=class extends Nf{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new rl(new il,this,e).stringify()}};Pt.registerLazyResult=r=>{rl=r};Pt.registerProcessor=r=>{il=r};var Ui=Pt;Pt.default=Pt;let Rf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Tf=(r=21)=>{let e="",t=r|0;for(;t--;)e+=Rf[Math.random()*64|0];return e};var Of={nanoid:Tf};let{existsSync:Df,readFileSync:$f}=be,{dirname:Cr,join:kf}=be,{SourceMapConsumer:ro,SourceMapGenerator:io}=be;function _f(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}let ni=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Cr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ro(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return _f(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}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 s=e.lastIndexOf(t.pop()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=Cr(e),Df(e))return this.mapFile=e,$f(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 s=t(e);if(s){let i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof ro)return io.fromSourceMap(t).toString();if(t instanceof io)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 s=this.annotation;return e&&(s=kf(Cr(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var nl=ni;ni.default=ni;let{nanoid:Lf}=Of,{isAbsolute:oi,resolve:ai}=be,{SourceMapConsumer:Pf,SourceMapGenerator:Ff}=be,{fileURLToPath:no,pathToFileURL:ls}=be,oo=Fi,Bf=nl,xr=be,Er=Symbol("lineToIndexCache"),zf=!!(Pf&&Ff),ao=!!(ai&&oi);function lo(r){if(r[Er])return r[Er];let e=r.css.split(`
|
|
60
|
+
`),t=new Array(e.length),s=0;for(let i=0,n=e.length;i<n;i++)t[i]=s,s+=e[i].length+1;return r[Er]=t,t}let Ps=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&&(!ao||/^\w+:\/\//.test(t.from)||oi(t.from)?this.file=t.from:this.file=ai(t.from)),ao&&zf){let s=new Bf(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Lf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new oo(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new oo(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,i.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(ls&&(c.input.url=ls(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return lo(this)[e-1]+t-1}fromOffset(e){let t=lo(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<t[o])n=o-1;else if(e>=t[o+1])i=o+1;else{i=o;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ai(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:i,line:s}));let a;oi(o.source)?a=ls(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ls(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(no)c.file=no(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var sr=Ps;Ps.default=Ps;xr&&xr.registerInput&&xr.registerInput(Ps);let ol=Xe,al,ll,dt=class extends ol{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="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 s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new al(new ll,this,e).stringify()}};dt.registerLazyResult=r=>{al=r};dt.registerProcessor=r=>{ll=r};var Gt=dt;dt.default=dt;ol.registerRoot(dt);let Ft={comma(r){return Ft.split(r,[","],!0)},space(r){let e=[" ",`
|
|
61
|
+
`," "];return Ft.split(r,e)},split(r,e,t){let s=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of r)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(i!==""&&s.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var cl=Ft;Ft.default=Ft;let ul=Xe,Wf=cl,Fs=class extends ul{get selectors(){return Wf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Vi=Fs;Fs.default=Fs;ul.registerRule(Fs);let Uf=Wi,Vf=er,Hf=tr,Gf=sr,jf=nl,Yf=Gt,Zf=Vi;function Bt(r,e){if(Array.isArray(r))return r.map(o=>Bt(o));let i=r,{inputs:t}=i,s=qe(i,["inputs"]);if(t){e=[];for(let o of t){let l=re(M({},o),{__proto__:Gf.prototype});l.map&&(l.map=re(M({},l.map),{__proto__:jf.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=r.nodes.map(o=>Bt(o,e))),s.source){let n=s.source,{inputId:o}=n,l=qe(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new Yf(s);if(s.type==="decl")return new Hf(s);if(s.type==="rule")return new Zf(s);if(s.type==="comment")return new Vf(s);if(s.type==="atrule")return new Uf(s);throw new Error("Unknown node type: "+r.type)}var Xf=Bt;Bt.default=Bt;let{dirname:Es,relative:hl,resolve:dl,sep:fl}=be,{SourceMapConsumer:pl,SourceMapGenerator:As}=be,{pathToFileURL:co}=be,Jf=sr,qf=!!(pl&&As),Kf=!!(Es&&dl&&hl&&fl),Qf=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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=`
|
|
60
62
|
`;this.css.includes(`\r
|
|
61
63
|
`)&&(t=`\r
|
|
62
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||
|
|
63
|
-
`),t=
|
|
64
|
-
`.charCodeAt(0),gt=" ".charCodeAt(0),os="\f".charCodeAt(0),as=" ".charCodeAt(0),ls="\r".charCodeAt(0),yd="[".charCodeAt(0),bd="]".charCodeAt(0),wd="(".charCodeAt(0),vd=")".charCodeAt(0),Sd="{".charCodeAt(0),Cd="}".charCodeAt(0),Ed=";".charCodeAt(0),xd="*".charCodeAt(0),Md=":".charCodeAt(0),Id="@".charCodeAt(0),cs=/[\t\n\f\r "#'()/;[\\\]{}]/g,us=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ad=/.[\r\n"'(/\\]/,qn=/[\da-f]/i;var Rd=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,c,u,h,f,m,p,y=s.length,d=0,g=[],S=[];function v(){return d}function b(O){throw e.error("Unclosed "+O,d)}function C(){return S.length===0&&d>=y}function E(O){if(S.length)return S.pop();if(d>=y)return;let U=O?O.ignoreUnclosed:!1;switch(o=s.charCodeAt(d),o){case ns:case gt:case as:case ls:case os:{n=d;do n+=1,o=s.charCodeAt(n);while(o===gt||o===ns||o===as||o===ls||o===os);p=["space",s.slice(d,n)],d=n-1;break}case yd:case bd:case Sd:case Cd:case Md:case Ed:case vd:{let L=String.fromCharCode(o);p=[L,L,d];break}case wd:{if(f=g.length?g.pop()[1]:"",m=s.charCodeAt(d+1),f==="url"&&m!==mr&&m!==Jn&&m!==gt&&m!==ns&&m!==as&&m!==os&&m!==ls){n=d;do{if(u=!1,n=s.indexOf(")",n+1),n===-1)if(i||U){n=d;break}else b("bracket");for(h=n;s.charCodeAt(h-1)===is;)h-=1,u=!u}while(u);p=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),l=s.slice(d,n+1),n===-1||Ad.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case mr:case Jn:{a=o===mr?"'":'"',n=d;do{if(u=!1,n=s.indexOf(a,n+1),n===-1)if(i||U){n=d+1;break}else b("string");for(h=n;s.charCodeAt(h-1)===is;)h-=1,u=!u}while(u);p=["string",s.slice(d,n+1),d,n],d=n;break}case Id:{cs.lastIndex=d+1,cs.test(s),cs.lastIndex===0?n=s.length-1:n=cs.lastIndex-2,p=["at-word",s.slice(d,n+1),d,n],d=n;break}case is:{for(n=d,c=!0;s.charCodeAt(n+1)===is;)n+=1,c=!c;if(o=s.charCodeAt(n+1),c&&o!==Kn&&o!==gt&&o!==ns&&o!==as&&o!==ls&&o!==os&&(n+=1,qn.test(s.charAt(n)))){for(;qn.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===gt&&(n+=1)}p=["word",s.slice(d,n+1),d,n],d=n;break}default:{o===Kn&&s.charCodeAt(d+1)===xd?(n=s.indexOf("*/",d+2)+1,n===0&&(i||U?n=s.length:b("comment")),p=["comment",s.slice(d,n+1),d,n],d=n):(us.lastIndex=d+1,us.test(s),us.lastIndex===0?n=s.length-1:n=us.lastIndex-2,p=["word",s.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function N(O){S.push(O)}return{back:N,endOfFile:C,nextToken:E,position:v}};let Wa=We,Ts=class extends Wa{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 Ti=Ts;Ts.default=Ts;Wa.registerAtRule(Ts);let Ha=We,Ga,ja,at=class extends Ha{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Ga(new ja,this,e).stringify()}};at.registerLazyResult=r=>{Ga=r};at.registerProcessor=r=>{ja=r};var Pt=at;at.default=at;Ha.registerRoot(at);let Tt={comma(r){return Tt.split(r,[","],!0)},space(r){let e=[" ",`
|
|
65
|
-
`," "];return Tt.split(r,e)},split(r,e,t){let s=[],i="",o=!1,n=0,a=!1,l="",c=!1;for(let u of r)c?c=!1:u==="\\"?c=!0:a?u===l&&(a=!1):u==='"'||u==="'"?(a=!0,l=u):u==="("?n+=1:u===")"?n>0&&(n-=1):n===0&&e.includes(u)&&(o=!0),o?(i!==""&&s.push(i.trim()),i="",o=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var Ya=Tt;Tt.default=Tt;let Za=We,Nd=Ya,Ds=class extends Za{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Nd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Di=Ds;Ds.default=Ds;Za.registerRule(Ds);let Od=Zs,Td=Rd,Dd=Js,kd=Ti,$d=Pt,Qn=Di;const eo={empty:!0,space:!0};function _d(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let Ld=class{constructor(e){this.input=e,this.root=new $d,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 kd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,o,n=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(s+=1,s===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,o;for(let[n,a]of e.entries()){if(s=a,i=s[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(s);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=s}return!1}comment(e){let t=new Dd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Td(this.input)}decl(e,t){let s=new Od;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||_d(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){s.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(o[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let f=c;f>0;f--){let m=u[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(s.important=!0,s.raws.important=h,e=u)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=n.map(c=>c[1]).join(""),n=[]),this.raw(s,"value",n.concat(e),t),s.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 Qn;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="")}}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,s=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(s=c[0],l.push(c),s==="("||s==="[")o||(o=c),n.push(s==="("?")":"]");else if(a&&i&&s==="{")o||(o=c),n.push("}");else if(n.length===0)if(s===";")if(i){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(i=!0);else s===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,s,i){let o,n,a=s.length,l="",c=!0,u,h;for(let f=0;f<a;f+=1)o=s[f],n=o[0],n==="space"&&f===a-1&&!i?c=!1:n==="comment"?(h=s[f-1]?s[f-1][0]:"empty",u=s[f+1]?s[f+1][0]:"empty",!eo[h]&&!eo[u]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=s.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Qn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Pd=Ld;let Fd=We,Bd=Pd,Ud=Xs;function ks(r,e){let t=new Ud(r,e),s=new Bd(t);try{s.parse()}catch(i){throw i}return s.root}var ki=ks;ks.default=ks;Fd.registerParse(ks);let{isClean:Se,my:zd}=Lt,Vd=Oa,Wd=js,Hd=We,Gd=Ni;let to=Oi,jd=ki,Yd=Pt;const Zd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xd={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},Jd={Once:!0,postcssPlugin:!0,prepare:!0},lt=0;function yt(r){return typeof r=="object"&&typeof r.then=="function"}function Xa(r){let e=!1,t=Zd[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,lt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,lt,t+"Exit"]:[t,t+"Exit"]}function so(r){let e;return r.type==="document"?e=["Document",lt,"DocumentExit"]:r.type==="root"?e=["Root",lt,"RootExit"]:e=Xa(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Qr(r){return r[Se]=!1,r.nodes&&r.nodes.forEach(e=>Qr(e)),r}let ei={},ct=class Ja{constructor(e,t,s){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Qr(t);else if(t instanceof Ja||t instanceof to)i=Qr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let o=jd;s.syntax&&(o=s.syntax.parse),s.parser&&(o=s.parser),o.parse&&(o=o.parse);try{i=o(t,s)}catch(n){this.processed=!0,this.error=n}i&&!i[zd]&&Hd.rebuild(i)}this.result=new to(e,i,s),this.helpers=ie(A({},ei),{postcss:ei,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?A(A({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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 s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Xd[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Jd[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);else typeof t[s]=="function"&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(yt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[so(e)];for(;t.length>0;){let s=this.visitTick(t);if(yt(s))try{await s}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>s(o,this.helpers));await Promise.all(i)}else await s(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(s=>e.Once(s,this.helpers));return yt(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=Wd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Vd(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(yt(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[s,i]of e){this.result.lastPlugin=s;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(yt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!a[Se]){a[Se]=!0,e.push(so(a));return}t.iterator=0,delete s.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===lt){s.nodes&&s.nodes.length&&(s[Se]=!0,t.iterator=s.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Se]=!0;let t=Xa(e);for(let s of t)if(s===lt)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ct.registerPostcss=r=>{ei=r};var Ka=ct;ct.default=ct;Yd.registerLazyResult(ct);Gd.registerLazyResult(ct);let Kd=Oa,qd=js;let Qd=ki;const ep=Oi;let ti=class{constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,o=qd;this.result=new ep(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Kd(o,i,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Qd;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var tp=ti;ti.default=ti;let sp=tp,rp=Ka,ip=Ni,np=Pt,Dt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new sp(this,e,t):new rp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var op=Dt;Dt.default=Dt;np.registerProcessor(Dt);ip.registerProcessor(Dt);let ap=Zs,lp=Ma,cp=Js,up=Ti,hp=Xs,fp=Pt,dp=Di;function kt(r,e){if(Array.isArray(r))return r.map(n=>kt(n));let i=r,{inputs:t}=i,s=Ge(i,["inputs"]);if(t){e=[];for(let n of t){let a=ie(A({},n),{__proto__:hp.prototype});a.map&&(a.map=ie(A({},a.map),{__proto__:lp.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=r.nodes.map(n=>kt(n,e))),s.source){let o=s.source,{inputId:n}=o,a=Ge(o,["inputId"]);s.source=a,n!=null&&(s.source.input=e[n])}if(s.type==="root")return new fp(s);if(s.type==="decl")return new ap(s);if(s.type==="rule")return new dp(s);if(s.type==="comment")return new cp(s);if(s.type==="atrule")return new up(s);throw new Error("Unknown node type: "+r.type)}var pp=kt;kt.default=kt;let mp=Ii,qa=Zs,gp=Ka,yp=We,$i=op,bp=js,wp=pp,Qa=Ni,vp=Va,el=Js,tl=Ti,Sp=Oi,Cp=Xs,Ep=ki,xp=Ya,sl=Di,rl=Pt,Mp=Ys;function W(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new $i(r)}W.plugin=function(e,t){let s=!1;function i(...n){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
64
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Es(e.file),i;this.mapOpts.sourcesContent===!1?(i=new pl(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(s)))}}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(),Kf&&qf&&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=As.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new As({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 As({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
65
|
+
`),t=l.length-n):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,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 s=this.opts.to?Es(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Es(dl(s,this.mapOpts.annotation)));let i=hl(s,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 Jf(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));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(co){let s=co(e).toString();return this.memoizedFileURLs.set(e,s),s}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;fl==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var ml=Qf;const Ar="'".charCodeAt(0),uo='"'.charCodeAt(0),cs="\\".charCodeAt(0),ho="/".charCodeAt(0),us=`
|
|
66
|
+
`.charCodeAt(0),Ct=" ".charCodeAt(0),hs="\f".charCodeAt(0),ds=" ".charCodeAt(0),fs="\r".charCodeAt(0),ep="[".charCodeAt(0),tp="]".charCodeAt(0),sp="(".charCodeAt(0),rp=")".charCodeAt(0),ip="{".charCodeAt(0),np="}".charCodeAt(0),op=";".charCodeAt(0),ap="*".charCodeAt(0),lp=":".charCodeAt(0),cp="@".charCodeAt(0),ps=/[\t\n\f\r "#'()/;[\\\]{}]/g,ms=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,up=/.[\r\n"'(/\\]/,fo=/[\da-f]/i;var hp=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function b(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case us:case Ct:case ds:case fs:case hs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Ct||n===us||n===ds||n===fs||n===hs);u=["space",s.slice(p,a)],p=a-1;break}case ep:case tp:case ip:case np:case lp:case op:case rp:{let W=String.fromCharCode(n);u=[W,W,p];break}case sp:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Ar&&f!==uo&&f!==Ct&&f!==us&&f!==ds&&f!==hs&&f!==fs){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(i||z){a=p;break}else b("bracket");for(d=a;s.charCodeAt(d-1)===cs;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||up.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Ar:case uo:{c=n===Ar?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(i||z){a=p+1;break}else b("string");for(d=a;s.charCodeAt(d-1)===cs;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case cp:{ps.lastIndex=p+1,ps.test(s),ps.lastIndex===0?a=s.length-1:a=ps.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case cs:{for(a=p,l=!0;s.charCodeAt(a+1)===cs;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==ho&&n!==Ct&&n!==us&&n!==ds&&n!==fs&&n!==hs&&(a+=1,fo.test(s.charAt(a)))){for(;fo.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Ct&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===ho&&s.charCodeAt(p+1)===ap?(a=s.indexOf("*/",p+2)+1,a===0&&(i||z?a=s.length:b("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(ms.lastIndex=p+1,ms.test(s),ms.lastIndex===0?a=s.length-1:a=ms.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let dp=Wi,fp=er,pp=tr,mp=Gt,po=Vi,gp=hp;const mo={empty:!0,space:!0};function yp(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let bp=class{constructor(e){this.input=e,this.root=new mp,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 dp;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=i}return!1}comment(e){let t=new fp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=gp(this.input)}decl(e,t){let s=new pp;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||yp(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 po;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,s=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&i&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(i){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(i=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,i){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!mo[h]&&!mo[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new po;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}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 wp=bp;let vp=Xe,Sp=sr,Cp=wp;function Bs(r,e){let t=new Sp(r,e),s=new Cp(t);try{s.parse()}catch(i){throw i}return s.root}var Hi=Bs;Bs.default=Bs;vp.registerParse(Bs);let li=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}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 gl=li;li.default=li;let xp=gl,ci=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new xp(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Gi=ci;ci.default=ci;let Ep=Xe,Ap=Ui,Mp=ml,Ip=Hi,go=Gi,Np=Gt,Rp=Ks,{isClean:Ce,my:Tp}=Ht;const Op={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Dp={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},$p={Once:!0,postcssPlugin:!0,prepare:!0},ft=0;function xt(r){return typeof r=="object"&&typeof r.then=="function"}function yl(r){let e=!1,t=Op[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,ft,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,ft,t+"Exit"]:[t,t+"Exit"]}function yo(r){let e;return r.type==="document"?e=["Document",ft,"DocumentExit"]:r.type==="root"?e=["Root",ft,"RootExit"]:e=yl(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function ui(r){return r[Ce]=!1,r.nodes&&r.nodes.forEach(e=>ui(e)),r}let hi={},pt=class bl{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,s){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ui(t);else if(t instanceof bl||t instanceof go)i=ui(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Ip;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{i=n(t,s)}catch(o){this.processed=!0,this.error=o}i&&!i[Tp]&&Ep.rebuild(i)}this.result=new go(e,i,s),this.helpers=re(M({},hi),{postcss:hi,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},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 s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Dp[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$p[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);else typeof t[s]=="function"&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(xt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ce];){e[Ce]=!0;let t=[yo(e)];for(;t.length>0;){let s=this.visitTick(t);if(xt(s))try{await s}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>s(n,this.helpers));await Promise.all(i)}else await s(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(s=>e.Once(s,this.helpers));return xt(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=Rp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Mp(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(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ce];)e[Ce]=!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[s,i]of e){this.result.lastPlugin=s;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Ce]){l[Ce]=!0,e.push(yo(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ft){s.nodes&&s.nodes.length&&(s[Ce]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ce]=!0;let t=yl(e);for(let s of t)if(s===ft)e.nodes&&e.each(i=>{i[Ce]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pt.registerPostcss=r=>{hi=r};var wl=pt;pt.default=pt;Np.registerLazyResult(pt);Ap.registerLazyResult(pt);let kp=ml,_p=Hi;const Lp=Gi;let Pp=Ks;let di=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=_p;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,n=Pp;this.result=new Lp(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new kp(n,i,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Fp=di;di.default=di;let Bp=Ui,zp=wl,Wp=Fp,Up=Gt,zt=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Wp(this,e,t):new zp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vp=zt;zt.default=zt;Up.registerProcessor(zt);Bp.registerProcessor(zt);let vl=Wi,Sl=er,Hp=Xe,Gp=Fi,Cl=tr,xl=Ui,jp=Xf,Yp=sr,Zp=wl,Xp=cl,Jp=Qs,qp=Hi,ji=Vp,Kp=Gi,El=Gt,Al=Vi,Qp=Ks,em=gl;function Z(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new ji(r)}Z.plugin=function(e,t){let s=!1;function i(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
66
67
|
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 a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new $i().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return W([i(l)]).process(n,a)},i};W.stringify=bp;W.parse=Ep;W.fromJSON=wp;W.list=xp;W.comment=r=>new el(r);W.atRule=r=>new tl(r);W.decl=r=>new qa(r);W.rule=r=>new sl(r);W.root=r=>new rl(r);W.document=r=>new Qa(r);W.CssSyntaxError=mp;W.Declaration=qa;W.Container=yp;W.Processor=$i;W.Document=Qa;W.Comment=el;W.Warning=vp;W.AtRule=tl;W.Result=Sp;W.Input=Cp;W.Rule=sl;W.Root=rl;W.Node=Mp;gp.registerPostcss(W);var Ip=W;W.default=W;const q=Ff(Ip);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;var $=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))($||{});function Ap(r){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return r.replace(i,"").split(t).forEach(function(o){if(o){const n=o.split(s);n.length>1&&(e[si(n[0].trim())]=n[1].trim())}}),e}function ro(r){const e=[];for(const t in r){const s=r[t];if(typeof s!="string")continue;const i=Tp(t);e.push(`${i}: ${s};`)}return e.join(" ")}const Rp=/-([a-z])/g,Np=/^--[a-zA-Z0-9-]+$/,si=r=>Np.test(r)?r:r.replace(Rp,(e,t)=>t?t.toUpperCase():""),Op=/\B([A-Z])/g,Tp=r=>r.replace(Op,"-$1").toLowerCase();class ye{constructor(...e){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(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 ye){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"}}class _i extends ye{constructor(...e){super(e),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",$.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===$.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===$.Element||t===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Li(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=ll(this,e,t);return i.parentElement=null,i}removeChild(e){return cl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new _i}createDocumentType(e,t,s){const i=new il(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=new Ks(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new nl(e);return t.ownerDocument=this,t}createComment(e){const t=new ol(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new al(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class il extends ye{constructor(e,t,s){super(),M(this,"nodeType",10),M(this,"RRNodeType",$.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class Ks extends ye{constructor(e){super(),M(this,"nodeType",1),M(this,"RRNodeType",$.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new $p(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Ap(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,i,o)=>{if(t.test(s))return;const n=si(s);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=ro(e)},e.removeProperty=s=>{if(t.test(s))return"";const i=si(s),o=e[i]||"";return delete e[i],this.attributes.style=ro(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Li(this,e)}insertBefore(e,t){return ll(this,e,t)}removeChild(e){return cl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Dp extends Ks{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class kp extends Ks{constructor(){super(...arguments),M(this,"tagName","DIALOG"),M(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class nl extends ye{constructor(e){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",$.Text),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class ol extends ye{constructor(e){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",$.Comment),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class al extends ye{constructor(e){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",$.CDATA),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class $p{constructor(e,t){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...s)=>{for(const i of s){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),M(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function Li(r,e){return e.parentNode&&e.parentNode.removeChild(e),r.lastChild?(r.lastChild.nextSibling=e,e.previousSibling=r.lastChild):(r.firstChild=e,e.previousSibling=null),r.lastChild=e,e.nextSibling=null,e.parentNode=r,e.parentElement=r,e.ownerDocument=r.ownerDocument,e}function ll(r,e,t){if(!t)return Li(r,e);if(t.parentNode!==r)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,e.parentElement=r,e.parentNode=r,e.ownerDocument=r.ownerDocument),e}function cl(r,e){if(e.parentNode!==r)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:r.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:r.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var he=(r=>(r[r.PLACEHOLDER=0]="PLACEHOLDER",r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r))(he||{});const ri={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},_p={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ce=null;function $s(r,e,t,s=e.mirror||e.ownerDocument.mirror){r=Lp(r,e,t,s),ul(r,e,t,s),Pp(r,e,t)}function Lp(r,e,t,s){var i;if(t.afterAppend&&!Ce&&(Ce=new WeakSet,setTimeout(()=>{Ce=null},0)),!Pi(r,e)){const o=_s(e,t.mirror,s);(i=r.parentNode)==null||i.replaceChild(o,r),r=o}switch(e.RRNodeType){case $.Document:{if(!Ye(r,e,t.mirror,s)){const o=s.getMeta(e);o&&(t.mirror.removeNodeFromMap(r),r.close(),r.open(),t.mirror.add(r,o),Ce==null||Ce.add(r))}break}case $.Element:{const o=r,n=e;switch(n.tagName){case"IFRAME":{const a=r.contentDocument;if(!a)break;$s(a,e.contentDocument,t,s);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),ul(o.shadowRoot,n.shadowRoot,t,s)),Fp(o,n,s);break}}return r}function Pp(r,e,t){var s;switch(e.RRNodeType){case $.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case $.Element:{const i=r,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=r,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,r));break}case"STYLE":{const n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=i,a=o,l=n.open,c=n.matches("dialog:modal"),u=a.open,h=a.isModal,f=c!==h,m=l!==u;if((f||l&&m)&&n.close(),u&&(m||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case $.Text:case $.Comment:case $.CDATA:{r.textContent!==e.data&&(r.textContent=e.data);break}}Ce!=null&&Ce.has(r)&&(Ce.delete(r),(s=t.afterAppend)==null||s.call(t,r,t.mirror.getId(r)))}function Fp(r,e,t){const s=r.attributes,i=e.attributes;for(const o in i){const n=i[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&ri[o])r.setAttributeNS(ri[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const c=r.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{r.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(s))o in i||r.removeAttribute(o);e.scrollLeft&&(r.scrollLeft=e.scrollLeft),e.scrollTop&&(r.scrollTop=e.scrollTop)}function ul(r,e,t,s){const i=Array.from(r.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,c=o.length-1,u=i[n],h=i[a],f=o[l],m=o[c],p,y;for(;n<=a&&l<=c;)if(u===void 0)u=i[++n];else if(h===void 0)h=i[--a];else if(Ye(u,f,t.mirror,s))u=i[++n],f=o[++l];else if(Ye(h,m,t.mirror,s))h=i[--a],m=o[--c];else if(Ye(u,m,t.mirror,s)){try{r.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=i[++n],m=o[--c]}else if(Ye(h,f,t.mirror,s)){try{r.insertBefore(h,u)}catch(S){console.warn(S)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let v=n;v<=a;v++){const b=i[v];b&&t.mirror.hasNode(b)&&(p[t.mirror.getId(b)]=v)}}y=p[s.getId(f)];const S=i[y];if(y!==void 0&&S&&Ye(S,f,t.mirror,s)){try{r.insertBefore(S,u)}catch(v){console.warn(v)}i[y]=void 0}else{const v=_s(f,t.mirror,s);r.nodeName==="#document"&&u&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(r.removeChild(u),t.mirror.removeNodeFromMap(u),u=i[++n]);try{r.insertBefore(v,u||null)}catch(b){console.warn(b)}}f=o[++l]}if(n>a){const S=o[c+1];let v=null;for(S&&(v=t.mirror.getNode(s.getId(S)));l<=c;++l){const b=_s(o[l],t.mirror,s);try{r.insertBefore(b,v)}catch(C){console.warn(C)}}}else if(l>c)for(;n<=a;n++){const S=i[n];if(!(!S||S.parentNode!==r))try{r.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(v){console.warn(v)}}let d=r.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)$s(d,g,t,s),d=d.nextSibling,g=g.nextSibling}function _s(r,e,t){const s=t.getId(r),i=t.getMeta(r);let o=null;if(s>-1&&(o=e.getNode(s)),o!==null&&Pi(o,r))return o;switch(r.RRNodeType){case $.Document:o=new Document;break;case $.DocumentType:o=document.implementation.createDocumentType(r.name,r.publicId,r.systemId);break;case $.Element:{let n=r.tagName.toLowerCase();n=_p[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(ri.svg,n):o=document.createElement(r.tagName);break}case $.Text:o=document.createTextNode(r.data);break;case $.Comment:o=document.createComment(r.data);break;case $.CDATA:o=document.createCDATASection(r.data);break}i&&e.add(o,A({},i));try{Ce==null||Ce.add(o)}catch(n){}return o}function Pi(r,e){return r.nodeType!==e.nodeType?!1:r.nodeType!==r.ELEMENT_NODE||r.tagName.toUpperCase()===e.tagName}function Ye(r,e,t,s){const i=t.getId(r),o=s.getId(e);return i===-1||i!==o?!1:Pi(r,e)}class ft extends _i{constructor(e){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",Jp()),M(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new ft}createDocumentType(e,t,s){const i=new Bp(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Up(t);break;case"IFRAME":s=new Hp(t,this.mirror);break;case"CANVAS":s=new Vp(t);break;case"STYLE":s=new Wp(t);break;case"DIALOG":s=new zp(t);break;default:s=new qs(t);break}return s.ownerDocument=this,s}createComment(e){const t=new jp(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Yp(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Gp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Bp=il;class qs extends Ks{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}}class Up extends Dp{}class zp extends kp{}class Vp extends qs{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}}class Wp extends qs{constructor(){super(...arguments),M(this,"rules",[])}}class Hp extends qs{constructor(e,t){super(e),M(this,"contentDocument",new ft),this.contentDocument.mirror=t}}const Gp=nl,jp=ol,Yp=al;function Zp(r){return r instanceof HTMLFormElement?"FORM":r.tagName.toUpperCase()}function hl(r,e,t,s){let i;switch(r.nodeType){case he.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=e,i.compatMode=r.compatMode);break;case he.DOCUMENT_TYPE_NODE:{const n=r;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case he.ELEMENT_NODE:{const n=r,a=Zp(n);i=e.createElement(a);const l=i;for(const{name:c,value:u}of Array.from(n.attributes))l.attributes[c]=u;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case he.TEXT_NODE:i=e.createTextNode(r.textContent||"");break;case he.CDATA_SECTION_NODE:i=e.createCDATASection(r.data);break;case he.COMMENT_NODE:i=e.createComment(r.textContent||"");break;case he.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(r);return e instanceof ft&&(o||(o=fl(i,e.unserializedId),t.add(r,o)),e.mirror.add(i,A({},o))),i}function Xp(r,e=kf(),t=new ft){function s(i,o){const n=hl(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==he.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&s(a,n)}else(i.nodeType===he.DOCUMENT_NODE||i.nodeType===he.ELEMENT_NODE||i.nodeType===he.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===he.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,n),i.childNodes.forEach(a=>s(a,n)))}return s(r,null),t}function Jp(){return new Kp}class Kp{constructor(){M(this,"idNodeMap",new Map),M(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function fl(r,e){switch(r.RRNodeType){case $.Document:return{id:e,type:r.RRNodeType,childNodes:[]};case $.DocumentType:{const t=r;return{id:e,type:r.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case $.Element:return{id:e,type:r.RRNodeType,tagName:r.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case $.Comment:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case $.CDATA:return{id:e,type:r.RRNodeType,textContent:""}}}const io={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},no={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hs={},qp=()=>!!globalThis.Zone;function Fi(r){if(hs[r])return hs[r];const e=globalThis[r],t=e.prototype,s=r in io?io[r]:void 0,i=!!(s&&s.every(a=>{var l,c;return!!((c=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&c.toString().includes("[native code]"))})),o=r in no?no[r]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!qp())return hs[r]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const c=l[r].prototype;return document.body.removeChild(a),c?hs[r]=c:t}catch(a){return t}}const gr={};function _e(r,e,t){var s;const i=`${r}.${String(t)}`;if(gr[i])return gr[i].call(e);const o=Fi(r),n=(s=Object.getOwnPropertyDescriptor(o,t))==null?void 0:s.get;return n?(gr[i]=n,n.call(e)):e[t]}const yr={};function dl(r,e,t){const s=`${r}.${String(t)}`;if(yr[s])return yr[s].bind(e);const o=Fi(r)[t];return typeof o!="function"?e[t]:(yr[s]=o,o.bind(e))}function Qp(r){return _e("Node",r,"childNodes")}function em(r){return _e("Node",r,"parentNode")}function tm(r){return _e("Node",r,"parentElement")}function sm(r){return _e("Node",r,"textContent")}function rm(r,e){return dl("Node",r,"contains")(e)}function im(r){return dl("Node",r,"getRootNode")()}function nm(r){return!r||!("host"in r)?null:_e("ShadowRoot",r,"host")}function om(r){return r.styleSheets}function am(r){return!r||!("shadowRoot"in r)?null:_e("Element",r,"shadowRoot")}function lm(r,e){return _e("Element",r,"querySelector")(e)}function cm(r,e){return _e("Element",r,"querySelectorAll")(e)}function pl(){return Fi("MutationObserver").constructor}function He(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function um(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function hm(r){var f;var e,t;const s=(f=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=r.getBoundingClientRect(),o=s.innerWidth||s.document.documentElement.clientWidth||0,n=s.innerHeight||s.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=s.getComputedStyle)==null?void 0:t.call(s,r),u=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(u){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),y=m*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:u,ratio:h}}const T={childNodes:Qp,parentNode:em,parentElement:tm,textContent:sm,contains:rm,getRootNode:im,host:nm,styleSheets:om,shadowRoot:am,querySelector:lm,querySelectorAll:cm,mutationObserver:pl,patch:He,describeNode:um,getElementVisibility:hm};function ae(r,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(r,e,s),()=>t.removeEventListener(r,e,s)}const Ze=`Please stop import mirror directly. Instead of that,\r
|
|
68
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ji().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return Z([i(a)]).process(o,l)},i};Z.stringify=Qp;Z.parse=qp;Z.fromJSON=jp;Z.list=Xp;Z.comment=r=>new Sl(r);Z.atRule=r=>new vl(r);Z.decl=r=>new Cl(r);Z.rule=r=>new Al(r);Z.root=r=>new El(r);Z.document=r=>new xl(r);Z.CssSyntaxError=Gp;Z.Declaration=Cl;Z.Container=Hp;Z.Processor=ji;Z.Document=xl;Z.Comment=Sl;Z.Warning=em;Z.AtRule=vl;Z.Result=Kp;Z.Input=Yp;Z.Rule=Al;Z.Root=El;Z.Node=Jp;Zp.registerPostcss(Z);var tm=Z;Z.default=Z;const se=pf(tm);se.stringify;se.fromJSON;se.plugin;se.parse;se.list;se.document;se.comment;se.atRule;se.rule;se.decl;se.root;se.CssSyntaxError;se.Declaration;se.Container;se.Processor;se.Document;se.Comment;se.Warning;se.AtRule;se.Result;se.Input;se.Rule;se.Root;se.Node;var B=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(B||{});function sm(r){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return r.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[fi(o[0].trim())]=o[1].trim())}}),e}function bo(r){const e=[];for(const t in r){const s=r[t];if(typeof s!="string")continue;const i=om(t);e.push(`${i}: ${s};`)}return e.join(" ")}const rm=/-([a-z])/g,im=/^--[a-zA-Z0-9-]+$/,fi=r=>im.test(r)?r:r.replace(rm,(e,t)=>t?t.toUpperCase():""),nm=/\B([A-Z])/g,om=r=>r.replace(nm,"-$1").toLowerCase();class we{constructor(...e){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(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 we){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"}}class Yi extends we{constructor(...e){super(e),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",B.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Zi(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===B.Element||s===B.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Tl(this,e,t);return i.parentElement=null,i}removeChild(e){return Ol(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new Yi}createDocumentType(e,t,s){const i=new Ml(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=new rr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Il(e);return t.ownerDocument=this,t}createComment(e){const t=new Nl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Rl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Ml extends we{constructor(e,t,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",B.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class rr extends we{constructor(e){super(),A(this,"nodeType",1),A(this,"RRNodeType",B.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new cm(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?sm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,i,n)=>{if(t.test(s))return;const o=fi(s);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=bo(e)},e.removeProperty=s=>{if(t.test(s))return"";const i=fi(s),n=e[i]||"";return delete e[i],this.attributes.style=bo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Zi(this,e)}insertBefore(e,t){return Tl(this,e,t)}removeChild(e){return Ol(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class am extends rr{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class lm extends rr{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Il extends we{constructor(e){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",B.Text),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Nl extends we{constructor(e){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",B.Comment),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Rl extends we{constructor(e){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",B.CDATA),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class cm{constructor(e,t){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function Zi(r,e){return e.parentNode&&e.parentNode.removeChild(e),r.lastChild?(r.lastChild.nextSibling=e,e.previousSibling=r.lastChild):(r.firstChild=e,e.previousSibling=null),r.lastChild=e,e.nextSibling=null,e.parentNode=r,e.parentElement=r,e.ownerDocument=r.ownerDocument,e}function Tl(r,e,t){if(!t)return Zi(r,e);if(t.parentNode!==r)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,e.parentElement=r,e.parentNode=r,e.ownerDocument=r.ownerDocument),e}function Ol(r,e){if(e.parentNode!==r)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:r.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:r.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var he=(r=>(r[r.PLACEHOLDER=0]="PLACEHOLDER",r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r))(he||{});const pi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},um={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ee=null;function zs(r,e,t,s=e.mirror||e.ownerDocument.mirror){r=hm(r,e,t,s),Dl(r,e,t,s),dm(r,e,t)}function hm(r,e,t,s){var i;if(t.afterAppend&&!Ee&&(Ee=new WeakSet,setTimeout(()=>{Ee=null},0)),!Xi(r,e)){const n=Ws(e,t.mirror,s);(i=r.parentNode)==null||i.replaceChild(n,r),r=n}switch(e.RRNodeType){case B.Document:{if(!Qe(r,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(r),r.close(),r.open(),t.mirror.add(r,n),Ee==null||Ee.add(r))}break}case B.Element:{const n=r,o=e;switch(o.tagName){case"IFRAME":{const l=r.contentDocument;if(!l)break;zs(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Dl(n.shadowRoot,o.shadowRoot,t,s)),fm(n,o,s);break}}return r}function dm(r,e,t){var s;switch(e.RRNodeType){case B.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case B.Element:{const i=r,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=r,l=n;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const a=i.getContext("2d");a&&a.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>t.applyCanvas(l.event,l.mutation,r));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=n,a=o.open,c=o.matches("dialog:modal"),u=l.open,h=l.isModal,d=c!==h,f=a!==u;if((d||a&&f)&&o.close(),u&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case B.Text:case B.Comment:case B.CDATA:{r.textContent!==e.data&&(r.textContent=e.data);break}}Ee!=null&&Ee.has(r)&&(Ee.delete(r),(s=t.afterAppend)==null||s.call(t,r,t.mirror.getId(r)))}function fm(r,e,t){const s=r.attributes,i=e.attributes;for(const n in i){const o=i[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&pi[n])r.setAttributeNS(pi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const c=r.getContext("2d");c&&c.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{r.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(s))n in i||r.removeAttribute(n);e.scrollLeft&&(r.scrollLeft=e.scrollLeft),e.scrollTop&&(r.scrollTop=e.scrollTop)}function Dl(r,e,t,s){const i=Array.from(r.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,l=i.length-1,a=0,c=n.length-1,u=i[o],h=i[l],d=n[a],f=n[c],m,y;for(;o<=l&&a<=c;)if(u===void 0)u=i[++o];else if(h===void 0)h=i[--l];else if(Qe(u,d,t.mirror,s))u=i[++o],d=n[++a];else if(Qe(h,f,t.mirror,s))h=i[--l],f=n[--c];else if(Qe(u,f,t.mirror,s)){try{r.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=i[++o],f=n[--c]}else if(Qe(h,d,t.mirror,s)){try{r.insertBefore(h,u)}catch(S){console.warn(S)}h=i[--l],d=n[++a]}else{if(!m){m={};for(let v=o;v<=l;v++){const b=i[v];b&&t.mirror.hasNode(b)&&(m[t.mirror.getId(b)]=v)}}y=m[s.getId(d)];const S=i[y];if(y!==void 0&&S&&Qe(S,d,t.mirror,s)){try{r.insertBefore(S,u)}catch(v){console.warn(v)}i[y]=void 0}else{const v=Ws(d,t.mirror,s);r.nodeName==="#document"&&u&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(r.removeChild(u),t.mirror.removeNodeFromMap(u),u=i[++o]);try{r.insertBefore(v,u||null)}catch(b){console.warn(b)}}d=n[++a]}if(o>l){const S=n[c+1];let v=null;for(S&&(v=t.mirror.getNode(s.getId(S)));a<=c;++a){const b=Ws(n[a],t.mirror,s);try{r.insertBefore(b,v)}catch(C){console.warn(C)}}}else if(a>c)for(;o<=l;o++){const S=i[o];if(!(!S||S.parentNode!==r))try{r.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(v){console.warn(v)}}let p=r.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)zs(p,g,t,s),p=p.nextSibling,g=g.nextSibling}function Ws(r,e,t){const s=t.getId(r),i=t.getMeta(r);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&Xi(n,r))return n;switch(r.RRNodeType){case B.Document:n=new Document;break;case B.DocumentType:n=document.implementation.createDocumentType(r.name,r.publicId,r.systemId);break;case B.Element:{let o=r.tagName.toLowerCase();o=um[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(pi.svg,o):n=document.createElement(r.tagName);break}case B.Text:n=document.createTextNode(r.data);break;case B.Comment:n=document.createComment(r.data);break;case B.CDATA:n=document.createCDATASection(r.data);break}i&&e.add(n,M({},i));try{Ee==null||Ee.add(n)}catch(o){}return n}function Xi(r,e){return r.nodeType!==e.nodeType?!1:r.nodeType!==r.ELEMENT_NODE||r.tagName.toUpperCase()===e.tagName}function Qe(r,e,t,s){const i=t.getId(r),n=s.getId(e);return i===-1||i!==n?!1:Xi(r,e)}class yt extends Yi{constructor(e){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Am()),A(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new yt}createDocumentType(e,t,s){const i=new pm(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new mm(t);break;case"IFRAME":s=new wm(t,this.mirror);break;case"CANVAS":s=new ym(t);break;case"STYLE":s=new bm(t);break;case"DIALOG":s=new gm(t);break;default:s=new ir(t);break}return s.ownerDocument=this,s}createComment(e){const t=new Sm(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Cm(e);return t.ownerDocument=this,t}createTextNode(e){const t=new vm(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const pm=Ml;class ir extends rr{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class mm extends am{}class gm extends lm{}class ym extends ir{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class bm extends ir{constructor(){super(...arguments),A(this,"rules",[])}}class wm extends ir{constructor(e,t){super(e),A(this,"contentDocument",new yt),this.contentDocument.mirror=t}}const vm=Il,Sm=Nl,Cm=Rl;function xm(r){return r instanceof HTMLFormElement?"FORM":r.tagName.toUpperCase()}function $l(r,e,t,s){let i;switch(r.nodeType){case he.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=e,i.compatMode=r.compatMode);break;case he.DOCUMENT_TYPE_NODE:{const o=r;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case he.ELEMENT_NODE:{const o=r,l=xm(o);i=e.createElement(l);const a=i;for(const{name:c,value:u}of Array.from(o.attributes))a.attributes[c]=u;o.scrollLeft&&(a.scrollLeft=o.scrollLeft),o.scrollTop&&(a.scrollTop=o.scrollTop);break}case he.TEXT_NODE:i=e.createTextNode(r.textContent||"");break;case he.CDATA_SECTION_NODE:i=e.createCDATASection(r.data);break;case he.COMMENT_NODE:i=e.createComment(r.textContent||"");break;case he.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(r);return e instanceof yt&&(n||(n=kl(i,e.unserializedId),t.add(r,n)),e.mirror.add(i,M({},n))),i}function Em(r,e=cf(),t=new yt){function s(i,n){const o=$l(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==he.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===he.DOCUMENT_NODE||i.nodeType===he.ELEMENT_NODE||i.nodeType===he.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===he.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(r,null),t}function Am(){return new Mm}class Mm{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap),A(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.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 s=t.id;if(this.idNodeMap.set(s,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 s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(s),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 kl(r,e){switch(r.RRNodeType){case B.Document:return{id:e,type:r.RRNodeType,childNodes:[]};case B.DocumentType:{const t=r;return{id:e,type:r.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:r.RRNodeType,tagName:r.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case B.Comment:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case B.CDATA:return{id:e,type:r.RRNodeType,textContent:""}}}const wo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gs={},Im=()=>!!globalThis.Zone;function Ji(r){if(gs[r])return gs[r];const e=globalThis[r],t=e.prototype,s=r in wo?wo[r]:void 0,i=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=r in vo?vo[r]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Im())return gs[r]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[r].prototype;return document.body.removeChild(l),c?gs[r]=c:t}catch(l){return t}}const Mr={};function Ue(r,e,t){var s;const i=`${r}.${String(t)}`;if(Mr[i])return Mr[i].call(e);const n=Ji(r),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Mr[i]=o,o.call(e)):e[t]}const Ir={};function _l(r,e,t){const s=`${r}.${String(t)}`;if(Ir[s])return Ir[s].bind(e);const n=Ji(r)[t];return typeof n!="function"?e[t]:(Ir[s]=n,n.bind(e))}function Nm(r){return Ue("Node",r,"childNodes")}function Rm(r){return Ue("Node",r,"parentNode")}function Tm(r){return Ue("Node",r,"parentElement")}function Om(r){return Ue("Node",r,"textContent")}function Dm(r,e){return _l("Node",r,"contains")(e)}function $m(r){return _l("Node",r,"getRootNode")()}function km(r){return!r||!("host"in r)?null:Ue("ShadowRoot",r,"host")}function _m(r){return r.styleSheets}function Lm(r){return!r||!("shadowRoot"in r)?null:Ue("Element",r,"shadowRoot")}function Pm(r,e){return Ue("Element",r,"querySelector")(e)}function Fm(r,e){return Ue("Element",r,"querySelectorAll")(e)}function Ll(){return Ji("MutationObserver").constructor}function Oe(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function Bm(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function zm(r){var d;var e,t;const s=(d=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=r.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,r),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const $={childNodes:Nm,parentNode:Rm,parentElement:Tm,textContent:Om,contains:Dm,getRootNode:$m,host:km,styleSheets:_m,shadowRoot:Lm,querySelector:Pm,querySelectorAll:Fm,mutationObserver:Ll,patch:Oe,describeNode:Bm,getElementVisibility:zm};function ie(r,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(r,e,s),()=>t.removeEventListener(r,e,s)}const et=`Please stop import mirror directly. Instead of that,\r
|
|
68
69
|
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.`;exports.mirror={map:{},getId(){return console.error(Ze),-1},getNode(){return console.error(Ze),null},removeNodeFromMap(){console.error(Ze)},has(){return console.error(Ze),!1},reset(){console.error(Ze)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(r,e,t){return e==="map"&&console.error(Ze),Reflect.get(r,e,t)}}));function ut(r,e,t={}){let s=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const a=e-(n-i),l=this;a<=0||a>e?(s&&(clearTimeout(s),s=null),i=n,r.apply(l,o)):!s&&t.trailing!==!1&&(s=setTimeout(()=>{i=t.leading===!1?0:Date.now(),s=null,r.apply(l,o)},a))}}function Ft(r,e,t,s,i=window){const o=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,s?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>Ft(r,e,o||{},!0)}function pe(){return Math.round(performance.timeOrigin+performance.now())}function Bi(r=window){var e,t,s,i;const o=r.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=T.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((s=T.parentElement(o.body))==null?void 0:s.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Ui(r=window){const e=r.document;return r.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function zi(r=window){const e=r.document;return r.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Vi(r){return r?r.nodeType===r.ELEMENT_NODE?r:T.parentElement(r):null}function le(r,e,t,s){if(!r)return!1;const i=Vi(r);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||s&&i.closest("."+e)!==null)return!0}else if(Ms(i,e,s))return!0}catch(o){}return!!(t&&(i.matches(t)||s&&i.closest(t)!==null))}function ml(r,e){return e.getId(r)!==-1}function vs(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(r)===Mt}function Wi(r,e){if(vt(r))return!1;const t=e.getId(r);if(!e.has(t))return!0;const s=T.parentNode(r);return s&&s.nodeType===r.DOCUMENT_NODE?!1:s?Wi(s,e):!0}function Ls(r){return!!r.changedTouches}function Hi(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function gl(r){const e={},t=(i,o)=>{const n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},s=[];for(const i of r){const{nextId:o,parentId:n}=i;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=s.indexOf(a);s.splice(l,0,t(i,null))}continue}if(n in e){const a=e[n];a.children.push(t(i,a));continue}s.push(t(i,null))}return s}function Gi(r,e){e(r.value);for(let t=r.children.length-1;t>=0;t--)Gi(r.children[t],e)}function st(r,e){return!!(r.nodeName==="IFRAME"&&e.getMeta(r))}function ji(r,e){return!!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function Yi(r,e){var t,s;const i=(s=(t=r.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),n=Yi(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Te(r){return r?r instanceof ye&&"shadowRoot"in r?!!r.shadowRoot:!!T.shadowRoot(r):!1}function Qe(r,e){const t=r[e[0]];return e.length===1?t:Qe(t.cssRules[e[1]].cssRules,e.slice(2))}function ii(r){const e=[...r],t=e.pop();return{positions:e,index:t}}function yl(r){const e=new Set,t=[];for(let s=r.length;s--;){const i=r[s];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class Zi{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 Xi(r){var e;let t=null;return"getRootNode"in r&&((e=T.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&T.host(T.getRootNode(r))&&(t=T.host(T.getRootNode(r))),t}function bl(r){let e=r,t;for(;t=Xi(e);)e=t;return e}function wl(r){const e=r.ownerDocument;if(!e)return!1;const t=bl(r);return T.contains(e,t)}function Ji(r){const e=r.ownerDocument;return e?T.contains(e,r)||wl(r):!1}const fm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Zi,get _mirror(){return exports.mirror},closestElementOfNode:Vi,getBaseDimension:Yi,getNestedRule:Qe,getPositionsAndIndex:ii,getRootShadowHost:bl,getShadowHost:Xi,getWindowHeight:Ui,getWindowScroll:Bi,getWindowWidth:zi,hasShadowRoot:Te,hookSetter:Ft,inDom:Ji,isAncestorRemoved:Wi,isBlocked:le,isIgnored:vs,isSerialized:ml,isSerializedIframe:st,isSerializedStylesheet:ji,iterateResolveTree:Gi,legacy_isTouchEvent:Ls,nowTimestamp:pe,on:ae,polyfill:Hi,queueToResolveTrees:gl,shadowHostInDom:wl,throttle:ut,uniqueTextMutations:yl},Symbol.toStringTag,{value:"Module"}));var I=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(I||{}),x=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r[r.VisibilityMutation=17]="VisibilityMutation",r))(x||{}),B=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(B||{}),Ee=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(Ee||{}),Ae=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Ae||{}),Ne=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(Ne||{}),F=(r=>(r.Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back",r.Destroy="destroy",r))(F||{}),xe=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(xe||{});function oo(r){return"__ln"in r}class dm{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)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&&oo(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&oo(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.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 ao=(r,e)=>`${r}@${e}`;class pm{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"visibilityManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new dm,i=l=>{let c=l,u=Mt;for(;u===Mt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},o=l=>{const c=T.parentNode(l);if(!c||!Ji(l))return;let u=!1;if(l.nodeType===Node.TEXT_NODE){const p=c.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=vt(c)?this.mirror.getId(Xi(l)):this.mirror.getId(c),f=i(l);if(h===-1||f===-1)return s.addNode(l);const m=qe(l,{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:p=>{st(p,this.mirror)&&this.iframeManager.addIframe(p),ji(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Te(l)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:u});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)lo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(T.parentNode(l))||o(l);for(const l of this.addedSet)!co(this.droppedSet,l)&&!lo(this.removesSubTreeCache,l,this.mirror)||co(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;s.length;){let l=null;if(n){const c=this.mirror.getId(T.parentNode(n.value)),u=i(n.value);c!==-1&&u!==-1&&(l=n)}if(!l){let c=s.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId(T.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){l=u;break}else{const m=u.value,p=T.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=T.host(p);if(this.mirror.getId(y)!==-1){l=u;break}}}}}}if(!l){for(;s.head;)s.removeNode(s.head.value);break}n=l.previous,s.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const c=l.node,u=T.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const s=Array.from(T.childNodes(e),i=>T.textContent(i)||"").join("");t.attributes.value=Cs({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Es(e),value:s,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!vs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=T.textContent(e.target);!le(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Fo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Vi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let s=e.attributeName,i=e.target.getAttribute(s);const n=t[s],a=typeof n=="boolean",l=document.contains(t),c=ui(t),u=Mr(s,this.excludeAttribute);if(i===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u});return}if(Mr(s,this.excludeAttribute)){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u});return}if(s==="value"){const m=Es(t);i=Cs({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:i,maskInputFn:this.maskInputFn})}if(le(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)s="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),s==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Po(t.tagName,s))if(f.attributes[s]=Lo(this.doc,ke(t.tagName),ke(s),i),s!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${pe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===n?"mirrored in DOM property":null,i===f.attributes[s]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,transformedValue:f.attributes[s],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u}),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,g]:f._unchangedStyles[y]=[d,g]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else s==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(le(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 s=this.mirror.getId(t),i=vt(e.target)?this.mirror.getId(T.host(e.target)):this.mirror.getId(e.target);le(e.target,this.blockClass,this.blockSelector,!1)||vs(t,this.mirror,this.slimDOMOptions)||!ml(t,this.mirror)||(this.addedSet.has(t)?(ni(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||Wi(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ao(s,i)]?ni(this.movedSet,t):(this.removes.push({parentId:i,id:s,isShadow:vt(e.target)&&St(e.target)?!0:void 0}),mm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(vs(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&s!==-1&&(this.movedMap[ao(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);le(e,this.blockClass,this.blockSelector,!1)||(T.childNodes(e).forEach(s=>this.genAdds(s)),Te(e)&&T.childNodes(T.shadowRoot(e)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function ni(r,e){r.delete(e),T.childNodes(e).forEach(t=>ni(r,t))}function mm(r,e){const t=[r];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),T.childNodes(s).forEach(i=>t.push(i)))}}function lo(r,e,t){return r.size===0?!1:gm(r,e)}function gm(r,e,t){const s=T.parentNode(e);return s?r.has(s):!1}function co(r,e){return r.size===0?!1:vl(r,e)}function vl(r,e){const t=T.parentNode(e);return t?r.has(t)?!0:vl(r,t):!1}let Et;function ym(r){Et=r}function bm(){Et=void 0}const _=r=>Et?(...t)=>{try{return r(...t)}catch(s){if(Et&&Et(s)===!0)return;throw s}}:r,ze=[];function ht(r){try{if("composedPath"in r){const e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function Sl(r,e){const t=new pm;ze.push(t),t.init(r);const s=new(pl())(_(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function wm({mousemoveCb:r,sampling:e,doc:t,mirror:s}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=ut(_(h=>{const f=Date.now()-a;r(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),c=_(ut(_(h=>{const f=ht(h),{clientX:m,clientY:p}=Ls(h)?h.changedTouches[0]:h;a||(a=pe()),n.push({x:m,y:p,id:s.getId(f),timeOffset:pe()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),u=[ae("mousemove",c,t),ae("touchmove",c,t),ae("drag",c,t)];return _(()=>{u.forEach(h=>h())})}function vm({mouseInteractionCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const c=u=>h=>{const f=ht(h);if(le(f,s,i,!0))return;let m=null,p=u;if("pointerType"in h){switch(h.pointerType){case"mouse":m=Ee.Mouse;break;case"touch":m=Ee.Touch;break;case"pen":m=Ee.Pen;break}m===Ee.Touch?B[u]===B.MouseDown?p="TouchStart":B[u]===B.MouseUp&&(p="TouchEnd"):Ee.Pen}else Ls(h)&&(m=Ee.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===Ee.Touch||p.startsWith("Mouse")&&m===Ee.Mouse)&&(m=null)):B[u]===B.Click&&(m=l,l=null);const y=Ls(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:S}=y;_(r)(A({type:B[p],id:d,x:g,y:S},m!==null&&{pointerType:m}))};return Object.keys(B).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&n[u]!==!1).forEach(u=>{let h=ke(u);const f=c(u);if(window.PointerEvent)switch(B[u]){case B.MouseDown:case B.MouseUp:h=h.replace("mouse","pointer");break;case B.TouchStart:case B.TouchEnd:return}a.push(ae(h,f,e))}),_(()=>{a.forEach(u=>u())})}function Cl({scrollCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,sampling:o}){const n=_(ut(_(a=>{const l=ht(a);if(!l||le(l,s,i,!0))return;const c=t.getId(l);if(l===e&&e.defaultView){const u=Bi(e.defaultView);r({id:c,x:u.left,y:u.top})}else r({id:c,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return ae("scroll",n,e)}function Sm({viewportResizeCb:r},{win:e}){let t=-1,s=-1;const i=_(ut(_(()=>{const o=Ui(),n=zi();(t!==o||s!==n)&&(r({width:Number(n),height:Number(o)}),t=o,s=n)}),200));return ae("resize",i,e)}const br=["INPUT","TEXTAREA","SELECT"],uo=new WeakMap,Cm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],ho=new WeakMap;function Em({inputCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(v){let b=ht(v);const C=v.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=T.parentElement(b)),!b||!E||br.indexOf(E)<0||le(b,s,i,!0)||b.classList.contains(o)||n&&b.matches(n))return;let N=b.value,O=!1;const U=Es(b)||"";U==="radio"||U==="checkbox"?O=b.checked:(a[E.toLowerCase()]||a[U])&&(N=Cs({element:b,maskInputOptions:a,tagName:E,type:U,value:N,maskInputFn:l})),f(b,u?{text:N,isChecked:O,userTriggered:C}:{text:N,isChecked:O});const L=b.name;U==="radio"&&L&&O&&e.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(P=>{if(P!==b){const H=P.value;f(P,u?{text:H,isChecked:!O,userTriggered:!1}:{text:H,isChecked:!O})}})}function f(v,b){const C=uo.get(v),E=v,N=E.hasAttribute("placeholder"),O=E.value==="",U=typeof E.defaultValue=="string"?E.defaultValue==="":!0,L=!b.userTriggered,P=!C||C.text==="",H=N&&O&&U&&P&&L&&!b.isChecked&&E.type!=="hidden"&&br.includes(E.tagName),Q=E.tagName==="INPUT"&&E.type==="text"&&!b.userTriggered&&b.text===E.defaultValue&&!C&&E.hasAttribute("placeholder"),ee=!b.userTriggered&&E.value===E.defaultValue&&!C&&E.hasAttribute("placeholder")&&!b.isChecked&&E.type!=="hidden"&&br.includes(E.tagName),R=E.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!C,te=E.type==="radio"&&!b.userTriggered&&!b.isChecked&&!C;if(H||Q||ee||R||te){console.debug(`[${pe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:T.describeNode(E),tag:E.tagName,nodeType:E.nodeType,attribute:E.attributes,value:E.value,isLikelyPhantom:H,isRenderDrivenTextInput:Q,isValueFromDefault:ee,isPhantomCheckbox:R,isPhantomRadio:te});return}if(!C||C.text!==b.text||C.isChecked!==b.isChecked){uo.set(v,b);const G=t.getId(v);_(r)(ie(A({},b),{id:G}))}}const p=(c.input==="last"?["change"]:["input","change"]).map(v=>ae(v,_(h),e)),y=v=>{const b=ht(v);if(!b||!b.tagName)return;if(c.input==="all"){h(v);return}const C=b.tagName,E=v.key,N=Cm.includes(E),O=C==="TEXTAREA",U=e.activeElement===b,L=b.value,P=ho.get(b);if(ho.set(b,L),!U){h(v);return}if(N){if(!O){h(v);return}let H=P!=null?P:"",Q=0;const ee=2,R=()=>{const te=b.value,G=e.activeElement===b,j=te!==H;if(!G){h(v);return}if(j)Q=0,H=te;else if(Q++,Q>=ee){h(v);return}requestAnimationFrame(R)};requestAnimationFrame(R);return}};p.push(ae("keydown",_(y),e));const d=e.defaultView;if(!d)return()=>{p.forEach(v=>v())};const g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(v=>Ft(v[0],v[1],{set(){_(h)({target:this,isTrusted:!1})}},!1,d))),_(()=>{p.forEach(v=>v())})}function Ps(r){const e=[];function t(s,i){if(fs("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||fs("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||fs("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||fs("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const n=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(n)}else if(s.parentStyleSheet){const n=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(n)}return i}return t(r,e)}function Re(r,e,t){let s,i;return r?(r.ownerNode?s=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:s}):{}}function xm({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:_((u,h,f)=>{const[m,p]=f,{id:y,styleId:d}=Re(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&r({id:y,styleId:d,adds:[{rule:m,index:p}]}),u.apply(h,f)})}),s.CSSStyleSheet.prototype.addRule=function(u,h,f=this.cssRules.length){const m=`${u} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:_((u,h,f)=>{const[m]=f,{id:p,styleId:y}=Re(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&r({id:p,styleId:y,removes:[{index:m}]}),u.apply(h,f)})}),s.CSSStyleSheet.prototype.removeRule=function(u){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let n;s.CSSStyleSheet.prototype.replace&&(n=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:_((u,h,f)=>{const[m]=f,{id:p,styleId:y}=Re(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&r({id:p,styleId:y,replace:m}),u.apply(h,f)})}));let a;s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:_((u,h,f)=>{const[m]=f,{id:p,styleId:y}=Re(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&r({id:p,styleId:y,replaceSync:m}),u.apply(h,f)})}));const l={};ds("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(ds("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),ds("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),ds("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:_((f,m,p)=>{const[y,d]=p,{id:g,styleId:S}=Re(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,adds:[{rule:y,index:[...Ps(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:_((f,m,p)=>{const[y]=p,{id:d,styleId:g}=Re(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&r({id:d,styleId:g,removes:[{index:[...Ps(m),y]}]}),f.apply(m,p)})})}),_(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=o,n&&(s.CSSStyleSheet.prototype.replace=n),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function El({mirror:r,stylesheetManager:e},t){var s,i,o;let n=null;t.nodeName==="#document"?n=r.getId(t):n=r.getId(T.host(t));const a=t.nodeName==="#document"?(s=t.defaultView)==null?void 0:s.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=l.set)==null?void 0:u.call(this,c);if(n!==null&&n!==-1)try{e.adoptStyleSheets(c,n)}catch(f){}return h}}),_(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Mm({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:_((a,l,c)=>{var u;const[h,f,m]=c;if(t.has(h))return o.apply(l,[h,f,m]);const{id:p,styleId:y}=Re((u=l.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(p&&p!==-1||y&&y!==-1)&&r({id:p,styleId:y,set:{property:h,value:f,priority:m},index:Ps(l.parentRule)}),a.apply(l,c)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:_((a,l,c)=>{var u;const[h]=c;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=Re((u=l.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(f&&f!==-1||m&&m!==-1)&&r({id:f,styleId:m,remove:{property:h},index:Ps(l.parentRule)}),a.apply(l,c)})}),_(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function Im({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:s,sampling:i,doc:o}){const n=_(l=>ut(_(c=>{const u=ht(c);if(!u||le(u,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=u;r({type:l,id:s.getId(u),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),i.media||500)),a=[ae("play",n(Ne.Play),o),ae("pause",n(Ne.Pause),o),ae("seeked",n(Ne.Seeked),o),ae("volumechange",n(Ne.VolumeChange),o),ae("ratechange",n(Ne.RateChange),o)];return _(()=>{a.forEach(l=>l())})}function Am({fontCb:r,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,c,u){const h=new o(l,c,u);return i.set(h,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const n=He(e.fonts,"add",function(a){return function(l){return setTimeout(_(()=>{const c=i.get(l);c&&(r(c),i.delete(l))}),0),a.apply(this,[l])}});return s.push(()=>{t.FontFace=o}),s.push(n),_(()=>{s.forEach(a=>a())})}function Rm(r){const{doc:e,mirror:t,blockClass:s,blockSelector:i,selectionCb:o}=r;let n=!0;const a=_(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const c=[],u=l.rangeCount||0;for(let h=0;h<u;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:y,endOffset:d}=f;le(m,s,i,!0)||le(y,s,i,!0)||c.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:c})});return a(),ae("selectionchange",a)}function Nm({doc:r,customElementCb:e}){const t=r.defaultView;return!t||!t.customElements?()=>{}:He(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function Om(r,e){const{mutationCb:t,mousemoveCb:s,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,visibilityMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=r;r.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},r.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),s(...d)},r.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},r.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},r.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},r.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},r.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},r.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},r.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},r.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},r.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},r.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},r.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},r.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function Tm(r,e={}){const t=r.doc.defaultView;if(!t)return()=>{};Om(r,e);let s;r.recordDOM&&(s=Sl(r,r.doc));const i=wm(r),o=vm(r),n=Cl(r),a=Sm(r,{win:t}),l=Em(r),c=Im(r);let u=()=>{},h=()=>{},f=()=>{},m=()=>{};r.recordDOM&&(u=xm(r,{win:t}),h=El(r,r.doc),f=Mm(r,{win:t}),r.collectFonts&&(m=Am(r)));const p=Rm(r),y=Nm(r),d=[];for(const g of r.plugins)d.push(g.observer(g.callback,t,g.options));return _(()=>{ze.forEach(g=>g.reset()),s==null||s.disconnect(),i(),o(),n(),a(),l(),c(),u(),h(),f(),m(),p(),y(),d.forEach(g=>g())})}function fs(r){return typeof window[r]!="undefined"}function ds(r){return!!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}class fo{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,i){const o=s||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const s=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,s,i))}getRemoteId(e,t,s){const i=s||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,s))}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 Dm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new fo(_o)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fo(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 s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=e.contentWindow)==null||s.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"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case I.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:I.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),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 x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(s=t.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,s,i){for(const o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(s,t[o]):t[o]=e.getId(s,t[o]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(s=>{this.replaceIdOnNode(s,t)})}patchRootIdOnNode(e,t){e.type!==xe.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class km{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!St(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=Sl(ie(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Cl(ie(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(El({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 s=this;this.restoreHandlers.push(He(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=T.shadowRoot(this);return a&&Ji(this)&&s.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var ps=0;ps<et.length;ps++)bt[et.charCodeAt(ps)]=ps;var $m=function(r){var e=new Uint8Array(r),t,s=e.length,i="";for(t=0;t<s;t+=3)i+=et[e[t]>>2],i+=et[(e[t]&3)<<4|e[t+1]>>4],i+=et[(e[t+1]&15)<<2|e[t+2]>>6],i+=et[e[t+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},_m=function(r){var e=r.length*.75,t=r.length,s,i=0,o,n,a,l;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(s=0;s<t;s+=4)o=bt[r.charCodeAt(s)],n=bt[r.charCodeAt(s+1)],a=bt[r.charCodeAt(s+2)],l=bt[r.charCodeAt(s+3)],u[i++]=o<<2|n>>4,u[i++]=(n&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c};const po=new Map;function Lm(r,e){let t=po.get(r);return t||(t=new Map,po.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}const xl=(r,e,t)=>{if(!r||!(Il(r,e)||typeof r=="object"))return;const s=r.constructor.name,i=Lm(t,s);let o=i.indexOf(r);return o===-1&&(o=i.length,i.push(r)),o};function Ss(r,e,t){if(r instanceof Array)return r.map(s=>Ss(s,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){const s=r.constructor.name,i=$m(r);return{rr_type:s,base64:i}}else{if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Ss(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){const s=r.constructor.name,{src:i}=r;return{rr_type:s,src:i}}else if(r instanceof HTMLCanvasElement){const s="HTMLImageElement",i=r.toDataURL();return{rr_type:s,src:i}}else{if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Ss(r.data,e,t),r.width,r.height]};if(Il(r,e)||typeof r=="object"){const s=r.constructor.name,i=xl(r,e,t);return{rr_type:s,index:i}}}}return r}const Ml=(r,e,t)=>r.map(s=>Ss(s,e,t)),Il=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>r instanceof e[i]);function Pm(r,e,t,s){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=He(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...c){return le(this.canvas,t,s,!0)||setTimeout(()=>{const u=Ml(c,e,this);r(this.canvas,{type:Ae["2D"],property:n,args:u})},0),l.apply(this,c)}});i.push(a)}catch(a){const l=Ft(e.CanvasRenderingContext2D.prototype,n,{set(c){r(this.canvas,{type:Ae["2D"],property:n,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function Fm(r){return r==="experimental-webgl"?"webgl":r}function mo(r,e,t,s){const i=[];try{const o=He(r.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!le(this,e,t,!0)){const c=Fm(a);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(l[0]&&typeof l[0]=="object"){const u=l[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function go(r,e,t,s,i,o){const n=[],a=Object.getOwnPropertyNames(r);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof r[l]!="function")continue;const c=He(r,l,function(u){return function(...h){const f=u.apply(this,h);if(xl(f,o,this),"tagName"in this.canvas&&!le(this.canvas,s,i,!0)){const m=Ml(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(c)}catch(c){const u=Ft(r,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(u)}return n}function Bm(r,e,t,s){const i=[];return i.push(...go(e.WebGLRenderingContext.prototype,Ae.WebGL,r,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...go(e.WebGL2RenderingContext.prototype,Ae.WebGL2,r,t,s,e)),()=>{i.forEach(o=>o())}}const Al="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Um=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),yo=typeof window!="undefined"&&window.Blob&&new Blob([Um(Al)],{type:"text/javascript;charset=utf-8"});function zm(r){let e;try{if(e=yo&&(window.URL||window.webkitURL).createObjectURL(yo),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Al,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Vm{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)});const{sampling:t="all",win:s,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(s,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,s,i,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,s,i,o){const n=mo(t,s,i,!0),a=new Map,l=new zm;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:S,height:v}=p.data;this.mutationCb({id:y,type:Ae["2D"],commands:[{property:"clearRect",args:[0,0,S,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{le(y,s,i,!0)||p.push(y)}),p},m=p=>{if(u&&p-u<c){h=requestAnimationFrame(m);return}u=p,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const v=y.getContext(y.__context);((d=v==null?void 0:v.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);l.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=mo(e,t,s,!1),o=Pm(this.processMutation.bind(this),e,t,s),n=Bm(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||t===-1)return;const i=s.map(n=>{const c=n,{type:a}=c;return Ge(c,["type"])}),{type:o}=s[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Wm{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Zi),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 s={id:t,styleIds:[]},i=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Ro(a,o.href),index:l}))})),s.styleIds.push(n)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Hm{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).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(){}}function Gm(r,e,t){var u,h,f,m,p,y;const s=(u=t==null?void 0:t.root)!=null?u:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=jm((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),a=new Map,l=Ym(s),c=Zm(l,n);for(const d of r){const g=d.getBoundingClientRect();let S=Km(),v=0;g.width>0&&g.height>0&&(S=Xm(g,c),v=Jm(g,S),v=Math.round(v*100)/100);const b=qm(d),C=(p=e.get(d))!=null?p:null,E=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,N=v,O=(C==null?void 0:C.isStyleVisible)&&E>i,U=b&&N>i;!C||O!==U||O!==U&&Math.abs(N-E)>o?a.set(d,{target:d,isVisible:U,isStyleVisible:b,intersectionRatio:N,intersectionRect:S,oldValue:C}):a.set(d,C)}return a}function jm(r){const e=r.trim().split(/\s+/),t=(s,i)=>s.endsWith("%")?parseFloat(s)/100*i:parseFloat(s)||0;return function(s){const i=t(e[0]||"0px",s.height),o=t(e[1]||e[0]||"0px",s.width),n=t(e[2]||e[0]||"0px",s.height),a=t(e[3]||e[1]||e[0]||"0px",s.width);return{top:i,right:o,bottom:n,left:a,width:0,height:0}}}function Ym(r){return r?r.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Zm(r,e){const t=e(r);return new DOMRect(r.left-t.left,r.top-t.top,r.width+t.left+t.right,r.height+t.top+t.bottom)}function Xm(r,e){const t=Math.max(r.top,e.top),s=Math.max(r.left,e.left),i=Math.min(r.bottom,e.bottom),o=Math.min(r.right,e.right),n=Math.max(0,o-s),a=Math.max(0,i-t);return{top:t,left:s,bottom:i,right:o,width:n,height:a}}function Jm(r,e){const t=r.width*r.height,s=e.width*e.height;return t>0?s/t:0}function Km(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function qm(r){const e=getComputedStyle(r);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Qm{constructor(e){var c,u,h,f,m,p;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"intervalId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:s,sampling:i,mutationCb:o,notifyActivity:n}=e;if(this.mirror=s,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",i===!1){this.disabled=!0;return}const a=typeof i=="object"&&i!==null?i:{};this.mode=(c=a==null?void 0:a.mode)!=null?c:"none",this.debounce=Number((u=a==null?void 0:a.debounce)!=null?u:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((m=a==null?void 0:a.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),d.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).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=Gm(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,s]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==s.isVisible||Math.abs(i.intersectionRatio-s.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:s.isVisible,ratio:s.intersectionRatio}),this.previousState.set(t,s)}}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;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}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}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!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 eg="3.1.1-alpha.1";let K,Xe,wr,vr,rt=!1;const Fs=[];let Ue;function tg(r){return new Promise(t=>{const s=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let o=!1;return()=>{o||(o=!0,s())}})();["interactive","complete"].includes(r.document.readyState)?i():(r.addEventListener("DOMContentLoaded",i,{once:!0}),r.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],r=>r*2)[0]!==2){const r=document.createElement("iframe");document.body.appendChild(r),Array.from=((an=r.contentWindow)==null?void 0:an.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}const de=No();function ue(r={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:s,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:c,maskTextClass:u="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:S,packFn:v,sampling:b={},dataURLOptions:C={},mousemoveWait:E,recordDOM:N=!0,recordCanvas:O=!1,recordCrossOriginIframes:U=!1,recordAfter:L=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",flushCustomEvent:P=r.flushCustomEvent!==void 0?r.flushCustomEvent:"after",userTriggeredOnInput:H=!1,collectFonts:Q=!1,inlineImages:ee=!1,plugins:R,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:j}=r;ym(j);const oe=U?window.parent===window:!0;let fe=!1;if(!oe)try{window.parent.document&&(fe=!1)}catch(k){fe=!0}if(oe&&!e)throw new Error("emit function is required");if(!oe&&!fe)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),de.reset();const be=c===void 0?/.^/:c,Qs=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}:p!==void 0?p:{password:!0},er=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};Hi();let Ki,Bt=0,Ut=0;const $l=k=>{Ut+=k},qi=k=>{for(const ce of R||[])ce.eventProcessor&&(k=ce.eventProcessor(k));return v&&!fe&&(k=v(k)),k};let tr=null,sr=!1;K=(k,ce)=>{var se,Fe;const re=k;re.timestamp=pe();let Be=!1;if((se=ze[0])!=null&&se.isFrozen()&&re.type!==I.FullSnapshot&&!(re.type===I.IncrementalSnapshot&&re.data.source===x.Mutation)&&ze.forEach(z=>z.unfreeze()),!sr&&re.type!==I.Meta&&re.type!==I.FullSnapshot&&tr&&window.location.href!==tr){sr=!0;try{Ut=0,Bt=0,Be=!0,Xe(!0)}finally{sr=!1}}if(oe)e==null||e(qi(re),ce);else if(fe){const z={type:"rrweb",event:qi(re),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(z,"*")}if(re.type===I.Meta&&(tr=((Fe=re.data)==null?void 0:Fe.href)||window.location.href),re.type===I.FullSnapshot)Ki=re,Bt=0;else if(re.type===I.IncrementalSnapshot){if(re.data.source===x.Mutation&&re.data.isAttachIframe)return;if(Bt++,!Be){const z=s&&Bt>=s,dt=t&&re.timestamp-Ki.timestamp>t,sn=i&&Ut>=i;(z||dt||sn)&&(sn&&(Ut=0),Xe(!0))}}};const zt=k=>{K({type:I.IncrementalSnapshot,data:A({source:x.Mutation},k)})},Qi=k=>K({type:I.IncrementalSnapshot,data:A({source:x.Scroll},k)}),en=k=>K({type:I.IncrementalSnapshot,data:A({source:x.CanvasMutation},k)}),tn=k=>{var ce;(ce=S==null?void 0:S.visibilityMutation)==null||ce.call(S,k),K({type:I.IncrementalSnapshot,data:A({source:x.VisibilityMutation},k)})},_l=k=>K({type:I.IncrementalSnapshot,data:A({source:x.AdoptedStyleSheet},k)}),Le=new Wm({mutationCb:zt,adoptedStyleSheetCb:_l}),Pe=new Dm({mirror:de,mutationCb:zt,stylesheetManager:Le,recordCrossOriginIframes:U,wrappedEmit:K});for(const k of R||[])k.getMirror&&k.getMirror({nodeMirror:de,crossOriginIframeMirror:Pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Pe.crossOriginIframeStyleMirror});const rr=new Hm;wr=new Vm({recordCanvas:O,mutationCb:en,win:window,blockClass:o,blockSelector:n,mirror:de,sampling:b.canvas,dataURLOptions:C}),vr=new Qm({doc:window.document,mirror:de,sampling:b.visibility,mutationCb:tn,notifyActivity:$l});const Vt=new km({mutationCb:zt,scrollCb:Qi,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:h,excludeAttribute:be,inlineStylesheet:f,maskInputOptions:Qs,dataURLOptions:C,maskTextFn:g,maskInputFn:d,recordCanvas:O,inlineImages:ee,sampling:b,slimDOMOptions:er,iframeManager:Pe,stylesheetManager:Le,canvasManager:wr,visibilityManager:vr,keepIframeSrcFn:te,processedNodeManager:rr},mirror:de});Xe=(k=!1)=>{if(!N)return;K({type:I.Meta,data:{href:window.location.href,width:zi(),height:Ui()}},k),Le.reset(),Vt.init(),ze.forEach(se=>se.lock());const ce=Iu(document,{mirror:de,blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:h,excludeAttribute:be,inlineStylesheet:f,maskAllInputs:Qs,maskTextFn:g,maskInputFn:d,slimDOM:er,dataURLOptions:C,recordCanvas:O,inlineImages:ee,onSerialize:se=>{st(se,de)&&Pe.addIframe(se),ji(se,de)&&Le.trackLinkElement(se),Te(se)&&Vt.addShadowRoot(T.shadowRoot(se),document)},onIframeLoad:(se,Fe)=>{Pe.attachIframe(se,Fe),Vt.observeAttachShadow(se)},onStylesheetLoad:(se,Fe)=>{Le.attachLinkElement(se,Fe)},keepIframeSrcFn:te});if(!ce)return console.warn("Failed to snapshot the document");K({type:I.FullSnapshot,data:{node:ce,initialOffset:Bi(window)}},k),ze.forEach(se=>se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Le.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))},Ue=()=>{for(const k of Fs)K(k);Fs.length=0};try{const k=[],ce=re=>{var Be;return _(Tm)({mutationCb:zt,mousemoveCb:(z,dt)=>K({type:I.IncrementalSnapshot,data:{source:dt,positions:z}}),mouseInteractionCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.MouseInteraction},z)}),scrollCb:Qi,viewportResizeCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.ViewportResize},z)}),inputCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.Input},z)}),mediaInteractionCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.MediaInteraction},z)}),styleSheetRuleCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.StyleSheetRule},z)}),styleDeclarationCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.StyleDeclaration},z)}),canvasMutationCb:en,visibilityMutationCb:tn,fontCb:z=>K({type:I.IncrementalSnapshot,data:A({source:x.Font},z)}),selectionCb:z=>{K({type:I.IncrementalSnapshot,data:A({source:x.Selection},z)})},customElementCb:z=>{K({type:I.IncrementalSnapshot,data:A({source:x.CustomElement},z)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:h,excludeAttribute:be,maskInputOptions:Qs,inlineStylesheet:f,sampling:b,recordDOM:N,recordCanvas:O,inlineImages:ee,userTriggeredOnInput:H,collectFonts:Q,doc:re,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:te,blockSelector:n,slimDOMOptions:er,dataURLOptions:C,mirror:de,iframeManager:Pe,stylesheetManager:Le,shadowDomManager:Vt,processedNodeManager:rr,canvasManager:wr,visibilityManager:vr,ignoreCSSAttributes:G,plugins:((Be=R==null?void 0:R.filter(z=>z.observer))==null?void 0:Be.map(z=>({observer:z.observer,options:z.options,callback:dt=>K({type:I.Plugin,data:{plugin:z.name,payload:dt}})})))||[]},S)};Pe.addLoadListener(re=>{try{k.push(ce(re.contentDocument))}catch(Be){console.warn(Be)}});const se=()=>{P==="before"&&Ue(),Xe(),k.push(ce(document)),rt=!0,P==="after"&&Ue()},Fe=async()=>{P==="before"&&Ue(),L==="DOMContentStabilized"&&(console.debug(`[${pe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await tg(window),console.debug(`[${pe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${pe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),Xe(),k.push(ce(document)),rt=!0,P==="after"&&Ue()};return document.readyState==="interactive"||document.readyState==="complete"?se():(k.push(ae("DOMContentLoaded",()=>{K({type:I.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&se()})),k.push(ae("load",()=>{K({type:I.Load,data:{}}),L==="load"&&se()},window))),()=>{Ue(),k.forEach(re=>re()),rr.destroy(),rt=!1,bm()}}catch(k){console.warn(k)}}ue.getVersion=()=>eg;ue.isRecording=()=>rt;ue.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Fs.length} events`),Ue()};ue.addCustomEvent=(r,e)=>{const t={type:I.Custom,data:{tag:r,payload:e}};if(!rt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${r}`),Fs.push(t);return}K(t)};ue.freezePage=()=>{ze.forEach(r=>r.freeze())};ue.takeFullSnapshot=r=>{if(!rt)throw new Error("please take full snapshot after start recording");Xe(r)};ue.mirror=de;function Rl(r){return{all:r=r||new Map,on:function(e,t){var s=r.get(e);s?s.push(t):r.set(e,[t])},off:function(e,t){var s=r.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var s=r.get(e);s&&s.slice().map(function(i){i(t)}),(s=r.get("*"))&&s.slice().map(function(i){i(e,t)})}}}const sg=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"}));function rg(r=window,e=document){if("scrollBehavior"in e.documentElement.style&&r.__forceSmoothScrollPolyfill__!==!0)return;const t=r.HTMLElement||r.Element,s=468,i={scroll:r.scroll||r.scrollTo,scrollBy:r.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now;function n(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const a=n(r.navigator.userAgent)?1:0;function l(g,S){this.scrollLeft=g,this.scrollTop=S}function c(g){return .5*(1-Math.cos(Math.PI*g))}function u(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+a<g.scrollHeight;if(S==="X")return g.clientWidth+a<g.scrollWidth}function f(g,S){const v=r.getComputedStyle(g,null)["overflow"+S];return v==="auto"||v==="scroll"}function m(g){const S=h(g,"Y")&&f(g,"Y"),v=h(g,"X")&&f(g,"X");return S||v}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=o();let v,b,C,E=(S-g.startTime)/s;E=E>1?1:E,v=c(E),b=g.startX+(g.x-g.startX)*v,C=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,b,C),(b!==g.x||C!==g.y)&&r.requestAnimationFrame(y.bind(r,g))}function d(g,S,v){let b,C,E,N;const O=o();g===e.body?(b=r,C=r.scrollX||r.pageXOffset,E=r.scrollY||r.pageYOffset,N=i.scroll):(b=g,C=g.scrollLeft,E=g.scrollTop,N=l),y({scrollable:b,method:N,startTime:O,startX:C,startY:E,x:S,y:v})}r.scroll=r.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:r.scrollY||r.pageYOffset);return}d.call(r,e.body,arguments[0].left!==void 0?~~arguments[0].left:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:r.scrollY||r.pageYOffset)}},r.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}d.call(r,e.body,~~arguments[0].left+(r.scrollX||r.pageXOffset),~~arguments[0].top+(r.scrollY||r.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),S=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+v.left-S.left,g.scrollTop+v.top-S.top),r.getComputedStyle(g).position!=="fixed"&&r.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):r.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class ig{constructor(e=[],t){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,s=this.actions.length-1;for(;t<=s;){const i=Math.floor((t+s)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)s=i-1;else return i+1}return t}}function bo(r,e){if(r.type===I.IncrementalSnapshot&&r.data.source===x.MouseMove&&r.data.positions&&r.data.positions.length){const t=r.data.positions[0].timeOffset,s=r.timestamp+t;return r.delay=s-e,s-e}return r.delay=r.timestamp-e,r.delay}/*! *****************************************************************************
|
|
70
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(et),-1},getNode(){return console.error(et),null},removeNodeFromMap(){console.error(et)},has(){return console.error(et),!1},reset(){console.error(et)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(r,e,t){return e==="map"&&console.error(et),Reflect.get(r,e,t)}}));function mt(r,e,t={}){let s=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(s&&(clearTimeout(s),s=null),i=o,r.apply(a,n)):!s&&t.trailing!==!1&&(s=setTimeout(()=>{i=t.leading===!1?0:Date.now(),s=null,r.apply(a,n)},l))}}function jt(r,e,t,s,i=window){const n=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,s?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>jt(r,e,n||{},!0)}function pe(){return Math.round(performance.timeOrigin+performance.now())}function qi(r=window){var e,t,s,i;const n=r.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=$.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:r.pageYOffset!==void 0?r.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((s=$.parentElement(n.body))==null?void 0:s.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Ki(r=window){const e=r.document;return r.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Qi(r=window){const e=r.document;return r.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function nr(r){return r?r.nodeType===r.ELEMENT_NODE?r:$.parentElement(r):null}function ae(r,e,t,s){if(!r)return!1;const i=nr(r);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||s&&i.closest("."+e)!==null)return!0}else if(Os(i,e,s))return!0}catch(n){}return!!(t&&(i.matches(t)||s&&i.closest(t)!==null))}function Pl(r,e){return e.getId(r)!==-1}function Ms(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(r)===Dt}function en(r,e){if(It(r))return!1;const t=e.getId(r);if(!e.has(t))return!0;const s=$.parentNode(r);return s&&s.nodeType===r.DOCUMENT_NODE?!1:s?en(s,e):!0}function Us(r){return!!r.changedTouches}function tn(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Fl(r){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},s=[];for(const i of r){const{nextId:n,parentId:o}=i;if(n&&n in e){const l=e[n];if(l.parent){const a=l.parent.children.indexOf(l);l.parent.children.splice(a,0,t(i,l.parent))}else{const a=s.indexOf(l);s.splice(a,0,t(i,null))}continue}if(o in e){const l=e[o];l.children.push(t(i,l));continue}s.push(t(i,null))}return s}function sn(r,e){e(r.value);for(let t=r.children.length-1;t>=0;t--)sn(r.children[t],e)}function at(r,e){return!!(r.nodeName==="IFRAME"&&e.getMeta(r))}function rn(r,e){return!!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function nn(r,e){var t,s;const i=(s=(t=r.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=nn(i,e),l=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Pe(r){return r?r instanceof we&&"shadowRoot"in r?!!r.shadowRoot:!!$.shadowRoot(r):!1}function it(r,e){const t=r[e[0]];return e.length===1?t:it(t.cssRules[e[1]].cssRules,e.slice(2))}function mi(r){const e=[...r],t=e.pop();return{positions:e,index:t}}function Bl(r){const e=new Set,t=[];for(let s=r.length;s--;){const i=r[s];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class on{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 an(r){var e;let t=null;return"getRootNode"in r&&((e=$.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(r))&&(t=$.host($.getRootNode(r))),t}function zl(r){let e=r,t;for(;t=an(e);)e=t;return e}function Wl(r){const e=r.ownerDocument;if(!e)return!1;const t=zl(r);return $.contains(e,t)}function ln(r){const e=r.ownerDocument;return e?$.contains(e,r)||Wl(r):!1}const Wm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:on,get _mirror(){return exports.mirror},closestElementOfNode:nr,getBaseDimension:nn,getNestedRule:it,getPositionsAndIndex:mi,getRootShadowHost:zl,getShadowHost:an,getWindowHeight:Ki,getWindowScroll:qi,getWindowWidth:Qi,hasShadowRoot:Pe,hookSetter:jt,inDom:ln,isAncestorRemoved:en,isBlocked:ae,isIgnored:Ms,isSerialized:Pl,isSerializedIframe:at,isSerializedStylesheet:rn,iterateResolveTree:sn,legacy_isTouchEvent:Us,nowTimestamp:pe,on:ie,polyfill:tn,queueToResolveTrees:Fl,shadowHostInDom:Wl,throttle:mt,uniqueTextMutations:Bl},Symbol.toStringTag,{value:"Module"}));var I=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(I||{}),E=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r[r.Visibility=17]="Visibility",r))(E||{}),V=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(V||{}),Ie=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(Ie||{}),De=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(De||{}),_e=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(_e||{}),U=(r=>(r.Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back",r.Destroy="destroy",r))(U||{}),Ne=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(Ne||{});const ys={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},xe={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},Um={MIN_CONFIDENCE_FOR_SKIP:.7},So=["form","main","nav","section","article","footer","header"],Co=["form","navigation","main","region","contentinfo","complementary","banner","search"],Vm=["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"],Fe={"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},Ul=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Hm={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Wt(r){return!!(/^[a-z]+-\d+$/i.test(r)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(r)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(r)||/^\d+$/.test(r)||/^:[a-z0-9]+:$/i.test(r)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r)&&(/\d/.test(r)||/[A-Z]/.test(r))||/^radix-/.test(r)||/^mui-\d+$/.test(r))}const Vl=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Hl(r){return r.trim().split(/\s+/).some(e=>Wt(e))}class Gm{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),s=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:xe.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();So.includes(s)&&(t+=xe.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Co.includes(i)&&(t+=xe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=xe.ARIA_LABEL);const n=e.id;return n&&!Wt(n)&&(t+=xe.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=xe.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=xe.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-xe.DEPTH_PENALTY_THRESHOLD)*xe.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(So.includes(t))return"A";const s=e.getAttribute("role");return s&&Co.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const jm=[/^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,}/],Ym=[/^\[/,/^(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)?:/,/\/([\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 cn(r){return jm.some(e=>e.test(r))}function un(r){return r.length<=2||/^\d/.test(r)?!0:Ym.some(e=>e.test(r))}function Zm(r){return!cn(r)&&!un(r)}function Xm(r){return r.filter(e=>Zm(e))}function Jm(r){const e=[],t=[];for(const s of r)un(s)||cn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function xo(r){return un(r)||cn(r)}const Eo=r=>r.replace(/([#:.[\]@])/g,"\\$1");class qm{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){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,s);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,i,n){const o=this.buildTestSelector(s,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<Um.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,i);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const i=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(s)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Wt(e.id)&&(t+=`#${Eo(e.id)}`);for(const s of Array.from(e.classList))xo(s)||(t+=`.${Eo(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Vm.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!xo(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Wt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){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(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}}function Km(r){return r?r.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Qm={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function eg(r){return r?[/\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(r)):!1}function tg(r,e){if(!r)return r;const t=r.startsWith("http://")||r.startsWith("https://"),[s,i]=r.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&eg(i)||(l+=`#${i}`)),l}function Gl(r,e,t={}){if(!e)return e;const s=M(M({},Qm),t);return r==="href"||r==="src"?tg(e,s):e}const sg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],rg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],ig=["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"],ng=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],og=["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"],ag=["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"],lg=["data-category","data-action","data-label","data-value"],cg=["id","name","type","placeholder","title","for","alt","href"],ug=["disabled","checked","selected","hidden","readonly","required","value"],hg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function dg(r,e){return sg.includes(r)?!0:rg.includes(r)||ig.includes(r)||ng.some(t=>r.startsWith(t))?!1:og.includes(r)?!0:ag.some(t=>r.startsWith(t))||lg.includes(r)?!1:r.startsWith("data-")&&r.endsWith("-id")?!0:r==="id"?!hg.some(t=>t.test(e)):cg.includes(r)?!0:ug.includes(r)?!1:!!r.startsWith("data-")}class Ao{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!Wt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Jm(o);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 o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Ul.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 Fe[e]!==void 0?Fe[e]:e.startsWith("data-")?Fe["data-*"]:e.startsWith("aria-")?Fe["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 s of Array.from(e.attributes)){const i=s.name;if(this.shouldIgnoreAttribute(i)||!dg(i,s.value)||Vl.has(i)&&Hl(s.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Gl(i,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=Km(t);if(!s)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=s.length>i?s.slice(0,i)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;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(" "):(s=e.textContent)!=null?s: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 fg{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),i={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(i.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function pg(r,e=0){const t=r.anchor.score,s=r.path.length>0?r.path.reduce((l,a)=>l+a.score,0)/r.path.length:.5,i=r.target.score,n=t*ys.ANCHOR+s*ys.PATH+i*ys.TARGET+e*ys.UNIQUENESS,o=r.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class mg{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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 gg{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new mg((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(M({},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,s=e+t;return s>0?e/s:0}}function yg(r){return new gg(r)}let Nr=null;function bg(){return Nr||(Nr=yg()),Nr}function Mo(r){if(r.ownerDocument)return r.ownerDocument;let e=r;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
71
|
+
1. The element is detached from the DOM
|
|
72
|
+
2. The element was created but never attached
|
|
73
|
+
3. You are working with a document node instead of an element`)}function wg(r,e){if(!e)return;const t=Mo(r),s=e instanceof Document?e:Mo(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
74
|
+
Common causes:
|
|
75
|
+
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
76
|
+
2. Element from one iframe, root from another
|
|
77
|
+
3. Element from main document, root from iframe (or vice versa)
|
|
78
|
+
|
|
79
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function vg(r,e={}){var G,J,K,N;var t;if(!r||!r.ownerDocument||!r.isConnected)return null;const s=M(M({},Hm),e);if(s.root)try{wg(r,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const i=(G=s.cache)!=null?G:bg(),n=i.getEID(r);if(n!==void 0)return n;if(r.tagName.toLowerCase()==="html"){const F=new Ao(s,i),H=xg(r,s,F);return i.setEID(r,H),H}const o=new Gm(s,i),l=new qm(s,i),a=new Ao(s,i),c=new fg,u=o.findAnchor(r);if(!u&&!s.fallbackToBody)return null;const h=(K=(J=u==null?void 0:u.element)!=null?J:(t=r.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:xe.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,r,a),v=a.extract(r);s.enableSvgFingerprint&&Sg(r)&&(v.svg=c.fingerprint(r));const b=r.parentElement;let C;if(b){const F=Array.from(b.children).indexOf(r);F!==-1&&(C=F+1)}const x={tag:r.tagName.toLowerCase(),semantics:v,score:a.scoreElement(r),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,W=Cg(g.degraded,S),_={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:W}};return _.meta.confidence=pg(_),_.meta.confidence<s.confidenceThreshold?null:(i.setEID(r,_),_)}function Sg(r){return r.namespaceURI==="http://www.w3.org/2000/svg"||r.tagName.toLowerCase()==="svg"||r instanceof SVGElement}function Cg(r,e){if(r&&e.degraded)return"anchor-and-path-degraded";if(r)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function xg(r,e,t,s){const i={tag:"html",semantics:t.extract(r),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 jl={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Io(r){return r==="id"?101:Fe[r]!==void 0?Fe[r]:r.startsWith("data-")?Fe["data-*"]:r.startsWith("aria-")?Fe["aria-*"]:0}function Eg(r){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(r)}function Ag(r){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r))}function Mg(r,e){const t=M(M({},jl),e),s=`v${r.version}`,i=Rr(r.anchor,!1,t),n=r.path.length>0?r.path.map(a=>Rr(a,!1,t)).join(" > ")+" > ":"",o=Rr(r.target,!0,t),l=t.includeConstraints?Ig(r):"";return`${s}: ${i} :: ${n}${o}${l}`}function Rr(r,e=!1,t=jl){const{tag:s,semantics:i}=r;let n=s;const o=[],l=M({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=Io(h),m=h==="href"||h==="src"?Gl(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Ul.has(h.name)||Vl.has(h.name)&&Hl(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${gi(d)}"`);if(t.includeText&&i.text&&!Ag(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${gi(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Io(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=Xm(i.classes),d=!!i.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in r&&r.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Eg);e&&t.simplifyTarget&&h||(n+=`#${r.nthChild}`)}return n}function Ig(r){if(!r.constraints||r.constraints.length===0)return"";const e=[];for(const t of r.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 s=gi(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function gi(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Ng(r,e,t){const s=vg(r,e);return s?Mg(s,t):null}const Et={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Rg(r){var e,t,s,i;return r===!1?null:r===!0||r===void 0?M({},Et):{maxPathDepth:(e=r.maxPathDepth)!=null?e:Et.maxPathDepth,enableSvgFingerprint:(t=r.enableSvgFingerprint)!=null?t:Et.enableSvgFingerprint,confidenceThreshold:(s=r.confidenceThreshold)!=null?s:Et.confidenceThreshold,fallbackToBody:(i=r.fallbackToBody)!=null?i:Et.fallbackToBody}}function No(r,e,t,s){const i=e.getMeta(r),n=i==null?void 0:i.selector;if(n&&!(s!=null&&s.force))return n;const o=r.nodeType===Node.ELEMENT_NODE?r:nr(r);if(!o)return n;const l=e.getMeta(o),a=l==null?void 0:l.selector;if(a&&!(s!=null&&s.force))return a;if(!t)return a!=null?a:n;const c={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const u=Ng(o,c);if(u)return l?l.selector=u:i&&(i.selector=u),u}catch(u){}return a!=null?a:n}function Ro(r){return"__ln"in r}class Tg{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)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&&Ro(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Ro(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.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 To=(r,e)=>`${r}@${e}`,Og=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Dg(r){const e=r.toLowerCase();return Og.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class $g{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"selectorOptions",null),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new Tg,i=a=>{let c=a,u=Dt;for(;u===Dt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=$.parentNode(a);if(!c||!ln(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){const m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=It(c)?this.mirror.getId(an(a)):this.mirror.getId(c),d=i(a);if(h===-1||d===-1)return s.addNode(a);const f=rt(a,{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=>{at(m,this.mirror)&&this.iframeManager.addIframe(m),rn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Pe(a)&&this.shadowDomManager.addShadowRoot($.shadowRoot(a),this.doc)},onIframeLoad:(m,y)=>{this.iframeManager.attachIframe(m,y),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,y)=>{this.stylesheetManager.attachLinkElement(m,y)},cssCaptured:u,selectorOptions:this.selectorOptions});f&&(e.push({parentId:h,nextId:d,node:f}),t.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Oo(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has($.parentNode(a))||n(a);for(const a of this.addedSet)!Do(this.droppedSet,a)&&!Oo(this.removesSubTreeCache,a,this.mirror)||Do(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;s.length;){let a=null;if(o){const c=this.mirror.getId($.parentNode(o.value)),u=i(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=s.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId($.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){a=u;break}else{const f=u.value,m=$.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=$.host(m);if(this.mirror.getId(y)!==-1){a=u;break}}}}}}if(!a){for(;s.head;)s.removeNode(s.head.value);break}o=a.previous,s.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const c=a.node,u=$.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:No(c,this.mirror,this.selectorOptions)}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:c}=a;if(typeof c.style=="string"){const u=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c,selector:No(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(Dg)})}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const s=Array.from($.childNodes(e),i=>$.textContent(i)||"").join("");t.attributes.value=Ns({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Rs(e),value:s,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Ms(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=$.textContent(e.target);!ae(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:oa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,nr(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let s=e.attributeName,i=e.target.getAttribute(s);const o=t[s],l=typeof o=="boolean",a=document.contains(t),c=Ci(t),u=Lr(s,this.excludeAttribute);if(i===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:$.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(Lr(s,this.excludeAttribute)){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:$.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(s==="value"){const f=Rs(t);i=Ns({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:i,maskInputFn:this.maskInputFn})}if(ae(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)s="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),s==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!na(t.tagName,s))if(d.attributes[s]=ia(this.doc,ze(t.tagName),ze(s),i),s!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${pe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===o?"mirrored in DOM property":null,i===d.attributes[s]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:$.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,transformedValue:d.attributes[s],excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u}),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const p=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);p!==m.style.getPropertyValue(y)||g!==m.style.getPropertyPriority(y)?g===""?d.styleDiff[y]=p:d.styleDiff[y]=[p,g]:d._unchangedStyles[y]=[p,g]}for(const y of Array.from(m.style))t.style.getPropertyValue(y)===""&&(d.styleDiff[y]=!1)}else s==="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(ae(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 s=this.mirror.getId(t),i=It(e.target)?this.mirror.getId($.host(e.target)):this.mirror.getId(e.target);ae(e.target,this.blockClass,this.blockSelector,!1)||Ms(t,this.mirror,this.slimDOMOptions)||!Pl(t,this.mirror)||(this.addedSet.has(t)?(yi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||en(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[To(s,i)]?yi(this.movedSet,t):(this.removes.push({parentId:i,id:s,isShadow:It(e.target)&&Nt(e.target)?!0:void 0}),kg(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ms(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&s!==-1&&(this.movedMap[To(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ae(e,this.blockClass,this.blockSelector,!1)||($.childNodes(e).forEach(s=>this.genAdds(s)),Pe(e)&&$.childNodes($.shadowRoot(e)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,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()}}function yi(r,e){r.delete(e),$.childNodes(e).forEach(t=>yi(r,t))}function kg(r,e){const t=[r];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),$.childNodes(s).forEach(i=>t.push(i)))}}function Oo(r,e,t){return r.size===0?!1:_g(r,e)}function _g(r,e,t){const s=$.parentNode(e);return s?r.has(s):!1}function Do(r,e){return r.size===0?!1:Yl(r,e)}function Yl(r,e){const t=$.parentNode(e);return t?r.has(t)?!0:Yl(r,t):!1}let Tt;function Lg(r){Tt=r}function Pg(){Tt=void 0}const P=r=>Tt?(...t)=>{try{return r(...t)}catch(s){if(Tt&&Tt(s)===!0)return;throw s}}:r,Ye=[];function gt(r){try{if("composedPath"in r){const e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function Zl(r,e){const t=new $g;Ye.push(t),t.init(r);const s=new(Ll())(P(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Fg({mousemoveCb:r,sampling:e,doc:t,mirror:s}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=mt(P(h=>{const d=Date.now()-l;r(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=P(mt(P(h=>{const d=gt(h),{clientX:f,clientY:m}=Us(h)?h.changedTouches[0]:h;l||(l=pe()),o.push({x:f,y:m,id:s.getId(d),timeOffset:pe()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),u=[ie("mousemove",c,t),ie("touchmove",c,t),ie("drag",c,t)];return P(()=>{u.forEach(h=>h())})}function Bg({mouseInteractionCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const c=u=>h=>{const d=gt(h);if(ae(d,s,i,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Ie.Mouse;break;case"touch":f=Ie.Touch;break;case"pen":f=Ie.Pen;break}f===Ie.Touch?V[u]===V.MouseDown?m="TouchStart":V[u]===V.MouseUp&&(m="TouchEnd"):Ie.Pen}else Us(h)&&(f=Ie.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===Ie.Touch||m.startsWith("Mouse")&&f===Ie.Mouse)&&(f=null)):V[u]===V.Click&&(f=a,a=null);const y=Us(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:S}=y;P(r)(M({type:V[m],id:p,x:g,y:S},f!==null&&{pointerType:f}))};return Object.keys(V).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=ze(u);const d=c(u);if(window.PointerEvent)switch(V[u]){case V.MouseDown:case V.MouseUp:h=h.replace("mouse","pointer");break;case V.TouchStart:case V.TouchEnd:return}l.push(ie(h,d,e))}),P(()=>{l.forEach(u=>u())})}function Xl({scrollCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,sampling:n}){const o=P(mt(P(l=>{const a=gt(l);if(!a||ae(a,s,i,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=qi(e.defaultView);r({id:c,x:u.left,y:u.top})}else r({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ie("scroll",o,e)}function zg({viewportResizeCb:r},{win:e}){let t=-1,s=-1;const i=P(mt(P(()=>{const n=Ki(),o=Qi();(t!==n||s!==o)&&(r({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return ie("resize",i,e)}function Wg({navigationCb:r,doc:e,sampling:t}){if(t.navigation===!1)return()=>{};const s=e.defaultView;if(!s)return()=>{};let i=s.location.href;const n=[],o=P(c=>{const u=s.location.href;u!==i&&(r({href:u,oldHref:i,navigationType:c}),i=u)}),l=Oe(s.history,"pushState",function(c){return function(...u){const h=c.apply(this,u);return o("pushState"),h}});n.push(l);const a=Oe(s.history,"replaceState",function(c){return function(...u){const h=c.apply(this,u);return o("replaceState"),h}});return n.push(a),n.push(ie("popstate",()=>o("popstate"),s)),n.push(ie("hashchange",()=>o("hashchange"),s)),P(()=>{n.forEach(c=>c())})}const Tr=["INPUT","TEXTAREA","SELECT"],$o=new WeakMap,Ug=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],ko=new WeakMap;function Vg({inputCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(v){let b=gt(v);const C=v.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=$.parentElement(b)),!b||!x||Tr.indexOf(x)<0||ae(b,s,i,!0)||b.classList.contains(n)||o&&b.matches(o))return;let R=b.value,T=!1;const z=Rs(b)||"";z==="radio"||z==="checkbox"?T=b.checked:(l[x.toLowerCase()]||l[z])&&(R=Ns({element:b,maskInputOptions:l,tagName:x,type:z,value:R,maskInputFn:a})),d(b,u?{text:R,isChecked:T,userTriggered:C}:{text:R,isChecked:T});const W=b.name;z==="radio"&&W&&T&&e.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(_=>{if(_!==b){const G=_.value;d(_,u?{text:G,isChecked:!T,userTriggered:!1}:{text:G,isChecked:!T})}})}function d(v,b){const C=$o.get(v),x=v,R=x.hasAttribute("placeholder"),T=x.value==="",z=typeof x.defaultValue=="string"?x.defaultValue==="":!0,W=!b.userTriggered,_=!C||C.text==="",G=R&&T&&z&&_&&W&&!b.isChecked&&x.type!=="hidden"&&Tr.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),K=!b.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&Tr.includes(x.tagName),N=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!C,F=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!C;if(G||J||K||N||F){console.debug(`[${pe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:$.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:G,isRenderDrivenTextInput:J,isValueFromDefault:K,isPhantomCheckbox:N,isPhantomRadio:F});return}if(!C||C.text!==b.text||C.isChecked!==b.isChecked){$o.set(v,b);const H=t.getId(v);P(r)(re(M({},b),{id:H}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(v=>ie(v,P(h),e)),y=v=>{const b=gt(v);if(!b||!b.tagName)return;if(c.input==="all"){h(v);return}const C=b.tagName,x=v.key,R=Ug.includes(x),T=C==="TEXTAREA",z=e.activeElement===b,W=b.value,_=ko.get(b);if(ko.set(b,W),!z){h(v);return}if(R){if(!T){h(v);return}let G=_!=null?_:"",J=0;const K=2,N=()=>{const F=b.value,H=e.activeElement===b,X=F!==G;if(!H){h(v);return}if(X)J=0,G=F;else if(J++,J>=K){h(v);return}requestAnimationFrame(N)};requestAnimationFrame(N);return}};m.push(ie("keydown",P(y),e));const p=e.defaultView;if(!p)return()=>{m.forEach(v=>v())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(v=>jt(v[0],v[1],{set(){P(h)({target:this,isTrusted:!1})}},!1,p))),P(()=>{m.forEach(v=>v())})}function Vs(r){const e=[];function t(s,i){if(bs("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||bs("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||bs("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||bs("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return t(r,e)}function ke(r,e,t){let s,i;return r?(r.ownerNode?s=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:s}):{}}function Hg({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:P((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=ke(h,e,t.styleMirror);return(y&&y!==-1||p&&p!==-1)&&r({id:y,styleId:p,adds:[{rule:f,index:m}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(u,h,d=this.cssRules.length){const f=`${u} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const n=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:P((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,removes:[{index:f}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.removeRule=function(u){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:P((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,replace:f}),u.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:P((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};ws("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(ws("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),ws("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),ws("CSSSupportsRule")&&(a.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:P((d,f,m)=>{const[y,p]=m,{id:g,styleId:S}=ke(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,adds:[{rule:y,index:[...Vs(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:P((d,f,m)=>{const[y]=m,{id:p,styleId:g}=ke(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&r({id:p,styleId:g,removes:[{index:[...Vs(f),y]}]}),d.apply(f,m)})})}),P(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=n,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Jl({mirror:r,stylesheetManager:e},t){var s,i,n;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId($.host(t));const l=t.nodeName==="#document"?(s=t.defaultView)==null?void 0:s.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(d){}return h}}),P(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Gg({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:P((l,a,c)=>{var u;const[h,d,f]=c;if(t.has(h))return n.apply(a,[h,d,f]);const{id:m,styleId:y}=ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,set:{property:h,value:d,priority:f},index:Vs(a.parentRule)}),l.apply(a,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:P((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&r({id:d,styleId:f,remove:{property:h},index:Vs(a.parentRule)}),l.apply(a,c)})}),P(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function jg({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:s,sampling:i,doc:n}){const o=P(a=>mt(P(c=>{const u=gt(c);if(!u||ae(u,e,t,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:y}=u;r({type:a,id:s.getId(u),currentTime:h,volume:d,muted:f,playbackRate:m,loop:y})}),i.media||500)),l=[ie("play",o(_e.Play),n),ie("pause",o(_e.Pause),n),ie("seeked",o(_e.Seeked),n),ie("volumechange",o(_e.VolumeChange),n),ie("ratechange",o(_e.RateChange),n)];return P(()=>{l.forEach(a=>a())})}function Yg({fontCb:r,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return i.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(ArrayBuffer.isView(c)?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):new Uint8Array(c)))}),h};const o=Oe(e.fonts,"add",function(l){return function(a){return setTimeout(P(()=>{const c=i.get(a);c&&(r(c),i.delete(a))}),0),l.apply(this,[a])}});return s.push(()=>{t.FontFace=n}),s.push(o),P(()=>{s.forEach(l=>l())})}function Zg(r){const{doc:e,mirror:t,blockClass:s,blockSelector:i,selectionCb:n}=r;let o=!0;const l=P(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){const d=a.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:y,endOffset:p}=d;ae(f,s,i,!0)||ae(y,s,i,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),ie("selectionchange",l)}function Xg({doc:r,customElementCb:e}){const t=r.defaultView;return!t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Jg(r,e){const{mutationCb:t,mousemoveCb:s,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,navigationCb:l,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:f,selectionCb:m,customElementCb:y}=r;r.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},r.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),s(...p)},r.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},r.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},r.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},r.navigationCb=(...p)=>{e.navigation&&e.navigation(...p),l(...p)},r.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},r.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},r.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},r.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),h(...p)},r.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},r.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},r.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},r.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),y(...p)}}function qg(r,e={}){const t=r.doc.defaultView;if(!t)return()=>{};Jg(r,e);let s;r.recordDOM&&(s=Zl(r,r.doc));const i=Fg(r),n=Bg(r),o=Xl(r),l=zg(r,{win:t}),a=Wg(r),c=Vg(r),u=jg(r);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};r.recordDOM&&(h=Hg(r,{win:t}),d=Jl(r,r.doc),f=Gg(r,{win:t}),r.collectFonts&&(m=Yg(r)));const y=Zg(r),p=Xg(r),g=[];for(const S of r.plugins)g.push(S.observer(S.callback,t,S.options));return P(()=>{var S;Ye.forEach(v=>v.reset()),(S=r.visibilityManager)==null||S.reset(),s==null||s.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),d(),f(),m(),y(),p(),g.forEach(v=>v())})}function bs(r){return typeof window[r]!="undefined"}function ws(r){return!!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}class _o{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,i){const n=s||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const s=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,s,i))}getRemoteId(e,t,s){const i=s||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,s))}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 Kg{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new _o(ra)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _o(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 s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=e.contentWindow)==null||s.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 s;switch(t.type){case I.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:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(s=t.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,s,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(s=>{this.replaceIdOnNode(s,t)})}patchRootIdOnNode(e,t){e.type!==Ne.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class Qg{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Nt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=Zl(re(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Xl(re(M({},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($.host(e))),this.restoreHandlers.push(Jl({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 s=this;this.restoreHandlers.push(Oe(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=$.shadowRoot(this);return l&&ln(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vs=0;vs<nt.length;vs++)At[nt.charCodeAt(vs)]=vs;var ey=function(r){var e=new Uint8Array(r),t,s=e.length,i="";for(t=0;t<s;t+=3)i+=nt[e[t]>>2],i+=nt[(e[t]&3)<<4|e[t+1]>>4],i+=nt[(e[t+1]&15)<<2|e[t+2]>>6],i+=nt[e[t+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},ty=function(r){var e=r.length*.75,t=r.length,s,i=0,n,o,l,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(s=0;s<t;s+=4)n=At[r.charCodeAt(s)],o=At[r.charCodeAt(s+1)],l=At[r.charCodeAt(s+2)],a=At[r.charCodeAt(s+3)],u[i++]=n<<2|o>>4,u[i++]=(o&15)<<4|l>>2,u[i++]=(l&3)<<6|a&63;return c};const Lo=new Map;function sy(r,e){let t=Lo.get(r);return t||(t=new Map,Lo.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}const ql=(r,e,t)=>{if(!r||!(Ql(r,e)||typeof r=="object"))return;const s=r.constructor.name,i=sy(t,s);let n=i.indexOf(r);return n===-1&&(n=i.length,i.push(r)),n};function Is(r,e,t){if(r instanceof Array)return r.map(s=>Is(s,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){const s=r.constructor.name,i=ey(r);return{rr_type:s,base64:i}}else{if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Is(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){const s=r.constructor.name,{src:i}=r;return{rr_type:s,src:i}}else if(r instanceof HTMLCanvasElement){const s="HTMLImageElement",i=r.toDataURL();return{rr_type:s,src:i}}else{if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Is(r.data,e,t),r.width,r.height]};if(Ql(r,e)||typeof r=="object"){const s=r.constructor.name,i=ql(r,e,t);return{rr_type:s,index:i}}}}return r}const Kl=(r,e,t)=>r.map(s=>Is(s,e,t)),Ql=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>r instanceof e[i]);function ry(r,e,t,s){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Oe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return ae(this.canvas,t,s,!0)||setTimeout(()=>{const u=Kl(c,e,this);r(this.canvas,{type:De["2D"],property:o,args:u})},0),a.apply(this,c)}});i.push(l)}catch(l){const a=jt(e.CanvasRenderingContext2D.prototype,o,{set(c){r(this.canvas,{type:De["2D"],property:o,args:[c],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function iy(r){return r==="experimental-webgl"?"webgl":r}function Po(r,e,t,s){const i=[];try{const n=Oe(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!ae(this,e,t,!0)){const c=iy(l);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Fo(r,e,t,s,i,n){const o=[],l=Object.getOwnPropertyNames(r);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;const c=Oe(r,a,function(u){return function(...h){const d=u.apply(this,h);if(ql(d,n,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const f=Kl(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=jt(r,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function ny(r,e,t,s){const i=[];return i.push(...Fo(e.WebGLRenderingContext.prototype,De.WebGL,r,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Fo(e.WebGL2RenderingContext.prototype,De.WebGL2,r,t,s,e)),()=>{i.forEach(n=>n())}}const ec="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",oy=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),Bo=typeof self!="undefined"&&self.Blob&&new Blob([oy(ec)],{type:"text/javascript;charset=utf-8"});function ay(r){let e;try{if(e=Bo&&(self.URL||self.webkitURL).createObjectURL(Bo),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+ec,{name:r==null?void 0:r.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ly{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});const{sampling:t="all",win:s,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(s,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,s,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,s,i,n){const o=Po(t,s,i,!0),l=new Map,a=new ay;a.onmessage=m=>{const{id:y}=m.data;if(l.set(y,!1),!("base64"in m.data))return;const{base64:p,type:g,width:S,height:v}=m.data;this.mutationCb({id:y,type:De["2D"],commands:[{property:"clearRect",args:[0,0,S,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(y=>{ae(y,s,i,!0)||m.push(y)}),m},f=m=>{if(u&&m-u<c){h=requestAnimationFrame(f);return}u=m,d().forEach(async y=>{var p;const g=this.mirror.getId(y);if(l.get(g)||y.width===0||y.height===0)return;if(l.set(g,!0),["webgl","webgl2"].includes(y.__context)){const v=y.getContext(y.__context);((p=v==null?void 0:v.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);a.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Po(e,t,s,!1),n=ry(this.processMutation.bind(this),e,t,s),o=ny(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||t===-1)return;const i=s.map(o=>{const c=o,{type:l}=c;return qe(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function cy(r,e,t){var u,h,d,f,m,y;const s=(u=t==null?void 0:t.root)!=null?u:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,o=uy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=hy(s),c=dy(a,o);for(const p of r){const g=p.getBoundingClientRect();let S=my(),v=0;g.width>0&&g.height>0&&(S=fy(g,c),v=py(g,S),v=Math.round(v*100)/100);const b=gy(p),C=(m=e.get(p))!=null?m:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,R=v,T=(C==null?void 0:C.isStyleVisible)&&x>i,z=b&&R>i;!C||T!==z||T!==z&&Math.abs(R-x)>n?l.set(p,{target:p,isVisible:z,isStyleVisible:b,intersectionRatio:R,intersectionRect:S,oldValue:C}):l.set(p,C)}return l}function uy(r){const e=r.trim().split(/\s+/),t=(s,i)=>s.endsWith("%")?parseFloat(s)/100*i:parseFloat(s)||0;return function(s){const i=t(e[0]||"0px",s.height),n=t(e[1]||e[0]||"0px",s.width),o=t(e[2]||e[0]||"0px",s.height),l=t(e[3]||e[1]||e[0]||"0px",s.width);return{top:i,right:n,bottom:o,left:l,width:0,height:0}}}function hy(r){return r?r.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function dy(r,e){const t=e(r);return new DOMRect(r.left-t.left,r.top-t.top,r.width+t.left+t.right,r.height+t.top+t.bottom)}function fy(r,e){const t=Math.max(r.top,e.top),s=Math.max(r.left,e.left),i=Math.min(r.bottom,e.bottom),n=Math.min(r.right,e.right),o=Math.max(0,n-s),l=Math.max(0,i-t);return{top:t,left:s,bottom:i,right:n,width:o,height:l}}function py(r,e){const t=r.width*r.height,s=e.width*e.height;return t>0?s/t:0}function my(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function gy(r){const e=getComputedStyle(r);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class yy{constructor(e){var c,u,h,d,f,m;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"intervalId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:s,sampling:i,mutationCb:n,notifyActivity:o}=e;if(this.mirror=s,this.mutationCb=n,this.notifyActivity=o,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(c=l==null?void 0:l.mode)!=null?c:"none",this.debounce=Number((u=l==null?void 0:l.debounce)!=null?u: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((f=l==null?void 0:l.sensitivity)!=null?f:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(p=>{p.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),p.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).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=cy(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,s]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==s.isVisible||Math.abs(i.intersectionRatio-s.intersectionRatio)>this.sensitivity){const o=this.mirror.getId(t);o!==-1&&this.buffer.set(t,{id:o,isVisible:s.isVisible,ratio:s.intersectionRatio}),this.previousState.set(t,s)}}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;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}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}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!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)}}class by{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new on),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 s={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Jo(l,n.href),index:a}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class wy{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).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 vy="3.1.1-alpha.2";let te,Ge,Or,lt=!1;const Hs=[];let je;function Sy(r){return new Promise(t=>{const s=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let n=!1;return()=>{n||(n=!0,s())}})();["interactive","complete"].includes(r.document.readyState)?i():(r.addEventListener("DOMContentLoaded",i,{once:!0}),r.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],r=>r*2)[0]!==2){const r=document.createElement("iframe");document.body.appendChild(r),Array.from=((wn=r.contentWindow)==null?void 0:wn.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}const fe=qo();function ue(r={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:s,checkoutEveryNvm:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,excludeAttribute:c,maskTextClass:u="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,maskAllInputs:f,maskInputOptions:m,slimDOMOptions:y,maskInputFn:p,maskTextFn:g,hooks:S,packFn:v,sampling:b={},dataURLOptions:C={},mousemoveWait:x,recordDOM:R=!0,recordCanvas:T=!1,recordCrossOriginIframes:z=!1,recordAfter:W=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",flushCustomEvent:_=r.flushCustomEvent!==void 0?r.flushCustomEvent:"after",userTriggeredOnInput:G=!1,collectFonts:J=!1,inlineImages:K=!1,plugins:N,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:H=new Set([]),selector:X,errorHandler:le}=r;Lg(le);const me=z?window.parent===window:!0;let de=!1;if(!me)try{window.parent.document&&(de=!1)}catch(L){de=!0}if(me&&!e)throw new Error("emit function is required");if(!me&&!de)return()=>{};x!==void 0&&b.mousemove===void 0&&(b.mousemove=x),fe.reset();const or=c===void 0?/.^/:c,ar=f===!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}:m!==void 0?m:{password:!0},lr=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{},hn=Rg(X);tn();let dn,cr=0,Yt=0;const fn=L=>{for(const ce of N||[])ce.eventProcessor&&(L=ce.eventProcessor(L));return v&&!de&&(L=v(L)),L};te=(L,ce)=>{var ee;const ne=L;if(ne.timestamp=pe(),(ee=Ye[0])!=null&&ee.isFrozen()&&ne.type!==I.FullSnapshot&&!(ne.type===I.IncrementalSnapshot&&ne.data.source===E.Mutation)&&(Ye.forEach(ge=>ge.unfreeze()),$e==null||$e.unfreeze()),me)e==null||e(fn(ne),ce);else if(de){const ge={type:"rrweb",event:fn(ne),isCheckout:ce};window.parent.postMessage(ge,"*")}if(ne.type===I.FullSnapshot)dn=ne,cr=0,Yt=0;else if(ne.type===I.IncrementalSnapshot){if(ne.data.source===E.Mutation&&ne.data.isAttachIframe)return;if(ne.data.source!==E.Visibility){cr++;const ge=s&&cr>=s,Je=t&&ne.timestamp-dn.timestamp>t;(ge||Je)&&Ge(!0)}}};const Zt=L=>{te({type:I.IncrementalSnapshot,data:M({source:E.Mutation},L)})},ac=L=>{te({type:I.IncrementalSnapshot,data:M({source:E.Visibility},L)})},pn=L=>te({type:I.IncrementalSnapshot,data:M({source:E.Scroll},L)}),mn=L=>te({type:I.IncrementalSnapshot,data:M({source:E.CanvasMutation},L)}),lc=L=>te({type:I.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},L)}),Ve=new by({mutationCb:Zt,adoptedStyleSheetCb:lc}),He=new Kg({mirror:fe,mutationCb:Zt,stylesheetManager:Ve,recordCrossOriginIframes:z,wrappedEmit:te});for(const L of N||[])L.getMirror&&L.getMirror({nodeMirror:fe,crossOriginIframeMirror:He.crossOriginIframeMirror,crossOriginIframeStyleMirror:He.crossOriginIframeStyleMirror});const ur=new wy;Or=new ly({recordCanvas:T,mutationCb:mn,win:window,blockClass:n,blockSelector:o,mirror:fe,sampling:b.canvas,dataURLOptions:C});const Xt=new Qg({mutationCb:Zt,scrollCb:pn,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:u,maskTextSelector:h,excludeAttribute:or,inlineStylesheet:d,maskInputOptions:ar,dataURLOptions:C,maskTextFn:g,maskInputFn:p,recordCanvas:T,inlineImages:K,sampling:b,slimDOMOptions:lr,iframeManager:He,stylesheetManager:Ve,canvasManager:Or,keepIframeSrcFn:F,processedNodeManager:ur,selectorOptions:hn},mirror:fe}),cc=R&&(i!=null||(b==null?void 0:b.visibility)!==void 0&&(b==null?void 0:b.visibility)!==!1);let $e;if(cc){const L=typeof(b==null?void 0:b.visibility)=="object"&&(b==null?void 0:b.visibility)!==null?b.visibility:{},ce=L.recordVisibility===!0;$e=new yy({doc:document,mirror:fe,sampling:L,mutationCb:ce?ac:()=>{},notifyActivity:i!=null?ee=>{Yt+=ee,Yt>=i&&(Ge(!0),Yt=0)}:void 0})}Ge=(L=!1)=>{if(!R)return;te({type:I.Meta,data:{href:window.location.href,width:Qi(),height:Ki()}},L),Ve.reset(),Xt.init(),Ye.forEach(ee=>ee.lock()),$e==null||$e.lock();const ce=rh(document,{mirror:fe,blockClass:n,blockSelector:o,maskTextClass:u,maskTextSelector:h,excludeAttribute:or,inlineStylesheet:d,maskAllInputs:ar,maskTextFn:g,maskInputFn:p,slimDOM:lr,dataURLOptions:C,recordCanvas:T,inlineImages:K,onSerialize:ee=>{at(ee,fe)&&He.addIframe(ee),rn(ee,fe)&&Ve.trackLinkElement(ee),Pe(ee)&&Xt.addShadowRoot($.shadowRoot(ee),document)},onIframeLoad:(ee,ne)=>{He.attachIframe(ee,ne),Xt.observeAttachShadow(ee)},onStylesheetLoad:(ee,ne)=>{Ve.attachLinkElement(ee,ne)},keepIframeSrcFn:F,selector:X});if(!ce)return console.warn("Failed to snapshot the document");te({type:I.FullSnapshot,data:{node:ce,initialOffset:qi(window)}},L),Ye.forEach(ee=>ee.unlock()),$e==null||$e.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ve.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))},je=()=>{for(const L of Hs)te(L);Hs.length=0};try{const L=[],ce=ge=>{var Je;return P(qg)({mutationCb:Zt,mousemoveCb:(j,hr)=>te({type:I.IncrementalSnapshot,data:{source:hr,positions:j}}),mouseInteractionCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.MouseInteraction},j)}),scrollCb:pn,viewportResizeCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.ViewportResize},j)}),navigationCb:j=>{console.debug(`[${pe()}] [rrweb:record/navigation] \u{1F9ED} Navigation detected:`,j.navigationType,j.oldHref,"\u2192",j.href),Ge(!0)},inputCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.Input},j)}),mediaInteractionCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.MediaInteraction},j)}),styleSheetRuleCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.StyleSheetRule},j)}),styleDeclarationCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.StyleDeclaration},j)}),canvasMutationCb:mn,visibilityManager:$e,fontCb:j=>te({type:I.IncrementalSnapshot,data:M({source:E.Font},j)}),selectionCb:j=>{te({type:I.IncrementalSnapshot,data:M({source:E.Selection},j)})},customElementCb:j=>{te({type:I.IncrementalSnapshot,data:M({source:E.CustomElement},j)})},blockClass:n,ignoreClass:l,ignoreSelector:a,maskTextClass:u,maskTextSelector:h,excludeAttribute:or,maskInputOptions:ar,inlineStylesheet:d,sampling:b,recordDOM:R,recordCanvas:T,inlineImages:K,userTriggeredOnInput:G,collectFonts:J,doc:ge,maskInputFn:p,maskTextFn:g,keepIframeSrcFn:F,blockSelector:o,slimDOMOptions:lr,dataURLOptions:C,selectorOptions:hn,mirror:fe,iframeManager:He,stylesheetManager:Ve,shadowDomManager:Xt,processedNodeManager:ur,canvasManager:Or,ignoreCSSAttributes:H,plugins:((Je=N==null?void 0:N.filter(j=>j.observer))==null?void 0:Je.map(j=>({observer:j.observer,options:j.options,callback:hr=>te({type:I.Plugin,data:{plugin:j.name,payload:hr}})})))||[]},S)};He.addLoadListener(ge=>{try{L.push(ce(ge.contentDocument))}catch(Je){console.warn(Je)}});const ee=()=>{_==="before"&&je(),Ge(),L.push(ce(document)),lt=!0,_==="after"&&je()},ne=async()=>{_==="before"&&je(),W==="DOMContentStabilized"&&(console.debug(`[${pe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await Sy(window),console.debug(`[${pe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${pe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),Ge(),L.push(ce(document)),lt=!0,_==="after"&&je()};return document.readyState==="interactive"||document.readyState==="complete"?ee():(L.push(ie("DOMContentLoaded",()=>{te({type:I.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&ee()})),L.push(ie("load",()=>{te({type:I.Load,data:{}}),W==="load"&&ee()},window))),()=>{je(),L.forEach(ge=>ge()),ur.destroy(),lt=!1,Pg()}}catch(L){console.warn(L)}}ue.getVersion=()=>vy;ue.isRecording=()=>lt;ue.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Hs.length} events`),je()};ue.addCustomEvent=(r,e)=>{const t={type:I.Custom,data:{tag:r,payload:e}};if(!lt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${r}`),Hs.push(t);return}te(t)};ue.freezePage=()=>{Ye.forEach(r=>r.freeze())};ue.takeFullSnapshot=r=>{if(!lt)throw new Error("please take full snapshot after start recording");Ge(r)};ue.mirror=fe;function tc(r){return{all:r=r||new Map,on:function(e,t){var s=r.get(e);s?s.push(t):r.set(e,[t])},off:function(e,t){var s=r.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var s=r.get(e);s&&s.slice().map(function(i){i(t)}),(s=r.get("*"))&&s.slice().map(function(i){i(e,t)})}}}const Cy=Object.freeze(Object.defineProperty({__proto__:null,default:tc},Symbol.toStringTag,{value:"Module"}));function xy(r=window,e=document){if("scrollBehavior"in e.documentElement.style&&r.__forceSmoothScrollPolyfill__!==!0)return;const t=r.HTMLElement||r.Element,s=468,i={scroll:r.scroll||r.scrollTo,scrollBy:r.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now;function o(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const l=o(r.navigator.userAgent)?1:0;function a(g,S){this.scrollLeft=g,this.scrollTop=S}function c(g){return .5*(1-Math.cos(Math.PI*g))}function u(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+l<g.scrollHeight;if(S==="X")return g.clientWidth+l<g.scrollWidth}function d(g,S){const v=r.getComputedStyle(g,null)["overflow"+S];return v==="auto"||v==="scroll"}function f(g){const S=h(g,"Y")&&d(g,"Y"),v=h(g,"X")&&d(g,"X");return S||v}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=n();let v,b,C,x=(S-g.startTime)/s;x=x>1?1:x,v=c(x),b=g.startX+(g.x-g.startX)*v,C=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,b,C),(b!==g.x||C!==g.y)&&r.requestAnimationFrame(y.bind(r,g))}function p(g,S,v){let b,C,x,R;const T=n();g===e.body?(b=r,C=r.scrollX||r.pageXOffset,x=r.scrollY||r.pageYOffset,R=i.scroll):(b=g,C=g.scrollLeft,x=g.scrollTop,R=a),y({scrollable:b,method:R,startTime:T,startX:C,startY:x,x:S,y:v})}r.scroll=r.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:r.scrollY||r.pageYOffset);return}p.call(r,e.body,arguments[0].left!==void 0?~~arguments[0].left:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:r.scrollY||r.pageYOffset)}},r.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}p.call(r,e.body,~~arguments[0].left+(r.scrollX||r.pageXOffset),~~arguments[0].top+(r.scrollY||r.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;p.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=m(this),S=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+v.left-S.left,g.scrollTop+v.top-S.top),r.getComputedStyle(g).position!=="fixed"&&r.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):r.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Ey{constructor(e=[],t){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,s=this.actions.length-1;for(;t<=s;){const i=Math.floor((t+s)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)s=i-1;else return i+1}return t}}function zo(r,e){if(r.type===I.IncrementalSnapshot&&r.data.source===E.MouseMove&&r.data.positions&&r.data.positions.length){const t=r.data.positions[0].timeOffset,s=r.timestamp+t;return r.delay=s-e,s-e}return r.delay=r.timestamp-e,r.delay}/*! *****************************************************************************
|
|
70
80
|
Copyright (c) Microsoft Corporation.
|
|
71
81
|
|
|
72
82
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -79,8 +89,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
79
89
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
80
90
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
81
91
|
PERFORMANCE OF THIS SOFTWARE.
|
|
82
|
-
***************************************************************************** */function wo(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var s,i,o=t.call(r),n=[];try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)n.push(s.value)}catch(a){i={error:a}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}var tt;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(tt||(tt={}));var Nl={type:"xstate.init"};function Sr(r){return r===void 0?[]:[].concat(r)}function Je(r){return{type:"xstate.assign",assignment:r}}function vo(r,e){return typeof(r=typeof r=="string"&&e&&e[r]?e[r]:r)=="string"?{type:r}:typeof r=="function"?{type:r.name,exec:r}:r}function Bs(r){return function(e){return r===e}}function Ol(r){return typeof r=="string"?{type:r}:r}function So(r,e){return{value:r,context:e,actions:[],changed:!1,matches:Bs(r)}}function Co(r,e,t){var s=e,i=!1;return[r.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},s);return typeof o.assignment=="function"?n=o.assignment(s,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](s,t):o.assignment[a]}),s=n,!1}return!0}),s,i]}function Tl(r,e){e===void 0&&(e={});var t=wo(Co(Sr(r.states[r.initial].entry).map(function(n){return vo(n,e.actions)}),r.context,Nl),2),s=t[0],i=t[1],o={config:r,_options:e,initialState:{value:r.initial,actions:s,context:i,matches:Bs(r.initial)},transition:function(n,a){var l,c,u=typeof n=="string"?{value:n,context:r.context}:n,h=u.value,f=u.context,m=Ol(a),p=r.states[h];if(p.on){var y=Sr(p.on[m.type]);try{for(var d=function(G){var j=typeof Symbol=="function"&&Symbol.iterator,oe=j&&G[j],fe=0;if(oe)return oe.call(G);if(G&&typeof G.length=="number")return{next:function(){return G&&fe>=G.length&&(G=void 0),{value:G&&G[fe++],done:!G}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var S=g.value;if(S===void 0)return So(h,f);var v=typeof S=="string"?{target:S}:S,b=v.target,C=v.actions,E=C===void 0?[]:C,N=v.cond,O=N===void 0?function(){return!0}:N,U=b===void 0,L=b!=null?b:h,P=r.states[L];if(O(f,m)){var H=wo(Co((U?Sr(E):[].concat(p.exit,E,P.entry).filter(function(G){return G})).map(function(G){return vo(G,o._options.actions)}),f,m),3),Q=H[0],ee=H[1],R=H[2],te=b!=null?b:h;return{value:te,context:ee,actions:Q,changed:b!==h||Q.length>0||R,matches:Bs(te)}}}}catch(G){l={error:G}}finally{try{g&&!g.done&&(c=d.return)&&c.call(d)}finally{if(l)throw l.error}}}return So(h,f)}};return o}var Eo=function(r,e){return r.actions.forEach(function(t){var s=t.exec;return s&&s(r.context,e)})};function Dl(r){var e=r.initialState,t=tt.NotStarted,s=new Set,i={_machine:r,send:function(o){t===tt.Running&&(e=r.transition(e,o),Eo(e,Ol(o)),s.forEach(function(n){return n(e)}))},subscribe:function(o){return s.add(o),o(e),{unsubscribe:function(){return s.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:r.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:Bs(n.value)}}return t=tt.Running,Eo(e,Nl),i},stop:function(){return t=tt.Stopped,s.clear(),i},get state(){return e},get status(){return t}};return i}function ng(r,e){for(let t=r.length-1;t>=0;t--){const s=r[t];if(s.type===I.Meta&&s.timestamp<=e)return r.slice(t)}return r}function og(r,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const i=Tl({id:"player",context:r,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Je({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Je((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ie(A({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:c,lastPlayedEvent:u}=o;a.clear();for(const p of l)bo(p,c);const h=ng(l,c);let f=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===I.IncrementalSnapshot&&u.data.source===x.MouseMove&&(f=u.timestamp+((n=u.data.positions[0])==null?void 0:n.timeOffset)),c<(f||0)&&s.emit(F.PlayBack);const m=new Array;for(const p of h)if(!(f&&f<c&&(p.timestamp<=f||p===u)))if(p.timestamp<=c)m.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(m),s.emit(F.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Je(o=>ie(A({},o),{lastPlayedEvent:null})),startLive:Je({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Je((o,n)=>{const{baselineTime:a,timer:l,events:c}=o;if(n.type==="ADD_EVENT"){const{event:u}=n.payload;bo(u,a);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);c[d].timestamp<=u.timestamp?y=d+1:h=d-1}p===-1&&(p=y),c.splice(p,0,u)}const f=u.timestamp<a,m=e(u,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:u.delay})}return ie(A({},o),{events:c})})}});return Dl(i)}function ag(r){const e=Tl({id:"speed",context:r,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:Je({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Dl(e)}const lg=r=>[`.${r} { background: currentColor }`,"noscript { display: none !important; }"],xo=new Map;function kl(r,e){let t=xo.get(r);return t||(t=new Map,xo.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}function De(r,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await De(r,e,t)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(t||e===null)return s;const{rr_type:i,index:o}=s;return kl(e,i)[o]}else if("args"in s){const{rr_type:i,args:o}=s,n=window[i];return new n(...await Promise.all(o.map(De(r,e,t))))}else{if("base64"in s)return _m(s.base64);if("src"in s){const i=r.get(s.src);if(i)return i;{const o=new Image;return o.src=s.src,r.set(s.src,o),o}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(De(r,e,t)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(De(r,e,t)));return s}}function cg(r,e){try{return e===Ae.WebGL?r.getContext("webgl")||r.getContext("experimental-webgl"):r.getContext("webgl2")}catch(t){return null}}const ug=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function hg(r,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!ug.includes(t))return;const s=kl(r,t);s.includes(e)||s.push(e)}async function fg({mutation:r,target:e,type:t,imageMap:s,errorHandler:i}){try{const o=cg(e,t);if(!o)return;if(r.setter){o[r.property]=r.args[0];return}const n=o[r.property],a=await Promise.all(r.args.map(De(s,o))),l=n.apply(o,a);hg(o,l);const c=!1}catch(o){i(r,o)}}async function dg({event:r,mutations:e,target:t,imageMap:s,errorHandler:i}){const o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(De(s,o))));(await Promise.all(n)).forEach((l,c)=>{const u=e[c];try{if(u.setter){o[u.property]=u.args[0];return}const h=o[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(s.get(r),h.apply(o,u.args)):h.apply(o,l)}catch(h){i(u,h)}})}async function oi({event:r,mutation:e,target:t,imageMap:s,canvasEventMap:i,errorHandler:o}){try{const n=i.get(r)||e,a="commands"in n?n.commands:[n];if([Ae.WebGL,Ae.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const c=a[l];await fg({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:o})}return}await dg({event:r,mutations:a,target:t,imageMap:s,errorHandler:o})}catch(n){o(e,n)}}class pg{constructor(e){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(F.Start,this.start.bind(this)),this.emitter.on(F.SkipStart,this.start.bind(this)),this.emitter.on(F.Pause,this.pause.bind(this)),this.emitter.on(F.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const o=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=s.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var m,p,y,d,g;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:c,loop:u}=s;return{isPlaying:o===Ne.Play||o!==Ne.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:i==null?void 0:i.playbackRate)!=null?p:1,volume:(y=c!=null?c:i==null?void 0:i.volume)!=null?y:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=u!=null?u:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=s,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=s.getMeta(i);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let c=1;typeof a.rr_mediaPlaybackRate=="number"&&(c=a.rr_mediaPlaybackRate);let u=!1;typeof a.rr_mediaMuted=="boolean"?u=a.rr_mediaMuted:u=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:c,volume:f,muted:u,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function ms(r,e){if(r.nodeName!=="DIALOG"||r instanceof ye)return;const t=r,s=t.open,i=s&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(s&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),n&&(a?t.showModal():t.show())}}function mg(r,e){if(r.nodeName!=="DIALOG"||r instanceof ye)return;const t=r;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const gg=5*1e3,yg=Rl||sg,Mo="[replayer]",Cr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Io(r){return r.type==I.IncrementalSnapshot&&(r.data.source==x.TouchMove||r.data.source==x.MouseInteraction&&r.data.type==B.TouchStart)}class bg{constructor(e,t){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new ft),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",yg()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Fn()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",No()),w(this,"styleMirror",new Zi),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),w(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),w(this,"getCastFn",(a,l=!1)=>{let c;switch(a.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:c=()=>{this.emitter.emit(F.CustomEvent,a)};break;case I.Meta:c=()=>this.emitter.emit(F.Resize,{width:a.data.width,height:a.data.height});break;case I.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case I.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/gg),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(F.SkipStart,f)}}};break}return()=>{c&&c();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(F.Finish))};let m=50;a.type===I.IncrementalSnapshot&&a.data.source===x.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(F.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Cr,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(F.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(F.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,c,u)=>{oi({event:l,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,c)=>{l.source===x.StyleSheetRule?this.applyStyleSheetRule(l,c):l.source===x.StyleDeclaration&&this.applyStyleDeclaration(l,c)},afterAppend:(l,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{$s(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[l],u=_s(c.node,this.mirror,this.virtualDom.mirror);$s(u,c.node,a,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(F.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new ig([],{speed:this.config.speed});this.service=og({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(F.StateChange,{player:a})}),this.speedService=ag({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(F.StateChange,{speed:a})}),this.mediaManager=new pg({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===I.Meta),n=this.service.state.context.events.find(a=>a.type===I.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(F.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(Io)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(F.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(F.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(F.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(F.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Io(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Fn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(rg(this.iframe.contentWindow,this.iframe.contentDocument),Hi(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,o=(l,c)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(s,l),this.mediaManager.isSupportedMediaElement(l)){const{events:u}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-u[0].timestamp,this.mirror)}for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Af(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:c}of s)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>ms(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(F.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const i=lg(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,fl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:x.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(s=o.sheet)==null||s.insertRule(i[n],n)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);const c=s.getMeta(a);if((c==null?void 0:c.type)===xe.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:u,head:h}=t.contentDocument;this.insertStyleRules(u,h)}if(!this.usingVirtualDom)for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:l,replayer:this})};Ct(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);o.forEach(a=>ms(a))}collectIframeAndAttachDocument(e,t){if(st(t,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let i,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(F.Start,n),this.emitter.on(F.Pause,n);const a=()=>{this.emitter.off(F.Start,n),this.emitter.off(F.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(s.add(l),l.addEventListener("load",()=>{s.delete(l),s.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(F.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(F.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===x.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),i=s.getContext("2d"),o=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(De(this.imageMap,null,s)));return ie(A({},o),{args:n})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,ie(A({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(De(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,ie(A({},e),{args:i}))}}}applyIncremental(e,t){var s,i,o;const{data:n}=e;switch(n.source){case x.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((s=n.positions[0])==null?void 0:s.timeOffset)});break;case x.MouseInteraction:{if(n.id===-1)break;const a=new Event(ke(B[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(F.MouseInteraction,{type:n.type,target:l});const{triggerFocus:c}=this.config;switch(n.type){case B.Blur:"blur"in l&&l.blur();break;case B.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case B.Click:case B.TouchStart:case B.TouchEnd:case B.MouseDown:case B.MouseUp:t?(n.type===B.TouchStart?this.touchActive=!0:n.type===B.TouchEnd&&(this.touchActive=!1),n.type===B.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===B.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===B.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===B.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===B.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===B.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case B.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case x.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case x.ViewportResize:this.emitter.emit(F.Resize,{width:n.width,height:n.height});break;case x.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case x.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-c[0].timestamp,mutation:n});break}case x.StyleSheetRule:case x.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);oi({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case x.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case x.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Xp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],h=hl(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return;let f=s.getNode(c.parentId);if(!f)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&Te(f)&&(f=f.shadowRoot),s.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((u=f.rules)==null?void 0:u.length)>0&&(f.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const i=A({},this.legacy_missingNodeRetryMap),o=[],n=c=>{let u=null;return c.nextId&&(u=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},a=c=>{var u,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=s.getNode(c.parentId);if(!f)return c.node.type===xe.Document?this.newDocumentQueue.push(c):o.push(c);c.node.isShadow&&(Te(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(c.previousId&&(m=s.getNode(c.previousId)),c.nextId&&(p=s.getNode(c.nextId)),n(c))return o.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const y=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(st(f,s)){this.attachDocumentToIframe(c,f);return}const d=(v,b)=>{if(!this.usingVirtualDom){ms(v);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(v,{id:b,replayer:this})}},g=Ct(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:g,mutation:c};return}const S=s.getMeta(f);if(S&&S.type===xe.Element&&c.node.type===xe.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const b of v)b.nodeType===f.TEXT_NODE&&f.removeChild(b);else if(S.tagName==="style"&&v.length===1)for(const b of v)b.nodeType===f.TEXT_NODE&&!s.hasNode(b)&&(g.textContent=b.textContent,f.removeChild(b))}else if((S==null?void 0:S.type)===xe.Document){const v=f;c.node.type===xe.DocumentType&&((u=v.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(g,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(g,p):f.insertBefore(g,null):f.appendChild(g),d(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),st(g,this.mirror)){const v=this.mirror.getId(g),b=this.newDocumentQueue.find(C=>C.parentId===v);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==b))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,g,c)};e.adds.forEach(c=>{a(c)});const l=Date.now();for(;o.length;){const c=gl(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)s.getNode(u.value.parentId)?Gi(u,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),yl(e.texts).forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(m=>m.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const f=h.parentElement;if(c.value&&f&&f.tagName==="STYLE"?h.textContent=Gs(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const m=h.parentNode;((u=m==null?void 0:m.rules)==null?void 0:u.length)>0&&(m.rules=[])}}),e.attributes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const f in c.attributes)if(typeof f=="string"){const m=c.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&mg(h,c);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=s.getMeta(h),y=Ct(ie(A({},p),{attributes:A(A({},p.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,c.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),s.replace(c.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&ms(h,c)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];y.style.setProperty(d,g[0],g[1])}else{const g=p[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var s,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===xe.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:i,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(i),c=this.mirror.getNode(n);if(!l||!c)return;const u=new Range;u.setStart(l,o),u.setEnd(c,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:u,selection:f}});t.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===x.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===x.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,i,o,n;if((s=e.adds)==null||s.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:u}=ii(l);Qe(t.cssRules,c).insertRule(a,u)}else{const c=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,c)}}catch(c){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:c}=ii(a);Qe(t.cssRules,l).deleteRule(c||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&Qe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Qe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(a=>{var l;let c=null,u=null;if(Te(s)?u=((l=s.ownerDocument)==null?void 0:l.defaultView)||null:s.nodeName==="#document"&&(u=s.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,a.styleId),this.applyStyleSheetRule({source:x.StyleSheetRule,adds:a.rules},c)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const c=l.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);Te(a)?a.shadowRoot.adoptedStyleSheets=c:a.nodeName==="#document"&&(a.adoptedStyleSheets=c),c.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,i){const{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){const{node:c,mutation:u}=a;t.insertBefore(c,s),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(l){const{node:c,mutation:u}=l;t.insertBefore(c,s.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}}moveAndHover(e,t,s,i,o){const n=this.mirror.getNode(s);if(!n)return this.debugNodeNotFound(o,s);const a=Yi(n,this.iframe),l=e*a.absoluteScale+a.x,c=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:l,y:c}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:i,duration:o}=this.config.mouseTail===!0?Cr:Object.assign({},Cr,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=s,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>x.Mutation&&e.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(F.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Mo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Mo,...e)}}const wg="3.1.1-alpha.1",{getVersion:vg}=ue,{isRecording:Sg}=ue,{flushCustomEventQueue:Cg}=ue,{addCustomEvent:Eg}=ue,{freezePage:xg}=ue,{takeFullSnapshot:Mg}=ue;exports.EventType=I;exports.IncrementalSource=x;exports.MouseInteractions=B;exports.Replayer=bg;exports.ReplayerEvents=F;exports.addCustomEvent=Eg;exports.canvasMutation=oi;exports.flushCustomEventQueue=Cg;exports.freezePage=xg;exports.getVersion=vg;exports.isRecording=Sg;exports.record=ue;exports.takeFullSnapshot=Mg;exports.utils=fm;exports.version=wg;
|
|
83
|
-
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
92
|
+
***************************************************************************** */function Wo(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var s,i,n=t.call(r),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var ot;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(ot||(ot={}));var sc={type:"xstate.init"};function Dr(r){return r===void 0?[]:[].concat(r)}function tt(r){return{type:"xstate.assign",assignment:r}}function Uo(r,e){return typeof(r=typeof r=="string"&&e&&e[r]?e[r]:r)=="string"?{type:r}:typeof r=="function"?{type:r.name,exec:r}:r}function Gs(r){return function(e){return r===e}}function rc(r){return typeof r=="string"?{type:r}:r}function Vo(r,e){return{value:r,context:e,actions:[],changed:!1,matches:Gs(r)}}function Ho(r,e,t){var s=e,i=!1;return[r.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof n.assignment=="function"?o=n.assignment(s,t):Object.keys(n.assignment).forEach(function(l){o[l]=typeof n.assignment[l]=="function"?n.assignment[l](s,t):n.assignment[l]}),s=o,!1}return!0}),s,i]}function ic(r,e){e===void 0&&(e={});var t=Wo(Ho(Dr(r.states[r.initial].entry).map(function(o){return Uo(o,e.actions)}),r.context,sc),2),s=t[0],i=t[1],n={config:r,_options:e,initialState:{value:r.initial,actions:s,context:i,matches:Gs(r.initial)},transition:function(o,l){var a,c,u=typeof o=="string"?{value:o,context:r.context}:o,h=u.value,d=u.context,f=rc(l),m=r.states[h];if(m.on){var y=Dr(m.on[f.type]);try{for(var p=function(H){var X=typeof Symbol=="function"&&Symbol.iterator,le=X&&H[X],me=0;if(le)return le.call(H);if(H&&typeof H.length=="number")return{next:function(){return H&&me>=H.length&&(H=void 0),{value:H&&H[me++],done:!H}}};throw new TypeError(X?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=p.next();!g.done;g=p.next()){var S=g.value;if(S===void 0)return Vo(h,d);var v=typeof S=="string"?{target:S}:S,b=v.target,C=v.actions,x=C===void 0?[]:C,R=v.cond,T=R===void 0?function(){return!0}:R,z=b===void 0,W=b!=null?b:h,_=r.states[W];if(T(d,f)){var G=Wo(Ho((z?Dr(x):[].concat(m.exit,x,_.entry).filter(function(H){return H})).map(function(H){return Uo(H,n._options.actions)}),d,f),3),J=G[0],K=G[1],N=G[2],F=b!=null?b:h;return{value:F,context:K,actions:J,changed:b!==h||J.length>0||N,matches:Gs(F)}}}}catch(H){a={error:H}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return Vo(h,d)}};return n}var Go=function(r,e){return r.actions.forEach(function(t){var s=t.exec;return s&&s(r.context,e)})};function nc(r){var e=r.initialState,t=ot.NotStarted,s=new Set,i={_machine:r,send:function(n){t===ot.Running&&(e=r.transition(e,n),Go(e,rc(n)),s.forEach(function(o){return o(e)}))},subscribe:function(n){return s.add(n),n(e),{unsubscribe:function(){return s.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:r.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Gs(o.value)}}return t=ot.Running,Go(e,sc),i},stop:function(){return t=ot.Stopped,s.clear(),i},get state(){return e},get status(){return t}};return i}function Ay(r,e){for(let t=r.length-1;t>=0;t--){const s=r[t];if(s.type===I.Meta&&s.timestamp<=e)return r.slice(t)}return r}function My(r,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const i=ic({id:"player",context:r,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:tt({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:tt((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),re(M({},n),{timeOffset:l,baselineTime:n.events[0].timestamp+l})}),play(n){var o;const{timer:l,events:a,baselineTime:c,lastPlayedEvent:u}=n;l.clear();for(const m of a)zo(m,c);const h=Ay(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===I.IncrementalSnapshot&&u.data.source===E.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(U.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<c&&(m.timestamp<=d||m===u)))if(m.timestamp<=c)f.push(m);else{const y=e(m,!1);l.addAction({doAction:()=>{y()},delay:m.delay})}t(f),s.emit(U.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:tt(n=>re(M({},n),{lastPlayedEvent:null})),startLive:tt({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:tt((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;zo(u,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let m=-1,y=0;for(;y<=h;){const p=Math.floor((y+h)/2);c[p].timestamp<=u.timestamp?y=p+1:h=p-1}m===-1&&(m=y),c.splice(m,0,u)}const d=u.timestamp<l,f=e(u,d);d?f():a.isActive()&&a.addAction({doAction:()=>{f()},delay:u.delay})}return re(M({},n),{events:c})})}});return nc(i)}function Iy(r){const e=ic({id:"speed",context:r,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:tt({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return nc(e)}const Ny=r=>[`.${r} { background: currentColor }`,"noscript { display: none !important; }"],jo=new Map;function oc(r,e){let t=jo.get(r);return t||(t=new Map,jo.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}function Be(r,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Be(r,e,t)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(t||e===null)return s;const{rr_type:i,index:n}=s;return oc(e,i)[n]}else if("args"in s){const{rr_type:i,args:n}=s,o=window[i];return new o(...await Promise.all(n.map(Be(r,e,t))))}else{if("base64"in s)return ty(s.base64);if("src"in s){const i=r.get(s.src);if(i)return i;{const n=new Image;return n.src=s.src,r.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Be(r,e,t)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Be(r,e,t)));return s}}function Ry(r,e){try{return e===De.WebGL?r.getContext("webgl")||r.getContext("experimental-webgl"):r.getContext("webgl2")}catch(t){return null}}const Ty=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Oy(r,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Ty.includes(t))return;const s=oc(r,t);s.includes(e)||s.push(e)}async function Dy({mutation:r,target:e,type:t,imageMap:s,errorHandler:i}){try{const n=Ry(e,t);if(!n)return;if(r.setter){n[r.property]=r.args[0];return}const o=n[r.property],l=await Promise.all(r.args.map(Be(s,n))),a=o.apply(n,l);Oy(n,a);const c=!1}catch(n){i(r,n)}}async function $y({event:r,mutations:e,target:t,imageMap:s,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(Be(s,n))));(await Promise.all(o)).forEach((a,c)=>{const u=e[c];try{if(u.setter){n[u.property]=u.args[0];return}const h=n[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(s.get(r),h.apply(n,u.args)):h.apply(n,a)}catch(h){i(u,h)}})}async function bi({event:r,mutation:e,target:t,imageMap:s,canvasEventMap:i,errorHandler:n}){try{const o=i.get(r)||e,l="commands"in o?o.commands:[o];if([De.WebGL,De.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await Dy({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await $y({event:r,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class ky{constructor(e){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(U.Start,this.start.bind(this)),this.emitter.on(U.SkipStart,this.start.bind(this)),this.emitter.on(U.Pause,this.pause.bind(this)),this.emitter.on(U.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const n=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let l=s.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(l=l%o),t.currentTime=l}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var f,m,y,p,g;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=s;return{isPlaying:n===_e.Play||n!==_e.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(y=c!=null?c:i==null?void 0:i.volume)!=null?y:1,muted:(p=a!=null?a:i==null?void 0:i.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=u!=null?u:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:i,volume:n,isPlaying:o}=t,l=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=s,e.loop=i,e.playbackRate!==a&&(e.playbackRate=a),o&&!l?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,n=s.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),l=n.attributes;let a=!1;l.rr_mediaState?a=l.rr_mediaState==="played":a=i.getAttribute("autoplay")!==null,a&&o&&i.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let u=!1;typeof l.rr_mediaMuted=="boolean"?u=l.rr_mediaMuted:u=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:a,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:u,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Ss(r,e){if(r.nodeName!=="DIALOG"||r instanceof we)return;const t=r,s=t.open,i=s&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",l=n==="modal";if(!(s&&!(i&&n==="non-modal"||!i&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),o&&(l?t.showModal():t.show())}}function _y(r,e){if(r.nodeName!=="DIALOG"||r instanceof we)return;const t=r;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Ly=5*1e3,Py=tc||Cy,Yo="[replayer]",$r={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Zo(r){return r.type==I.IncrementalSnapshot&&(r.data.source==E.TouchMove||r.data.source==E.MouseInteraction&&r.data.type==V.TouchStart)}class Fy{constructor(e,t){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new yt),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",Py()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Kn()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",qo()),w(this,"styleMirror",new on),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const a of[this.mouseTail,this.iframe])a&&(a.setAttribute("width",String(l.width)),a.setAttribute("height",String(l.height)))}),w(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),w(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:c=()=>{this.emitter.emit(U.CustomEvent,l)};break;case I.Meta:c=()=>this.emitter.emit(U.Resize,{width:l.data.width,height:l.data.height});break;case I.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,a),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case I.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,a),!a&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/Ly),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(U.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,a,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(U.Finish))};let f=50;l.type===I.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(U.EventCast,l)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:$r,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(U.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(U.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{bi({event:a,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(a,c)=>{a.source===E.StyleSheetRule?this.applyStyleSheetRule(a,c):a.source===E.StyleDeclaration&&this.applyStyleDeclaration(a,c)},afterAppend:(a,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{zs(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(a){console.warn(a)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const a in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[a],u=Ws(c.node,this.mirror,this.virtualDom.mirror);zs(u,c.node,l,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(a=>{this.applyStyleSheetMutation(a)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(a=>{this.applyAdoptedStyleSheet(a)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,a]=this.lastMouseDownEvent;l.dispatchEvent(a)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(U.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Ey([],{speed:this.config.speed});this.service=My({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(U.StateChange,{player:l})}),this.speedService=Iy({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(U.StateChange,{speed:l})}),this.mediaManager=new ky({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(l=>l.type===I.Meta),o=this.service.state.context.events.find(l=>l.type===I.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(U.Resize,{width:l,height:a})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Zo)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(U.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(U.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(U.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(U.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Zo(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Kn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(xy(this.iframe.contentWindow,this.iframe.contentDocument),tn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,n=(a,c)=>{if(a.nodeName==="DIALOG"&&i.add(a),this.collectIframeAndAttachDocument(s,a),this.mediaManager.isSupportedMediaElement(a)){const{events:u}=this.service.state.context;this.mediaManager.addMediaElements(a,e.timestamp-u[0].timestamp,this.mirror)}for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),sf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:a,builtNode:c}of s)this.attachDocumentToIframe(a,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(a=>Ss(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(U.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const i=Ny(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,kl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(s=n.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(i,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Ne.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:u,head:h}=t.contentDocument;this.insertStyleRules(u,h)}if(!this.usingVirtualDom)for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:a,replayer:this})};Rt(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of i)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);n.forEach(l=>Ss(l))}collectIframeAndAttachDocument(e,t){if(at(t,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(U.Start,o),this.emitter.on(U.Pause,o);const l=()=>{this.emitter.off(U.Start,o),this.emitter.off(U.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(s.add(a),a.addEventListener("load",()=>{s.delete(a),s.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(U.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(U.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),i=s.getContext("2d"),n=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(Be(this.imageMap,null,s)));return re(M({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Be(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(M({},e),{args:i}))}}}applyIncremental(e,t){var s,i,n;const{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const a={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,t,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:e.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;const l=new Event(ze(V[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(U.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case V.Blur:"blur"in a&&a.blur();break;case V.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case V.Click:case V.TouchStart:case V.TouchEnd:case V.MouseDown:case V.MouseUp:t?(o.type===V.TouchStart?this.touchActive=!0:o.type===V.TouchEnd&&(this.touchActive=!1),o.type===V.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===V.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===V.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===V.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===V.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===V.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case V.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(U.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const a=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:a,timeOffset:e.timestamp-c[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);bi({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(l)}catch(l){this.warn(l)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case E.Visibility:{const{mutations:l}=o;for(const a of l){const c=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);c&&c instanceof Element&&(c.style.visibility=a.isVisible?"visible":"hidden")}break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Em(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],h=$l(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return;let d=s.getNode(c.parentId);if(!d)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&Pe(d)&&(d=d.shadowRoot),s.removeNodeFromMap(h),d)try{d.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw f}});const i=M({},this.legacy_missingNodeRetryMap),n=[],o=c=>{let u=null;return c.nextId&&(u=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},l=c=>{var u,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=s.getNode(c.parentId);if(!d)return c.node.type===Ne.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(Pe(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(c.previousId&&(f=s.getNode(c.previousId)),c.nextId&&(m=s.getNode(c.nextId)),o(c))return n.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const y=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(at(d,s)){this.attachDocumentToIframe(c,d);return}const p=(v,b)=>{if(!this.usingVirtualDom){Ss(v);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(v,{id:b,replayer:this})}},g=Rt(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:g,mutation:c};return}const S=s.getMeta(d);if(S&&S.type===Ne.Element&&c.node.type===Ne.Text){const v=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(S.tagName==="textarea")for(const b of v)b.nodeType===d.TEXT_NODE&&d.removeChild(b);else if(S.tagName==="style"&&v.length===1)for(const b of v)b.nodeType===d.TEXT_NODE&&!s.hasNode(b)&&(g.textContent=b.textContent,d.removeChild(b))}else if((S==null?void 0:S.type)===Ne.Document){const v=d;c.node.type===Ne.DocumentType&&((u=v.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?d.insertBefore(g,f.nextSibling):m&&m.parentNode?d.contains(m)?d.insertBefore(g,m):d.insertBefore(g,null):d.appendChild(g),p(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),at(g,this.mirror)){const v=this.mirror.getId(g),b=this.newDocumentQueue.find(C=>C.parentId===v);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==b))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,d,g,c)};e.adds.forEach(c=>{l(c)});const a=Date.now();for(;n.length;){const c=Fl(n);if(n.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)s.getNode(u.value.parentId)?sn(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Bl(e.texts).forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const d=h.parentElement;if(c.value&&d&&d.tagName==="STYLE"?h.textContent=qs(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const f=h.parentNode;((u=f==null?void 0:f.rules)==null?void 0:u.length)>0&&(f.rules=[])}}),e.attributes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(d=>d.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const d in c.attributes)if(typeof d=="string"){const f=c.attributes[d];if(f===null)h.removeAttribute(d),d==="open"&&_y(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=s.getMeta(h),y=Rt(re(M({},m),{attributes:M(M({},m.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,c.attributes);const p=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,p),s.replace(c.id,y);break}}catch(m){}if(d==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(p=>m.removeChild(p));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(f);y&&m.appendChild(y)}else h.setAttribute(d,f);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&Ss(h,c)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=f,y=h;for(const p in m)if(m[p]===!1)y.style.removeProperty(p);else if(m[p]instanceof Array){const g=m[p];y.style.setProperty(p,g[0],g[1])}else{const g=m[p];y.style.setProperty(p,g)}}}})}applyScroll(e,t){var s,i;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===Ne.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(l){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!a||!c)return;const u=new Range;u.setStart(a,n),u.setEnd(c,l);const h=a.ownerDocument,d=h==null?void 0:h.getSelection();return d&&t.add(d),{range:u,selection:d}});t.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,i,n,o;if((s=e.adds)==null||s.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:c,index:u}=mi(a);it(t.cssRules,c).insertRule(l,u)}else{const c=a===void 0?void 0:Math.min(a,t.cssRules.length);t==null||t.insertRule(l,c)}}catch(c){}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:c}=mi(l);it(t.cssRules,a).deleteRule(c||0)}else t==null||t.deleteRule(l)}catch(a){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(l){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(l){}}applyStyleDeclaration(e,t){e.set&&it(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&it(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(l=>{var a;let c=null,u=null;if(Pe(s)?u=((a=s.ownerDocument)==null?void 0:a.defaultView)||null:s.nodeName==="#document"&&(u=s.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:l.rules},c)}catch(h){}});const i=10;let n=0;const o=(l,a)=>{const c=a.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);Pe(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==a.length&&n<i&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,i){const{previousId:n,nextId:o}=i,l=n&&e[n],a=o&&e[o];if(l){const{node:c,mutation:u}=l;t.insertBefore(c,s),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(a){const{node:c,mutation:u}=a;t.insertBefore(c,s.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}}moveAndHover(e,t,s,i,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const l=nn(o,this.iframe),a=e*l.absoluteScale+l.x,c=t*l.absoluteScale+l.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:a,y:c}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:i,duration:n}=this.config.mouseTail===!0?$r:Object.assign({},$r,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=t,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(a=>l.lineTo(a.x,a.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(U.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Yo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Yo,...e)}}const By="3.1.1-alpha.2",{getVersion:zy}=ue,{isRecording:Wy}=ue,{flushCustomEventQueue:Uy}=ue,{addCustomEvent:Vy}=ue,{freezePage:Hy}=ue,{takeFullSnapshot:Gy}=ue;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=V;exports.Replayer=Fy;exports.ReplayerEvents=U;exports.addCustomEvent=Vy;exports.canvasMutation=bi;exports.flushCustomEventQueue=Uy;exports.freezePage=Hy;exports.getVersion=zy;exports.isRecording=Wy;exports.record=ue;exports.takeFullSnapshot=Gy;exports.utils=Wm;exports.version=By;
|
|
93
|
+
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
84
94
|
var __cp = (to, from, except, desc) => {
|
|
85
95
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
86
96
|
for (let key of Object.getOwnPropertyNames(from)) {
|