@replayops/sdk 0.1.1 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +1,56 @@
1
- var ReplayOpsBundle=(function(exports){'use strict';var Za=Object.defineProperty;var Ya=(t,e)=>{for(var r in e)Za(t,r,{get:e[r],enumerable:true});};var Xa={samplingRate:1,environment:"production",maskInputs:true,maskSelectors:[],ignoreSelectors:[],recordConsole:true,recordNetwork:true,recordNetworkBodies:true,recordErrors:true,capturePerformance:true,captureMemory:true,captureWebVitals:true,tracePropagation:true,tracePropagationTargets:[],live:true,liveChat:true,googleAnalytics:true,batchSize:100,flushIntervalMs:5e3,requireConsent:false,idleTimeoutMs:36e5};function Hn(t){return {...Xa,...t}}var Gn="ro_anon_id",Zn="ro_optout",Yn="ro_consent";function rr(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return (t==="x"?e:e&3|8).toString(16)})}var tr=class{anonymousId;userId;userTraits={};constructor(){this.anonymousId=this.load(Gn)??rr(),this.save(Gn,this.anonymousId);}identify(e,r){this.userId=e,r&&(this.userTraits={...this.userTraits,...r});}setUserProperties(e){this.userTraits={...this.userTraits,...e};}snapshot(){return {anonymousId:this.anonymousId,userId:this.userId,userTraits:Object.keys(this.userTraits).length?this.userTraits:void 0}}isOptedOut(){return this.load(Zn)==="1"}optOut(){this.save(Zn,"1");}setConsent(e){this.save(Yn,e?"1":"0");}hasConsent(){return this.load(Yn)==="1"}load(e){try{return localStorage.getItem(e)}catch{return null}}save(e,r){try{localStorage.setItem(e,r);}catch{}}};function Xn(t){return t>=1?true:t<=0?false:Math.random()<t}var Ja=Object.defineProperty,Ka=(t,e,r)=>e in t?Ja(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,O=(t,e,r)=>Ka(t,typeof e!="symbol"?e+"":e,r),Jn,Qa=Object.defineProperty,el=(t,e,r)=>e in t?Qa(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,Kn=(t,e,r)=>el(t,typeof e!="symbol"?e+"":e,r),ce=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ce||{}),Qn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ei={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},sr={},So={},tl=()=>!!globalThis.Zone;function fn(t){if(sr[t])return sr[t];let e=globalThis[t],r=e.prototype,s=t in Qn?Qn[t]:void 0,n=!!(s&&s.every(c=>{var a,h;return !!((h=(a=Object.getOwnPropertyDescriptor(r,c))==null?void 0:a.get)!=null&&h.toString().includes("[native code]"))})),i=t in ei?ei[t]:void 0,l=!!(i&&i.every(c=>{var a;return typeof r[c]=="function"&&((a=r[c])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!tl())return sr[t]=e.prototype,e.prototype;try{let c=document.createElement("iframe");c.style.display="none",document.body.appendChild(c);let a=c.contentWindow;if(!a)return e.prototype;let h=a[t].prototype;if(!h)return c.remove(),r;let o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(c.classList.add("rr-block"),c.setAttribute("__rrwebUntaintedMutationObserver",""),So[t]=()=>c.remove()):c.remove(),sr[t]=h}catch{return r}}var Gr={};function ze(t,e,r){var s;let n=`${t}.${String(r)}`;if(Gr[n])return Gr[n].call(e);let i=fn(t),l=(s=Object.getOwnPropertyDescriptor(i,r))==null?void 0:s.get;return l?(Gr[n]=l,l.call(e)):e[r]}var Zr={};function Co(t,e,r){let s=`${t}.${String(r)}`;if(Zr[s])return Zr[s].bind(e);let i=fn(t)[r];return typeof i!="function"?e[r]:(Zr[s]=i,i.bind(e))}function rl(t){return ze("Node",t,"ownerDocument")}function sl(t){return ze("Node",t,"childNodes")}function nl(t){return ze("Node",t,"parentNode")}function il(t){return ze("Node",t,"parentElement")}function ol(t){return ze("Node",t,"textContent")}function al(t,e){return Co("Node",t,"contains")(e)}function ll(t){return Co("Node",t,"getRootNode")()}function cl(t){return !t||!("host"in t)?null:ze("ShadowRoot",t,"host")}function ul(t){return t.styleSheets}function dl(t){return !t||!("shadowRoot"in t)?null:ze("Element",t,"shadowRoot")}function hl(t,e){return ze("Element",t,"querySelector")(e)}function fl(t,e){return ze("Element",t,"querySelectorAll")(e)}function pl(){return [fn("MutationObserver").constructor,So.MutationObserver??(()=>{})]}var Eo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Eo=()=>new Date().getTime());function ml(t,e,r){try{if(!(e in t))return ()=>{};let s=t[e],n=r(s);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),t[e]=n,()=>{t[e]=s;}}catch{return ()=>{}}}var he={ownerDocument:rl,childNodes:sl,parentNode:nl,parentElement:il,textContent:ol,contains:al,getRootNode:ll,host:cl,styleSheets:ul,shadowRoot:dl,querySelector:hl,querySelectorAll:fl,nowTimestamp:Eo,mutationObserverCtor:pl,patch:ml};function _o(t){return t.nodeType===t.ELEMENT_NODE}function jt(t){let e=t&&"host"in t&&"mode"in t&&he.host(t)||null;return !!(e&&"shadowRoot"in e&&he.shadowRoot(e)===t)}function zt(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function gl(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function yl(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function Qs(t){try{let e=t.rules||t.cssRules;if(!e)return null;let r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);let s=Array.from(e,n=>Ro(n,r)).join("");return gl(s)}catch{return null}}function Ro(t,e){if(bl(t)){let r;try{r=Qs(t.styleSheet)||yl(t);}catch{r=t.cssText;}return t.styleSheet.href?yr(r,t.styleSheet.href):r}else {let r=t.cssText;return wl(t)&&t.selectorText.includes(":")&&(r=vl(r)),e?yr(r,e):r}}function vl(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function bl(t){return "styleSheet"in t}function wl(t){return "selectorText"in t}var pr=class{constructor(){Kn(this,"idNodeMap",new Map),Kn(this,"nodeMetaMap",new WeakMap);}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let r=this.getId(e);this.idNodeMap.delete(r),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,r){let s=r.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,r);}replace(e,r){let s=this.getNode(e);if(s){let n=this.nodeMetaMap.get(s);n&&this.nodeMetaMap.set(r,n);}this.idNodeMap.set(e,r);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function xl(){return new pr}function mr({element:t,maskInputOptions:e,tagName:r,type:s,value:n,maskInputFn:i}){let l=n||"",c=s&&nt(s);return (e[r.toLowerCase()]||c&&e[c])&&(i?l=i(l,t):l="*".repeat(l.length)),l}function nt(t){return t.toLowerCase()}var ti="__rrweb_original__";function Sl(t){let e=t.getContext("2d");if(!e)return true;let r=50;for(let s=0;s<t.width;s+=r)for(let n=0;n<t.height;n+=r){let i=e.getImageData,l=ti in i?i[ti]:i;if(new Uint32Array(l.call(e,s,n,Math.min(r,t.width-s),Math.min(r,t.height-n)).data.buffer).some(a=>a!==0))return false}return true}function gr(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?nt(e):null}function ko(t,e){let r;try{r=new URL(t,e??window.location.href);}catch{return null}let s=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(s);return n?.[1]??null}function Cl(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var El=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_l=/^(?:[a-z+]+:)?\/\//i,Rl=/^www\..*/i,kl=/^(data:)([^,]*),(.*)/i;function yr(t,e){return (t||"").replace(El,(r,s,n,i,l,c)=>{let a=n||l||c,h=s||i||"";if(!a)return r;if(_l.test(a)||Rl.test(a))return `url(${h}${a}${h})`;if(kl.test(a))return `url(${h}${a}${h})`;if(a[0]==="/")return `url(${h}${Cl(e)+a}${h})`;let o=a.split("#")[0],p=a.substring(o.length),d=e.split("#")[0].split("/"),u=o.split("/");d.pop();for(let m of u)m!=="."&&(m===".."?d.pop():d.push(m));return `url(${h}${d.join("/")}${p}${h})`})}function nr(t,e=false){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ml(t,e,r=false){let s=Array.from(e.childNodes),n=[],i=0;if(s.length>1&&t&&typeof t=="string"){let l=nr(t,r),c=l.length/t.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){let h=nr(s[a].textContent,r),o=100,p=3;for(;p<h.length&&(h[p].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,p),1)!==-1);p++);for(;p<h.length;p++){let d=h.substring(0,p),u=l.split(d),m=-1;if(u.length===2)m=u[0].length;else if(u.length>2&&u[0]===""&&s[a-1].textContent!=="")m=l.indexOf(d,1);else if(u.length===1){if(d=d.substring(0,d.length-1),u=l.split(d),u.length<=1)return n.push(t),n;p=o+1;}else p===h.length-1&&(m=l.indexOf(d));if(u.length>=2&&p>o){let f=s[a-1].textContent;if(f&&typeof f=="string"){let g=nr(f).length;m=l.indexOf(d,g);}m===-1&&(m=u[0].length);}if(m!==-1){let f=Math.floor(m/c);for(;f>0&&f<t.length;){if(i+=1,i>50*s.length)return n.push(t),n;let g=nr(t.substring(0,f),r);if(g.length===m){n.push(t.substring(0,f)),t=t.substring(f),l=l.substring(m);break}else g.length<m?f+=Math.max(1,Math.floor((m-g.length)/c)):f-=Math.max(1,Math.floor((g.length-m)*c));}break}}}}return n.push(t),n}function Tl(t,e){return Ml(t,e).join("/* rr_split */")}var Ol=1,Il=new RegExp("[^a-z0-9-_:]"),Vt=-2;function Mo(){return Ol++}function Nl(t){if(t instanceof HTMLFormElement)return "form";let e=nt(t.tagName);return Il.test(e)?"div":e}var Et,ri,Al=/^[^ \t\n\r\u000c]+/,Dl=/^[, \t\n\r\u000c]+/;function Pl(t,e){if(e.trim()==="")return e;let r=0;function s(i){let l,c=i.exec(e.substring(r));return c?(l=c[0],r+=l.length,l):""}let n=[];for(;s(Dl),!(r>=e.length);){let i=s(Al);if(i.slice(-1)===",")i=kt(t,i.substring(0,i.length-1)),n.push(i);else {let l="";i=kt(t,i);let c=false;for(;;){let a=e.charAt(r);if(a===""){n.push((i+l).trim());break}else if(c)a===")"&&(c=false);else if(a===","){r+=1,n.push((i+l).trim());break}else a==="("&&(c=true);l+=a,r+=1;}}}return n.join(", ")}var si=new WeakMap;function kt(t,e){return !e||e.trim()===""?e:pn(t,e)}function Ll(t){return !!(t.tagName==="svg"||t.ownerSVGElement)}function pn(t,e){let r=si.get(t);if(r||(r=t.createElement("a"),si.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function To(t,e,r,s){return s&&(r==="src"||r==="href"&&!(e==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(e)?kt(t,s):r==="srcset"?Pl(t,s):r==="style"?yr(s,pn(t)):e==="object"&&r==="data"?kt(t,s):s)}function Oo(t,e,r){return ["video","audio"].includes(t)&&e==="autoplay"}function Fl(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return !0}else for(let s=t.classList.length;s--;){let n=t.classList[s];if(e.test(n))return !0}if(r)return t.matches(r)}catch{}return false}function vr(t,e,r){if(!t)return false;if(t.nodeType!==t.ELEMENT_NODE)return r?vr(he.parentNode(t),e,r):false;for(let s=t.classList.length;s--;){let n=t.classList[s];if(e.test(n))return true}return r?vr(he.parentNode(t),e,r):false}function Io(t,e,r,s){let n;if(_o(t)){if(n=t,!he.childNodes(n).length)return false}else {if(he.parentElement(t)===null)return false;n=he.parentElement(t);}try{if(typeof e=="string"){if(s){if(n.closest(`.${e}`))return !0}else if(n.classList.contains(e))return !0}else if(vr(n,e,s))return !0;if(r){if(s){if(n.closest(r))return !0}else if(n.matches(r))return !0}}catch{}return false}function $l(t,e,r){let s=t.contentWindow;if(!s)return;let n=false,i;try{i=s.document.readyState;}catch{return}if(i!=="complete"){let c=setTimeout(()=>{n||(e(),n=true);},r);t.addEventListener("load",()=>{clearTimeout(c),n=true,e();});return}let l="about:blank";if(s.location.href!==l||t.src===l||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e);}function Ul(t,e,r){let s=false,n;try{n=t.sheet;}catch{return}if(n)return;let i=setTimeout(()=>{s||(e(),s=true);},r);t.addEventListener("load",()=>{clearTimeout(i),s=true,e();});}function Bl(t,e){let{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:l,inlineStylesheet:c,maskInputOptions:a={},maskTextFn:h,maskInputFn:o,dataURLOptions:p={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:m,newlyAddedElement:f=false,cssCaptured:g=false}=e,x=jl(r,s);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ce.Document,childNodes:[],compatMode:t.compatMode}:{type:ce.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return {type:ce.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return Wl(t,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:c,maskInputOptions:a,maskInputFn:o,dataURLOptions:p,inlineImages:d,recordCanvas:u,keepIframeSrcFn:m,newlyAddedElement:f,rootId:x});case t.TEXT_NODE:return zl(t,{doc:r,needsMask:l,maskTextFn:h,rootId:x,cssCaptured:g});case t.CDATA_SECTION_NODE:return {type:ce.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return {type:ce.Comment,textContent:he.textContent(t)||"",rootId:x};default:return false}}function jl(t,e){if(!e.hasNode(t))return;let r=e.getId(t);return r===1?void 0:r}function zl(t,e){let{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=e,l=he.parentNode(t),c=l&&l.tagName,a="",h=c==="STYLE"?true:void 0,o=c==="SCRIPT"?true:void 0;return o?a="SCRIPT_PLACEHOLDER":i||(a=he.textContent(t),h&&a&&(a=yr(a,pn(e.doc)))),!h&&!o&&a&&r&&(a=s?s(a,he.parentElement(t)):a.replace(/[\S]/g,"*")),{type:ce.Text,textContent:a||"",rootId:n}}function Wl(t,e){let{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:l={},maskInputFn:c,dataURLOptions:a={},inlineImages:h,recordCanvas:o,keepIframeSrcFn:p,newlyAddedElement:d=false,rootId:u}=e,m=Fl(t,s,n),f=Nl(t),g={},x=t.attributes.length;for(let w=0;w<x;w++){let C=t.attributes[w];Oo(f,C.name,C.value)||(g[C.name]=To(r,f,nt(C.name),C.value));}if(f==="link"&&i){let w=Array.from(r.styleSheets).find(b=>b.href===t.href),C=null;w&&(C=Qs(w)),C&&(delete g.rel,delete g.href,g._cssText=C);}if(f==="style"&&t.sheet){let w=Qs(t.sheet);w&&(t.childNodes.length>1&&(w=Tl(w,t)),g._cssText=w);}if(["input","textarea","select"].includes(f)){let w=t.value,C=t.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=mr({element:t,type:gr(t),tagName:f,value:w,maskInputOptions:l,maskInputFn:c}):C&&(g.checked=C);}if(f==="option"&&(t.selected&&!l.select?g.selected=true:delete g.selected),f==="dialog"&&t.open&&(g.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&o){if(t.__context==="2d")Sl(t)||(g.rr_dataURL=t.toDataURL(a.type,a.quality));else if(!("__context"in t)){let w=t.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=t.width,C.height=t.height;let b=C.toDataURL(a.type,a.quality);w!==b&&(g.rr_dataURL=w);}}if(f==="img"&&h){Et||(Et=r.createElement("canvas"),ri=Et.getContext("2d"));let w=t,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",b=w.crossOrigin,y=()=>{w.removeEventListener("load",y);try{Et.width=w.naturalWidth,Et.height=w.naturalHeight,ri.drawImage(w,0,0),g.rr_dataURL=Et.toDataURL(a.type,a.quality);}catch(S){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?y():w.addEventListener("load",y);return}else console.warn(`Cannot inline img src=${C}! Error: ${S}`);}w.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:w.removeAttribute("crossorigin"));};w.complete&&w.naturalWidth!==0?y():w.addEventListener("load",y);}if(["audio","video"].includes(f)){let w=g;w.rr_mediaState=t.paused?"paused":"played",w.rr_mediaCurrentTime=t.currentTime,w.rr_mediaPlaybackRate=t.playbackRate,w.rr_mediaMuted=t.muted,w.rr_mediaLoop=t.loop,w.rr_mediaVolume=t.volume;}if(d||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),m){let{width:w,height:C}=t.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`};}f==="iframe"&&!p(g.src)&&(t.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(f)&&(v=!0);}catch{}return {type:ce.Element,tagName:f,attributes:g,childNodes:[],isSVG:Ll(t)||void 0,needBlock:m,rootId:u,isCustom:v}}function te(t){return t==null?"":t.toLowerCase()}function No(t){return t===true||t==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function Vl(t,e){if(e.comment&&t.type===ce.Comment)return true;if(t.type===ce.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&ko(t.attributes.href)==="js"))return true;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(te(t.attributes.name).match(/^msapplication-tile(image|color)$/)||te(t.attributes.name)==="application-name"||te(t.attributes.rel)==="icon"||te(t.attributes.rel)==="apple-touch-icon"||te(t.attributes.rel)==="shortcut icon")))return true;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&te(t.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(te(t.attributes.property).match(/^(og|twitter|fb):/)||te(t.attributes.name).match(/^(og|twitter):/)||te(t.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(te(t.attributes.name)==="robots"||te(t.attributes.name)==="googlebot"||te(t.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(te(t.attributes.name)==="author"||te(t.attributes.name)==="generator"||te(t.attributes.name)==="framework"||te(t.attributes.name)==="publisher"||te(t.attributes.name)==="progid"||te(t.attributes.property).match(/^article:/)||te(t.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(te(t.attributes.name)==="google-site-verification"||te(t.attributes.name)==="yandex-verification"||te(t.attributes.name)==="csrf-token"||te(t.attributes.name)==="p:domain_verify"||te(t.attributes.name)==="verify-v1"||te(t.attributes.name)==="verification"||te(t.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function Mt(t,e){let{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,skipChild:a=false,inlineStylesheet:h=true,maskInputOptions:o={},maskTextFn:p,maskInputFn:d,slimDOMOptions:u,dataURLOptions:m={},inlineImages:f=false,recordCanvas:g=false,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:y=()=>false,newlyAddedElement:S=false,cssCaptured:_=false}=e,{needsMask:T}=e,{preserveWhiteSpace:R=true}=e;T||(T=Io(t,l,c,T===void 0));let j=Bl(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:T,inlineStylesheet:h,maskInputOptions:o,maskTextFn:p,maskInputFn:d,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:S,cssCaptured:_});if(!j)return console.warn(t,"not serialized"),null;let D;s.hasNode(t)?D=s.getId(t):Vl(j,u)||!R&&j.type===ce.Text&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?D=Vt:D=Mo();let E=Object.assign(j,{id:D});if(s.add(t,E),D===Vt)return null;x&&x(t);let P=!a;if(E.type===ce.Element){P=P&&!E.needBlock,delete E.needBlock;let L=he.shadowRoot(t);L&&zt(L)&&(E.isShadowHost=true);}if((E.type===ce.Document||E.type===ce.Element)&&P){u.headWhitespace&&E.type===ce.Element&&E.tagName==="head"&&(R=false);let L={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:a,inlineStylesheet:h,maskInputOptions:o,maskTextFn:p,maskInputFn:d,slimDOMOptions:u,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:y,cssCaptured:false};if(!(E.type===ce.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===ce.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(L.cssCaptured=true);for(let J of Array.from(he.childNodes(t))){let ue=Mt(J,L);ue&&E.childNodes.push(ue);}}let U=null;if(_o(t)&&(U=he.shadowRoot(t)))for(let J of Array.from(he.childNodes(U))){let ue=Mt(J,L);ue&&(zt(U)&&(ue.isShadow=true),E.childNodes.push(ue));}}let W=he.parentNode(t);return W&&jt(W)&&zt(W)&&(E.isShadow=true),E.type===ce.Element&&E.tagName==="iframe"&&$l(t,()=>{let L=t.contentDocument;if(L&&v){let U=Mt(L,{doc:L,mirror:s,blockClass:n,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:false,inlineStylesheet:h,maskInputOptions:o,maskTextFn:p,maskInputFn:d,slimDOMOptions:u,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:y});U&&v(t,U);}},w),E.type===ce.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&ko(E.attributes.href)==="css")&&Ul(t,()=>{if(C){let L=Mt(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:false,inlineStylesheet:h,maskInputOptions:o,maskTextFn:p,maskInputFn:d,slimDOMOptions:u,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:y});L&&C(t,L);}},b),E}function ql(t,e){let{mirror:r=new pr,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=true,inlineImages:a=false,recordCanvas:h=false,maskAllInputs:o=false,maskTextFn:p,maskInputFn:d,slimDOM:u=false,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:x,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b=()=>false}=e,y=o===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:o===false?{password:true}:o,S=No(u);return Mt(t,{doc:t,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:y,maskTextFn:p,maskInputFn:d,slimDOMOptions:S,dataURLOptions:m,inlineImages:a,recordCanvas:h,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:x,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b,newlyAddedElement:false})}function Gl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Zl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:true,get:function(){return t[s]}});}),r}var ir={exports:{}},ni;function Yl(){if(ni)return ir.exports;ni=1;var t=String,e=function(){return {isColorSupported:false,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return ir.exports=e(),ir.exports.createColors=e,ir.exports}var Xl={},Jl=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),Ne=Zl(Jl),Yr,ii;function mn(){if(ii)return Yr;ii=1;let t=Yl(),e=Ne;class r extends Error{constructor(n,i,l,c,a,h){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),c&&(this.source=c),h&&(this.plugin=h),typeof i<"u"&&typeof l<"u"&&(typeof i=="number"?(this.line=i,this.column=l):(this.line=i.line,this.column=i.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(n){if(!this.source)return "";let i=this.source;n==null&&(n=t.isColorSupported),e&&n&&(i=e(i));let l=i.split(/\r?\n/),c=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),h=String(a).length,o,p;if(n){let{bold:d,gray:u,red:m}=t.createColors(true);o=f=>d(m(f)),p=f=>u(f);}else o=p=d=>d;return l.slice(c,a).map((d,u)=>{let m=c+1+u,f=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=p(f.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+p(f)+d+`
2
- `+g+o("^")}return " "+p(f)+d}).join(`
3
- `)}toString(){let n=this.showSourceCode();return n&&(n=`
1
+ var ReplayOpsBundle=(function(exports){'use strict';var ul=Object.defineProperty;var dl=(t,e)=>{for(var r in e)ul(t,r,{get:e[r],enumerable:true});};var hl={samplingRate:1,environment:"production",maskInputs:true,maskSelectors:[],ignoreSelectors:[],recordConsole:true,recordNetwork:true,recordNetworkBodies:true,recordErrors:true,capturePerformance:true,captureMemory:true,captureWebVitals:true,tracePropagation:true,tracePropagationTargets:[],live:true,liveChat:true,testerTools:true,googleAnalytics:true,batchSize:100,flushIntervalMs:5e3,maxBatchBytes:1048576,requireConsent:false,idleTimeoutMs:36e5};function ri(t){return {...hl,...t}}var si="ro_anon_id",ni="ro_optout",ii="ro_consent",oi="ro_consent_marketing",Qr="ro_user_id",es="ro_user_email";function nr(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return (t==="x"?e:e&3|8).toString(16)})}var sr=class{anonymousId;userId;userTraits={};rememberedUserId;rememberedEmail;constructor(){this.anonymousId=this.load(si)??nr(),this.save(si,this.anonymousId),this.rememberedUserId=this.load(Qr)??void 0,this.rememberedEmail=this.load(es)??void 0;}identify(e,r){this.userId=e,r&&(this.userTraits={...this.userTraits,...r}),this.rememberedUserId=e,this.save(Qr,e);let n=this.userTraits.email;typeof n=="string"&&n&&(this.rememberedEmail=n,this.save(es,n));}setUserProperties(e){this.userTraits={...this.userTraits,...e};}subjects(){let e=this.userTraits.email;return [this.userId??this.rememberedUserId,(typeof e=="string"?e:void 0)??this.rememberedEmail]}forgetUser(){this.rememberedUserId=void 0,this.rememberedEmail=void 0,this.save(Qr,""),this.save(es,"");}get anonymous(){return this.anonymousId}snapshot(){return {anonymousId:this.anonymousId,userId:this.userId,userTraits:Object.keys(this.userTraits).length?this.userTraits:void 0}}isOptedOut(){return this.load(ni)==="1"}optOut(){this.save(ni,"1"),this.forgetUser();}setConsent(e){this.save(ii,e?"1":"0");}hasConsent(){return this.load(ii)==="1"}setMarketingConsent(e){this.save(oi,e?"1":"0");}marketingConsent(){let e=this.load(oi);return e==="1"?true:e==="0"?false:void 0}load(e){try{return localStorage.getItem(e)}catch{return null}}save(e,r){try{localStorage.setItem(e,r);}catch{}}};function fl(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return e>>>0}function pl(t){return fl(t)/4294967296}function ai(t,e="session",r=""){return !Number.isFinite(t)||t>=1?true:t<=0?false:e==="user"&&r?pl(r)<t:Math.random()<t}async function ml(t){let e=t.trim().toLowerCase();if(!e)return null;let r=typeof crypto<"u"?crypto.subtle:void 0;if(!r)return null;try{let n=new TextEncoder().encode(e),s=await r.digest("SHA-256",n);return [...new Uint8Array(s)].map(i=>i.toString(16).padStart(2,"0")).join("")}catch{return null}}async function li(t,e){if(!t||t.mode==="off")return;let r=e.filter(u=>!!u&&!!u.trim());if(r.length===0)return t.mode==="allow"?false:void 0;let s=(await Promise.all(r.map(ml))).filter(u=>u!==null);if(s.length===0)return;let i=new Set(t.hashes),l=s.some(u=>i.has(u));return t.mode==="allow"?l:!l}var gl=Object.defineProperty,yl=(t,e,r)=>e in t?gl(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,O=(t,e,r)=>yl(t,typeof e!="symbol"?e+"":e,r),ci,vl=Object.defineProperty,bl=(t,e,r)=>e in t?vl(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,ui=(t,e,r)=>bl(t,typeof e!="symbol"?e+"":e,r),ue=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ue||{}),di={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ir={},Do={},wl=()=>!!globalThis.Zone;function xn(t){if(ir[t])return ir[t];let e=globalThis[t],r=e.prototype,n=t in di?di[t]:void 0,s=!!(n&&n.every(u=>{var o,h;return !!((h=(o=Object.getOwnPropertyDescriptor(r,u))==null?void 0:o.get)!=null&&h.toString().includes("[native code]"))})),i=t in hi?hi[t]:void 0,l=!!(i&&i.every(u=>{var o;return typeof r[u]=="function"&&((o=r[u])==null?void 0:o.toString().includes("[native code]"))}));if(s&&l&&!wl())return ir[t]=e.prototype,e.prototype;try{let u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);let o=u.contentWindow;if(!o)return e.prototype;let h=o[t].prototype;if(!h)return u.remove(),r;let a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),Do[t]=()=>u.remove()):u.remove(),ir[t]=h}catch{return r}}var ts={};function je(t,e,r){var n;let s=`${t}.${String(r)}`;if(ts[s])return ts[s].call(e);let i=xn(t),l=(n=Object.getOwnPropertyDescriptor(i,r))==null?void 0:n.get;return l?(ts[s]=l,l.call(e)):e[r]}var rs={};function Po(t,e,r){let n=`${t}.${String(r)}`;if(rs[n])return rs[n].bind(e);let i=xn(t)[r];return typeof i!="function"?e[r]:(rs[n]=i,i.bind(e))}function xl(t){return je("Node",t,"ownerDocument")}function Sl(t){return je("Node",t,"childNodes")}function Cl(t){return je("Node",t,"parentNode")}function El(t){return je("Node",t,"parentElement")}function _l(t){return je("Node",t,"textContent")}function Rl(t,e){return Po("Node",t,"contains")(e)}function kl(t){return Po("Node",t,"getRootNode")()}function Ml(t){return !t||!("host"in t)?null:je("ShadowRoot",t,"host")}function Tl(t){return t.styleSheets}function Ol(t){return !t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function Il(t,e){return je("Element",t,"querySelector")(e)}function Nl(t,e){return je("Element",t,"querySelectorAll")(e)}function Al(){return [xn("MutationObserver").constructor,Do.MutationObserver??(()=>{})]}var Lo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Lo=()=>new Date().getTime());function Dl(t,e,r){try{if(!(e in t))return ()=>{};let n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,()=>{t[e]=n;}}catch{return ()=>{}}}var he={ownerDocument:xl,childNodes:Sl,parentNode:Cl,parentElement:El,textContent:_l,contains:Rl,getRootNode:kl,host:Ml,styleSheets:Tl,shadowRoot:Ol,querySelector:Il,querySelectorAll:Nl,nowTimestamp:Lo,mutationObserverCtor:Al,patch:Dl};function Fo(t){return t.nodeType===t.ELEMENT_NODE}function Bt(t){let e=t&&"host"in t&&"mode"in t&&he.host(t)||null;return !!(e&&"shadowRoot"in e&&he.shadowRoot(e)===t)}function zt(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Pl(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function Ll(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function ln(t){try{let e=t.rules||t.cssRules;if(!e)return null;let r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);let n=Array.from(e,s=>Uo(s,r)).join("");return Pl(n)}catch{return null}}function Uo(t,e){if(Ul(t)){let r;try{r=ln(t.styleSheet)||Ll(t);}catch{r=t.cssText;}return t.styleSheet.href?br(r,t.styleSheet.href):r}else {let r=t.cssText;return $l(t)&&t.selectorText.includes(":")&&(r=Fl(r)),e?br(r,e):r}}function Fl(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Ul(t){return "styleSheet"in t}function $l(t){return "selectorText"in t}var gr=class{constructor(){ui(this,"idNodeMap",new Map),ui(this,"nodeMetaMap",new WeakMap);}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){let n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r);}replace(e,r){let n=this.getNode(e);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s);}this.idNodeMap.set(e,r);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function Bl(){return new gr}function yr({element:t,maskInputOptions:e,tagName:r,type:n,value:s,maskInputFn:i}){let l=s||"",u=n&&st(n);return (e[r.toLowerCase()]||u&&e[u])&&(i?l=i(l,t):l="*".repeat(l.length)),l}function st(t){return t.toLowerCase()}var fi="__rrweb_original__";function zl(t){let e=t.getContext("2d");if(!e)return true;let r=50;for(let n=0;n<t.width;n+=r)for(let s=0;s<t.height;s+=r){let i=e.getImageData,l=fi in i?i[fi]:i;if(new Uint32Array(l.call(e,n,s,Math.min(r,t.width-n),Math.min(r,t.height-s)).data.buffer).some(o=>o!==0))return false}return true}function vr(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?st(e):null}function $o(t,e){let r;try{r=new URL(t,e??window.location.href);}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n);return s?.[1]??null}function jl(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Wl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Vl=/^(?:[a-z+]+:)?\/\//i,Hl=/^www\..*/i,ql=/^(data:)([^,]*),(.*)/i;function br(t,e){return (t||"").replace(Wl,(r,n,s,i,l,u)=>{let o=s||l||u,h=n||i||"";if(!o)return r;if(Vl.test(o)||Hl.test(o))return `url(${h}${o}${h})`;if(ql.test(o))return `url(${h}${o}${h})`;if(o[0]==="/")return `url(${h}${jl(e)+o}${h})`;let a=o.split("#")[0],f=o.substring(a.length),d=e.split("#")[0].split("/"),c=a.split("/");d.pop();for(let m of c)m!=="."&&(m===".."?d.pop():d.push(m));return `url(${h}${d.join("/")}${f}${h})`})}function or(t,e=false){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Gl(t,e,r=false){let n=Array.from(e.childNodes),s=[],i=0;if(n.length>1&&t&&typeof t=="string"){let l=or(t,r),u=l.length/t.length;for(let o=1;o<n.length;o++)if(n[o].textContent&&typeof n[o].textContent=="string"){let h=or(n[o].textContent,r),a=100,f=3;for(;f<h.length&&(h[f].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,f),1)!==-1);f++);for(;f<h.length;f++){let d=h.substring(0,f),c=l.split(d),m=-1;if(c.length===2)m=c[0].length;else if(c.length>2&&c[0]===""&&n[o-1].textContent!=="")m=l.indexOf(d,1);else if(c.length===1){if(d=d.substring(0,d.length-1),c=l.split(d),c.length<=1)return s.push(t),s;f=a+1;}else f===h.length-1&&(m=l.indexOf(d));if(c.length>=2&&f>a){let p=n[o-1].textContent;if(p&&typeof p=="string"){let g=or(p).length;m=l.indexOf(d,g);}m===-1&&(m=c[0].length);}if(m!==-1){let p=Math.floor(m/u);for(;p>0&&p<t.length;){if(i+=1,i>50*n.length)return s.push(t),s;let g=or(t.substring(0,p),r);if(g.length===m){s.push(t.substring(0,p)),t=t.substring(p),l=l.substring(m);break}else g.length<m?p+=Math.max(1,Math.floor((m-g.length)/u)):p-=Math.max(1,Math.floor((g.length-m)*u));}break}}}}return s.push(t),s}function Yl(t,e){return Gl(t,e).join("/* rr_split */")}var Zl=1,Xl=new RegExp("[^a-z0-9-_:]"),Wt=-2;function Bo(){return Zl++}function Jl(t){if(t instanceof HTMLFormElement)return "form";let e=st(t.tagName);return Xl.test(e)?"div":e}var Ct,pi,Kl=/^[^ \t\n\r\u000c]+/,Ql=/^[, \t\n\r\u000c]+/;function ec(t,e){if(e.trim()==="")return e;let r=0;function n(i){let l,u=i.exec(e.substring(r));return u?(l=u[0],r+=l.length,l):""}let s=[];for(;n(Ql),!(r>=e.length);){let i=n(Kl);if(i.slice(-1)===",")i=Rt(t,i.substring(0,i.length-1)),s.push(i);else {let l="";i=Rt(t,i);let u=false;for(;;){let o=e.charAt(r);if(o===""){s.push((i+l).trim());break}else if(u)o===")"&&(u=false);else if(o===","){r+=1,s.push((i+l).trim());break}else o==="("&&(u=true);l+=o,r+=1;}}}return s.join(", ")}var mi=new WeakMap;function Rt(t,e){return !e||e.trim()===""?e:Sn(t,e)}function tc(t){return !!(t.tagName==="svg"||t.ownerSVGElement)}function Sn(t,e){let r=mi.get(t);if(r||(r=t.createElement("a"),mi.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function zo(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(e)?Rt(t,n):r==="srcset"?ec(t,n):r==="style"?br(n,Sn(t)):e==="object"&&r==="data"?Rt(t,n):n)}function jo(t,e,r){return ["video","audio"].includes(t)&&e==="autoplay"}function rc(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return !0}else for(let n=t.classList.length;n--;){let s=t.classList[n];if(e.test(s))return !0}if(r)return t.matches(r)}catch{}return false}function wr(t,e,r){if(!t)return false;if(t.nodeType!==t.ELEMENT_NODE)return r?wr(he.parentNode(t),e,r):false;for(let n=t.classList.length;n--;){let s=t.classList[n];if(e.test(s))return true}return r?wr(he.parentNode(t),e,r):false}function Wo(t,e,r,n){let s;if(Fo(t)){if(s=t,!he.childNodes(s).length)return false}else {if(he.parentElement(t)===null)return false;s=he.parentElement(t);}try{if(typeof e=="string"){if(n){if(s.closest(`.${e}`))return !0}else if(s.classList.contains(e))return !0}else if(wr(s,e,n))return !0;if(r){if(n){if(s.closest(r))return !0}else if(s.matches(r))return !0}}catch{}return false}function sc(t,e,r){let n=t.contentWindow;if(!n)return;let s=false,i;try{i=n.document.readyState;}catch{return}if(i!=="complete"){let u=setTimeout(()=>{s||(e(),s=true);},r);t.addEventListener("load",()=>{clearTimeout(u),s=true,e();});return}let l="about:blank";if(n.location.href!==l||t.src===l||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e);}function nc(t,e,r){let n=false,s;try{s=t.sheet;}catch{return}if(s)return;let i=setTimeout(()=>{n||(e(),n=true);},r);t.addEventListener("load",()=>{clearTimeout(i),n=true,e();});}function ic(t,e){let{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:l,inlineStylesheet:u,maskInputOptions:o={},maskTextFn:h,maskInputFn:a,dataURLOptions:f={},inlineImages:d,recordCanvas:c,keepIframeSrcFn:m,newlyAddedElement:p=false,cssCaptured:g=false}=e,x=oc(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ue.Document,childNodes:[],compatMode:t.compatMode}:{type:ue.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return {type:ue.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return lc(t,{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:u,maskInputOptions:o,maskInputFn:a,dataURLOptions:f,inlineImages:d,recordCanvas:c,keepIframeSrcFn:m,newlyAddedElement:p,rootId:x});case t.TEXT_NODE:return ac(t,{doc:r,needsMask:l,maskTextFn:h,rootId:x,cssCaptured:g});case t.CDATA_SECTION_NODE:return {type:ue.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return {type:ue.Comment,textContent:he.textContent(t)||"",rootId:x};default:return false}}function oc(t,e){if(!e.hasNode(t))return;let r=e.getId(t);return r===1?void 0:r}function ac(t,e){let{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:i}=e,l=he.parentNode(t),u=l&&l.tagName,o="",h=u==="STYLE"?true:void 0,a=u==="SCRIPT"?true:void 0;return a?o="SCRIPT_PLACEHOLDER":i||(o=he.textContent(t),h&&o&&(o=br(o,Sn(e.doc)))),!h&&!a&&o&&r&&(o=n?n(o,he.parentElement(t)):o.replace(/[\S]/g,"*")),{type:ue.Text,textContent:o||"",rootId:s}}function lc(t,e){let{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:i,maskInputOptions:l={},maskInputFn:u,dataURLOptions:o={},inlineImages:h,recordCanvas:a,keepIframeSrcFn:f,newlyAddedElement:d=false,rootId:c}=e,m=rc(t,n,s),p=Jl(t),g={},x=t.attributes.length;for(let b=0;b<x;b++){let S=t.attributes[b];jo(p,S.name,S.value)||(g[S.name]=zo(r,p,st(S.name),S.value));}if(p==="link"&&i){let b=Array.from(r.styleSheets).find(w=>w.href===t.href),S=null;b&&(S=ln(b)),S&&(delete g.rel,delete g.href,g._cssText=S);}if(p==="style"&&t.sheet){let b=ln(t.sheet);b&&(t.childNodes.length>1&&(b=Yl(b,t)),g._cssText=b);}if(["input","textarea","select"].includes(p)){let b=t.value,S=t.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=yr({element:t,type:vr(t),tagName:p,value:b,maskInputOptions:l,maskInputFn:u}):S&&(g.checked=S);}if(p==="option"&&(t.selected&&!l.select?g.selected=true:delete g.selected),p==="dialog"&&t.open&&(g.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&a){if(t.__context==="2d")zl(t)||(g.rr_dataURL=t.toDataURL(o.type,o.quality));else if(!("__context"in t)){let b=t.toDataURL(o.type,o.quality),S=r.createElement("canvas");S.width=t.width,S.height=t.height;let w=S.toDataURL(o.type,o.quality);b!==w&&(g.rr_dataURL=b);}}if(p==="img"&&h){Ct||(Ct=r.createElement("canvas"),pi=Ct.getContext("2d"));let b=t,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",w=b.crossOrigin,v=()=>{b.removeEventListener("load",v);try{Ct.width=b.naturalWidth,Ct.height=b.naturalHeight,pi.drawImage(b,0,0),g.rr_dataURL=Ct.toDataURL(o.type,o.quality);}catch(C){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?v():b.addEventListener("load",v);return}else console.warn(`Cannot inline img src=${S}! Error: ${C}`);}b.crossOrigin==="anonymous"&&(w?g.crossOrigin=w:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?v():b.addEventListener("load",v);}if(["audio","video"].includes(p)){let b=g;b.rr_mediaState=t.paused?"paused":"played",b.rr_mediaCurrentTime=t.currentTime,b.rr_mediaPlaybackRate=t.playbackRate,b.rr_mediaMuted=t.muted,b.rr_mediaLoop=t.loop,b.rr_mediaVolume=t.volume;}if(d||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),m){let{width:b,height:S}=t.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(g.src)&&(t.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0);}catch{}return {type:ue.Element,tagName:p,attributes:g,childNodes:[],isSVG:tc(t)||void 0,needBlock:m,rootId:c,isCustom:y}}function ee(t){return t==null?"":t.toLowerCase()}function Vo(t){return t===true||t==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function cc(t,e){if(e.comment&&t.type===ue.Comment)return true;if(t.type===ue.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&$o(t.attributes.href)==="js"))return true;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ee(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(t.attributes.name)==="application-name"||ee(t.attributes.rel)==="icon"||ee(t.attributes.rel)==="apple-touch-icon"||ee(t.attributes.rel)==="shortcut icon")))return true;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&ee(t.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(ee(t.attributes.property).match(/^(og|twitter|fb):/)||ee(t.attributes.name).match(/^(og|twitter):/)||ee(t.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(ee(t.attributes.name)==="robots"||ee(t.attributes.name)==="googlebot"||ee(t.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(ee(t.attributes.name)==="author"||ee(t.attributes.name)==="generator"||ee(t.attributes.name)==="framework"||ee(t.attributes.name)==="publisher"||ee(t.attributes.name)==="progid"||ee(t.attributes.property).match(/^article:/)||ee(t.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(ee(t.attributes.name)==="google-site-verification"||ee(t.attributes.name)==="yandex-verification"||ee(t.attributes.name)==="csrf-token"||ee(t.attributes.name)==="p:domain_verify"||ee(t.attributes.name)==="verify-v1"||ee(t.attributes.name)==="verification"||ee(t.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function kt(t,e){let{doc:r,mirror:n,blockClass:s,blockSelector:i,maskTextClass:l,maskTextSelector:u,skipChild:o=false,inlineStylesheet:h=true,maskInputOptions:a={},maskTextFn:f,maskInputFn:d,slimDOMOptions:c,dataURLOptions:m={},inlineImages:p=false,recordCanvas:g=false,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:v=()=>false,newlyAddedElement:C=false,cssCaptured:_=false}=e,{needsMask:T}=e,{preserveWhiteSpace:R=true}=e;T||(T=Wo(t,l,u,T===void 0));let z=ic(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:T,inlineStylesheet:h,maskInputOptions:a,maskTextFn:f,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:v,newlyAddedElement:C,cssCaptured:_});if(!z)return console.warn(t,"not serialized"),null;let D;n.hasNode(t)?D=n.getId(t):cc(z,c)||!R&&z.type===ue.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?D=Wt:D=Bo();let E=Object.assign(z,{id:D});if(n.add(t,E),D===Wt)return null;x&&x(t);let me=!o;if(E.type===ue.Element){me=me&&!E.needBlock,delete E.needBlock;let P=he.shadowRoot(t);P&&zt(P)&&(E.isShadowHost=true);}if((E.type===ue.Document||E.type===ue.Element)&&me){c.headWhitespace&&E.type===ue.Element&&E.tagName==="head"&&(R=false);let P={doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:u,skipChild:o,inlineStylesheet:h,maskInputOptions:a,maskTextFn:f,maskInputFn:d,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:v,cssCaptured:false};if(!(E.type===ue.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===ue.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(P.cssCaptured=true);for(let q of Array.from(he.childNodes(t))){let te=kt(q,P);te&&E.childNodes.push(te);}}let F=null;if(Fo(t)&&(F=he.shadowRoot(t)))for(let q of Array.from(he.childNodes(F))){let te=kt(q,P);te&&(zt(F)&&(te.isShadow=true),E.childNodes.push(te));}}let L=he.parentNode(t);return L&&Bt(L)&&zt(L)&&(E.isShadow=true),E.type===ue.Element&&E.tagName==="iframe"&&sc(t,()=>{let P=t.contentDocument;if(P&&y){let F=kt(P,{doc:P,mirror:n,blockClass:s,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:u,skipChild:false,inlineStylesheet:h,maskInputOptions:a,maskTextFn:f,maskInputFn:d,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:v});F&&y(t,F);}},b),E.type===ue.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&$o(E.attributes.href)==="css")&&nc(t,()=>{if(S){let P=kt(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:T,maskTextClass:l,maskTextSelector:u,skipChild:false,inlineStylesheet:h,maskInputOptions:a,maskTextFn:f,maskInputFn:d,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:R,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:v});P&&S(t,P);}},w),E}function uc(t,e){let{mirror:r=new gr,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:i="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=true,inlineImages:o=false,recordCanvas:h=false,maskAllInputs:a=false,maskTextFn:f,maskInputFn:d,slimDOM:c=false,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:x,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w=()=>false}=e,v=a===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:a===false?{password:true}:a,C=Vo(c);return kt(t,{doc:t,mirror:r,blockClass:n,blockSelector:s,maskTextClass:i,maskTextSelector:l,skipChild:false,inlineStylesheet:u,maskInputOptions:v,maskTextFn:f,maskInputFn:d,slimDOMOptions:C,dataURLOptions:m,inlineImages:o,recordCanvas:h,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:x,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w,newlyAddedElement:false})}function hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function fc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:true,get:function(){return t[n]}});}),r}var ar={exports:{}},gi;function pc(){if(gi)return ar.exports;gi=1;var t=String,e=function(){return {isColorSupported:false,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return ar.exports=e(),ar.exports.createColors=e,ar.exports}var mc={},gc=Object.freeze(Object.defineProperty({__proto__:null,default:mc},Symbol.toStringTag,{value:"Module"})),Ne=fc(gc),ss,yi;function Cn(){if(yi)return ss;yi=1;let t=pc(),e=Ne;class r extends Error{constructor(s,i,l,u,o,h){super(s),this.name="CssSyntaxError",this.reason=s,o&&(this.file=o),u&&(this.source=u),h&&(this.plugin=h),typeof i<"u"&&typeof l<"u"&&(typeof i=="number"?(this.line=i,this.column=l):(this.line=i.line,this.column=i.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(s){if(!this.source)return "";let i=this.source;s==null&&(s=t.isColorSupported),e&&s&&(i=e(i));let l=i.split(/\r?\n/),u=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),h=String(o).length,a,f;if(s){let{bold:d,gray:c,red:m}=t.createColors(true);a=p=>d(m(p)),f=p=>c(p);}else a=f=d=>d;return l.slice(u,o).map((d,c)=>{let m=u+1+c,p=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=f(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+f(p)+d+`
2
+ `+g+a("^")}return " "+f(p)+d}).join(`
3
+ `)}toString(){let s=this.showSourceCode();return s&&(s=`
4
4
 
5
- `+n+`
6
- `),this.name+": "+this.message+n}}return Yr=r,r.default=r,Yr}var or={},oi;function gn(){return oi||(oi=1,or.isClean=Symbol("isClean"),or.my=Symbol("my")),or}var Xr,ai;function Ao(){if(ai)return Xr;ai=1;let t={after:`
5
+ `+s+`
6
+ `),this.name+": "+this.message+s}}return ss=r,r.default=r,ss}var lr={},vi;function En(){return vi||(vi=1,lr.isClean=Symbol("isClean"),lr.my=Symbol("my")),lr}var ns,bi;function Ho(){if(bi)return ns;bi=1;let t={after:`
7
7
  `,beforeClose:`
8
8
  `,beforeComment:`
9
9
  `,beforeDecl:`
10
10
  `,beforeOpen:" ",beforeRule:`
11
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function e(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,i){let l="@"+n.name,c=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?l+=n.raws.afterName:c&&(l+=" "),n.nodes)this.block(n,l+c);else {let a=(n.raws.between||"")+(i?";":"");this.builder(l+c+a,n);}}beforeAfter(n,i){let l;n.type==="decl"?l=this.raw(n,null,"beforeDecl"):n.type==="comment"?l=this.raw(n,null,"beforeComment"):i==="before"?l=this.raw(n,null,"beforeRule"):l=this.raw(n,null,"beforeClose");let c=n.parent,a=0;for(;c&&c.type!=="root";)a+=1,c=c.parent;if(l.includes(`
12
- `)){let h=this.raw(n,null,"indent");if(h.length)for(let o=0;o<a;o++)l+=h;}return l}block(n,i){let l=this.raw(n,"between","beforeOpen");this.builder(i+l+"{",n,"start");let c;n.nodes&&n.nodes.length?(this.body(n),c=this.raw(n,"after")):c=this.raw(n,"after","emptyBody"),c&&this.builder(c),this.builder("}",n,"end");}body(n){let i=n.nodes.length-1;for(;i>0&&n.nodes[i].type==="comment";)i-=1;let l=this.raw(n,"semicolon");for(let c=0;c<n.nodes.length;c++){let a=n.nodes[c],h=this.raw(a,"before");h&&this.builder(h),this.stringify(a,i!==c||l);}}comment(n){let i=this.raw(n,"left","commentLeft"),l=this.raw(n,"right","commentRight");this.builder("/*"+i+n.text+l+"*/",n);}decl(n,i){let l=this.raw(n,"between","colon"),c=n.prop+l+this.rawValue(n,"value");n.important&&(c+=n.raws.important||" !important"),i&&(c+=";"),this.builder(c,n);}document(n){this.body(n);}raw(n,i,l){let c;if(l||(l=i),i&&(c=n.raws[i],typeof c<"u"))return c;let a=n.parent;if(l==="before"&&(!a||a.type==="root"&&a.first===n||a&&a.type==="document"))return "";if(!a)return t[l];let h=n.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(n,l);{let o="raw"+e(l);this[o]?c=this[o](h,n):h.walk(p=>{if(c=p.raws[i],typeof c<"u")return false});}return typeof c>"u"&&(c=t[l]),h.rawCache[l]=c,c}rawBeforeClose(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return i=l.raws.after,i.includes(`
13
- `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawBeforeComment(n,i){let l;return n.walkComments(c=>{if(typeof c.raws.before<"u")return l=c.raws.before,l.includes(`
14
- `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(n,i){let l;return n.walkDecls(c=>{if(typeof c.raws.before<"u")return l=c.raws.before,l.includes(`
15
- `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(n){let i;return n.walk(l=>{if(l.type!=="decl"&&(i=l.raws.between,typeof i<"u"))return false}),i}rawBeforeRule(n){let i;return n.walk(l=>{if(l.nodes&&(l.parent!==n||n.first!==l)&&typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
16
- `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawColon(n){let i;return n.walkDecls(l=>{if(typeof l.raws.between<"u")return i=l.raws.between.replace(/[^\s:]/g,""),false}),i}rawEmptyBody(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length===0&&(i=l.raws.after,typeof i<"u"))return false}),i}rawIndent(n){if(n.raws.indent)return n.raws.indent;let i;return n.walk(l=>{let c=l.parent;if(c&&c!==n&&c.parent&&c.parent===n&&typeof l.raws.before<"u"){let a=l.raws.before.split(`
17
- `);return i=a[a.length-1],i=i.replace(/\S/g,""),false}}),i}rawSemicolon(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(i=l.raws.semicolon,typeof i<"u"))return false}),i}rawValue(n,i){let l=n[i],c=n.raws[i];return c&&c.value===l?c.raw:l}root(n){this.body(n),n.raws.after&&this.builder(n.raws.after);}rule(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end");}stringify(n,i){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,i);}}return Xr=r,r.default=r,Xr}var Jr,li;function Sr(){if(li)return Jr;li=1;let t=Ao();function e(r,s){new t(s).stringify(r);}return Jr=e,e.default=e,Jr}var Kr,ci;function Cr(){if(ci)return Kr;ci=1;let{isClean:t,my:e}=gn(),r=mn(),s=Ao(),n=Sr();function i(c,a){let h=new c.constructor;for(let o in c){if(!Object.prototype.hasOwnProperty.call(c,o)||o==="proxyCache")continue;let p=c[o],d=typeof p;o==="parent"&&d==="object"?a&&(h[o]=a):o==="source"?h[o]=p:Array.isArray(p)?h[o]=p.map(u=>i(u,h)):(d==="object"&&p!==null&&(p=i(p)),h[o]=p);}return h}class l{constructor(a={}){this.raws={},this[t]=false,this[e]=true;for(let h in a)if(h==="nodes"){this.nodes=[];for(let o of a[h])typeof o.clone=="function"?this.append(o.clone()):this.append(o);}else this[h]=a[h];}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between;}clone(a={}){let h=i(this);for(let o in a)h[o]=a[o];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:o,start:p}=this.rangeBy(h);return this.source.input.error(a,{column:p.column,line:p.line},{column:o.column,line:o.line},h)}return new r(a)}getProxyProcessor(){return {get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,o){return a[h]===o||(a[h]=o,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),true}}}markDirty(){if(this[t]){this[t]=false;let a=this;for(;a=a.parent;)a[t]=false;}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a,h){let o=this.source.start;if(a.index)o=this.positionInside(a.index,h);else if(a.word){h=this.toString();let p=h.indexOf(a.word);p!==-1&&(o=this.positionInside(p,h));}return o}positionInside(a,h){let o=h||this.toString(),p=this.source.start.column,d=this.source.start.line;for(let u=0;u<a;u++)o[u]===`
18
- `?(p=1,d+=1):p+=1;return {column:p,line:d}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a){let h={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(a.word){let p=this.toString(),d=p.indexOf(a.word);d!==-1&&(h=this.positionInside(d,p),o=this.positionInside(d+a.word.length,p));}else a.start?h={column:a.start.column,line:a.start.line}:a.index&&(h=this.positionInside(a.index)),a.end?o={column:a.end.column,line:a.end.line}:typeof a.endIndex=="number"?o=this.positionInside(a.endIndex):a.index&&(o=this.positionInside(a.index+1));return (o.line<h.line||o.line===h.line&&o.column<=h.column)&&(o={column:h.column+1,line:h.line}),{end:o,start:h}}raw(a,h){return new s().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,o=false;for(let p of a)p===this?o=true:o?(this.parent.insertAfter(h,p),h=p):this.parent.insertBefore(h,p);o||this.remove();}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let o={},p=h==null;h=h||new Map;let d=0;for(let u in this){if(!Object.prototype.hasOwnProperty.call(this,u)||u==="parent"||u==="proxyCache")continue;let m=this[u];if(Array.isArray(m))o[u]=m.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,h):f);else if(typeof m=="object"&&m.toJSON)o[u]=m.toJSON(null,h);else if(u==="source"){let f=h.get(m.input);f==null&&(f=d,h.set(m.input,d),d++),o[u]={end:m.end,inputId:f,start:m.start};}else o[u]=m;}return p&&(o.inputs=[...h.keys()].map(u=>u.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=n){a.stringify&&(a=a.stringify);let h="";return a(this,o=>{h+=o;}),h}warn(a,h,o){let p={node:this};for(let d in o)p[d]=o[d];return a.warn(h,p)}get proxyOf(){return this}}return Kr=l,l.default=l,Kr}var Qr,ui;function Er(){if(ui)return Qr;ui=1;let t=Cr();class e extends t{constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Qr=e,e.default=e,Qr}var es,di;function Kl(){if(di)return es;di=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return es={nanoid:(s=21)=>{let n="",i=s;for(;i--;)n+=t[Math.random()*64|0];return n},customAlphabet:(s,n=21)=>(i=n)=>{let l="",c=i;for(;c--;)l+=s[Math.random()*s.length|0];return l}},es}var ts,hi;function Do(){if(hi)return ts;hi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{existsSync:r,readFileSync:s}=Ne,{dirname:n,join:i}=Ne;function l(a){return Buffer?Buffer.from(a,"base64").toString():window.atob(a)}class c{constructor(h,o){if(o.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let p=o.map?o.map.prev:void 0,d=this.loadMap(o.from,p);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=n(this.mapFile)),d&&(this.text=d);}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(h){let o=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,u=/^data:application\/json,/;if(d.test(h)||u.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(o.test(h)||p.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let o=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let p=h.lastIndexOf(o.pop()),d=h.indexOf("*/",p);p>-1&&d>-1&&(this.annotation=this.getAnnotationURL(h.substring(p,d)));}loadFile(h){if(this.root=n(h),r(h))return this.mapFile=h,s(h,"utf-8").toString().trim()}loadMap(h,o){if(o===false)return false;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let p=o(h);if(p){let d=this.loadFile(p);if(!d)throw new Error("Unable to load previous source map: "+p.toString());return d}}else {if(o instanceof t)return e.fromSourceMap(o).toString();if(o instanceof e)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return h&&(p=i(n(h),p)),this.loadFile(p)}}}startWith(h,o){return h?h.substr(0,o.length)===o:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ts=c,c.default=c,ts}var rs,fi;function _r(){if(fi)return rs;fi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{fileURLToPath:r,pathToFileURL:s}=Ne,{isAbsolute:n,resolve:i}=Ne,{nanoid:l}=Kl(),c=Ne,a=mn(),h=Do(),o=Symbol("fromOffsetCache"),p=!!(t&&e),d=!!(i&&n);class u{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!d||/^\w+:\/\//.test(g.from)||n(g.from)?this.file=g.from:this.file=i(g.from)),d&&p){let x=new h(this.css,g);if(x.text){this.map=x;let v=x.consumer().file;!this.file&&v&&(this.file=this.mapResolve(v));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(f,g,x,v={}){let w,C,b;if(g&&typeof g=="object"){let S=g,_=x;if(typeof S.offset=="number"){let T=this.fromOffset(S.offset);g=T.line,x=T.col;}else g=S.line,x=S.column;if(typeof _.offset=="number"){let T=this.fromOffset(_.offset);C=T.line,b=T.col;}else C=_.line,b=_.column;}else if(!x){let S=this.fromOffset(g);g=S.line,x=S.col;}let y=this.origin(g,x,C,b);return y?w=new a(f,y.endLine===void 0?y.line:{column:y.column,line:y.line},y.endLine===void 0?y.column:{column:y.endColumn,line:y.endLine},y.source,y.file,v.plugin):w=new a(f,C===void 0?g:{column:x,line:g},C===void 0?x:{column:b,line:C},this.css,this.file,v.plugin),w.input={column:x,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(s&&(w.input.url=s(this.file).toString()),w.input.file=this.file),w}fromOffset(f){let g,x;if(this[o])x=this[o];else {let w=this.css.split(`
19
- `);x=new Array(w.length);let C=0;for(let b=0,y=w.length;b<y;b++)x[b]=C,C+=w[b].length+1;this[o]=x;}g=x[x.length-1];let v=0;if(f>=g)v=x.length-1;else {let w=x.length-2,C;for(;v<w;)if(C=v+(w-v>>1),f<x[C])w=C-1;else if(f>=x[C+1])v=C+1;else {v=C;break}}return {col:f-x[v]+1,line:v+1}}mapResolve(f){return /^\w+:\/\//.test(f)?f:i(this.map.consumer().sourceRoot||this.map.root||".",f)}origin(f,g,x,v){if(!this.map)return false;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:f});if(!C.source)return false;let b;typeof x=="number"&&(b=w.originalPositionFor({column:v,line:x}));let y;n(C.source)?y=s(C.source):y=new URL(C.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let S={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:y.toString()};if(y.protocol==="file:")if(r)S.file=r(y);else throw new Error("file: protocol is not available in this PostCSS build");let _=w.sourceContentFor(C.source);return _&&(S.source=_),S}toJSON(){let f={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(f[g]=this[g]);return this.map&&(f.map={...this.map},f.map.consumerCache&&(f.map.consumerCache=void 0)),f}get from(){return this.file||this.id}}return rs=u,u.default=u,c&&c.registerInput&&c.registerInput(u),rs}var ss,pi;function Po(){if(pi)return ss;pi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{dirname:r,relative:s,resolve:n,sep:i}=Ne,{pathToFileURL:l}=Ne,c=_r(),a=!!(t&&e),h=!!(r&&n&&s&&i);class o{constructor(d,u,m,f){this.stringify=d,this.mapOpts=m.map||{},this.root=u,this.opts=m,this.css=f,this.originalCSS=f,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let u=`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(s){this.builder=s;}atrule(s,i){let l="@"+s.name,u=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?l+=s.raws.afterName:u&&(l+=" "),s.nodes)this.block(s,l+u);else {let o=(s.raws.between||"")+(i?";":"");this.builder(l+u+o,s);}}beforeAfter(s,i){let l;s.type==="decl"?l=this.raw(s,null,"beforeDecl"):s.type==="comment"?l=this.raw(s,null,"beforeComment"):i==="before"?l=this.raw(s,null,"beforeRule"):l=this.raw(s,null,"beforeClose");let u=s.parent,o=0;for(;u&&u.type!=="root";)o+=1,u=u.parent;if(l.includes(`
12
+ `)){let h=this.raw(s,null,"indent");if(h.length)for(let a=0;a<o;a++)l+=h;}return l}block(s,i){let l=this.raw(s,"between","beforeOpen");this.builder(i+l+"{",s,"start");let u;s.nodes&&s.nodes.length?(this.body(s),u=this.raw(s,"after")):u=this.raw(s,"after","emptyBody"),u&&this.builder(u),this.builder("}",s,"end");}body(s){let i=s.nodes.length-1;for(;i>0&&s.nodes[i].type==="comment";)i-=1;let l=this.raw(s,"semicolon");for(let u=0;u<s.nodes.length;u++){let o=s.nodes[u],h=this.raw(o,"before");h&&this.builder(h),this.stringify(o,i!==u||l);}}comment(s){let i=this.raw(s,"left","commentLeft"),l=this.raw(s,"right","commentRight");this.builder("/*"+i+s.text+l+"*/",s);}decl(s,i){let l=this.raw(s,"between","colon"),u=s.prop+l+this.rawValue(s,"value");s.important&&(u+=s.raws.important||" !important"),i&&(u+=";"),this.builder(u,s);}document(s){this.body(s);}raw(s,i,l){let u;if(l||(l=i),i&&(u=s.raws[i],typeof u<"u"))return u;let o=s.parent;if(l==="before"&&(!o||o.type==="root"&&o.first===s||o&&o.type==="document"))return "";if(!o)return t[l];let h=s.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(s,l);{let a="raw"+e(l);this[a]?u=this[a](h,s):h.walk(f=>{if(u=f.raws[i],typeof u<"u")return false});}return typeof u>"u"&&(u=t[l]),h.rawCache[l]=u,u}rawBeforeClose(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return i=l.raws.after,i.includes(`
13
+ `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawBeforeComment(s,i){let l;return s.walkComments(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
14
+ `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(s,i){let l;return s.walkDecls(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
15
+ `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(s){let i;return s.walk(l=>{if(l.type!=="decl"&&(i=l.raws.between,typeof i<"u"))return false}),i}rawBeforeRule(s){let i;return s.walk(l=>{if(l.nodes&&(l.parent!==s||s.first!==l)&&typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
16
+ `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawColon(s){let i;return s.walkDecls(l=>{if(typeof l.raws.between<"u")return i=l.raws.between.replace(/[^\s:]/g,""),false}),i}rawEmptyBody(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length===0&&(i=l.raws.after,typeof i<"u"))return false}),i}rawIndent(s){if(s.raws.indent)return s.raws.indent;let i;return s.walk(l=>{let u=l.parent;if(u&&u!==s&&u.parent&&u.parent===s&&typeof l.raws.before<"u"){let o=l.raws.before.split(`
17
+ `);return i=o[o.length-1],i=i.replace(/\S/g,""),false}}),i}rawSemicolon(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(i=l.raws.semicolon,typeof i<"u"))return false}),i}rawValue(s,i){let l=s[i],u=s.raws[i];return u&&u.value===l?u.raw:l}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after);}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end");}stringify(s,i){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,i);}}return ns=r,r.default=r,ns}var is,wi;function Er(){if(wi)return is;wi=1;let t=Ho();function e(r,n){new t(n).stringify(r);}return is=e,e.default=e,is}var os,xi;function _r(){if(xi)return os;xi=1;let{isClean:t,my:e}=En(),r=Cn(),n=Ho(),s=Er();function i(u,o){let h=new u.constructor;for(let a in u){if(!Object.prototype.hasOwnProperty.call(u,a)||a==="proxyCache")continue;let f=u[a],d=typeof f;a==="parent"&&d==="object"?o&&(h[a]=o):a==="source"?h[a]=f:Array.isArray(f)?h[a]=f.map(c=>i(c,h)):(d==="object"&&f!==null&&(f=i(f)),h[a]=f);}return h}class l{constructor(o={}){this.raws={},this[t]=false,this[e]=true;for(let h in o)if(h==="nodes"){this.nodes=[];for(let a of o[h])typeof a.clone=="function"?this.append(a.clone()):this.append(a);}else this[h]=o[h];}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let h=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let h in o)this[h]=o[h];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between;}clone(o={}){let h=i(this);for(let a in o)h[a]=o[a];return h}cloneAfter(o={}){let h=this.clone(o);return this.parent.insertAfter(this,h),h}cloneBefore(o={}){let h=this.clone(o);return this.parent.insertBefore(this,h),h}error(o,h={}){if(this.source){let{end:a,start:f}=this.rangeBy(h);return this.source.input.error(o,{column:f.column,line:f.line},{column:a.column,line:a.line},h)}return new r(o)}getProxyProcessor(){return {get(o,h){return h==="proxyOf"?o:h==="root"?()=>o.root().toProxy():o[h]},set(o,h,a){return o[h]===a||(o[h]=a,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&o.markDirty()),true}}}markDirty(){if(this[t]){this[t]=false;let o=this;for(;o=o.parent;)o[t]=false;}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,h){let a=this.source.start;if(o.index)a=this.positionInside(o.index,h);else if(o.word){h=this.toString();let f=h.indexOf(o.word);f!==-1&&(a=this.positionInside(f,h));}return a}positionInside(o,h){let a=h||this.toString(),f=this.source.start.column,d=this.source.start.line;for(let c=0;c<o;c++)a[c]===`
18
+ `?(f=1,d+=1):f+=1;return {column:f,line:d}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let h={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(o.word){let f=this.toString(),d=f.indexOf(o.word);d!==-1&&(h=this.positionInside(d,f),a=this.positionInside(d+o.word.length,f));}else o.start?h={column:o.start.column,line:o.start.line}:o.index&&(h=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return (a.line<h.line||a.line===h.line&&a.column<=h.column)&&(a={column:h.column+1,line:h.line}),{end:a,start:h}}raw(o,h){return new n().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,a=false;for(let f of o)f===this?a=true:a?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);a||this.remove();}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let a={},f=h==null;h=h||new Map;let d=0;for(let c in this){if(!Object.prototype.hasOwnProperty.call(this,c)||c==="parent"||c==="proxyCache")continue;let m=this[c];if(Array.isArray(m))a[c]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,h):p);else if(typeof m=="object"&&m.toJSON)a[c]=m.toJSON(null,h);else if(c==="source"){let p=h.get(m.input);p==null&&(p=d,h.set(m.input,d),d++),a[c]={end:m.end,inputId:p,start:m.start};}else a[c]=m;}return f&&(a.inputs=[...h.keys()].map(c=>c.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,a=>{h+=a;}),h}warn(o,h,a){let f={node:this};for(let d in a)f[d]=a[d];return o.warn(h,f)}get proxyOf(){return this}}return os=l,l.default=l,os}var as,Si;function Rr(){if(Si)return as;Si=1;let t=_r();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return as=e,e.default=e,as}var ls,Ci;function yc(){if(Ci)return ls;Ci=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ls={nanoid:(n=21)=>{let s="",i=n;for(;i--;)s+=t[Math.random()*64|0];return s},customAlphabet:(n,s=21)=>(i=s)=>{let l="",u=i;for(;u--;)l+=n[Math.random()*n.length|0];return l}},ls}var cs,Ei;function qo(){if(Ei)return cs;Ei=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{existsSync:r,readFileSync:n}=Ne,{dirname:s,join:i}=Ne;function l(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class u{constructor(h,a){if(a.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let f=a.map?a.map.prev:void 0,d=this.loadMap(a.from,f);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=s(this.mapFile)),d&&(this.text=d);}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(h){let a=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/;if(d.test(h)||c.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(a.test(h)||f.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let a=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let f=h.lastIndexOf(a.pop()),d=h.indexOf("*/",f);f>-1&&d>-1&&(this.annotation=this.getAnnotationURL(h.substring(f,d)));}loadFile(h){if(this.root=s(h),r(h))return this.mapFile=h,n(h,"utf-8").toString().trim()}loadMap(h,a){if(a===false)return false;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let f=a(h);if(f){let d=this.loadFile(f);if(!d)throw new Error("Unable to load previous source map: "+f.toString());return d}}else {if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return h&&(f=i(s(h),f)),this.loadFile(f)}}}startWith(h,a){return h?h.substr(0,a.length)===a:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return cs=u,u.default=u,cs}var us,_i;function kr(){if(_i)return us;_i=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{fileURLToPath:r,pathToFileURL:n}=Ne,{isAbsolute:s,resolve:i}=Ne,{nanoid:l}=yc(),u=Ne,o=Cn(),h=qo(),a=Symbol("fromOffsetCache"),f=!!(t&&e),d=!!(i&&s);class c{constructor(p,g={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!d||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=i(g.from)),d&&f){let x=new h(this.css,g);if(x.text){this.map=x;let y=x.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(p,g,x,y={}){let b,S,w;if(g&&typeof g=="object"){let C=g,_=x;if(typeof C.offset=="number"){let T=this.fromOffset(C.offset);g=T.line,x=T.col;}else g=C.line,x=C.column;if(typeof _.offset=="number"){let T=this.fromOffset(_.offset);S=T.line,w=T.col;}else S=_.line,w=_.column;}else if(!x){let C=this.fromOffset(g);g=C.line,x=C.col;}let v=this.origin(g,x,S,w);return v?b=new o(p,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):b=new o(p,S===void 0?g:{column:x,line:g},S===void 0?x:{column:w,line:S},this.css,this.file,y.plugin),b.input={column:x,endColumn:w,endLine:S,line:g,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,x;if(this[a])x=this[a];else {let b=this.css.split(`
19
+ `);x=new Array(b.length);let S=0;for(let w=0,v=b.length;w<v;w++)x[w]=S,S+=b[w].length+1;this[a]=x;}g=x[x.length-1];let y=0;if(p>=g)y=x.length-1;else {let b=x.length-2,S;for(;y<b;)if(S=y+(b-y>>1),p<x[S])b=S-1;else if(p>=x[S+1])y=S+1;else {y=S;break}}return {col:p-x[y]+1,line:y+1}}mapResolve(p){return /^\w+:\/\//.test(p)?p:i(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,x,y){if(!this.map)return false;let b=this.map.consumer(),S=b.originalPositionFor({column:g,line:p});if(!S.source)return false;let w;typeof x=="number"&&(w=b.originalPositionFor({column:y,line:x}));let v;s(S.source)?v=n(S.source):v=new URL(S.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let C={column:S.column,endColumn:w&&w.column,endLine:w&&w.line,line:S.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let _=b.sourceContentFor(S.source);return _&&(C.source=_),C}toJSON(){let p={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return us=c,c.default=c,u&&u.registerInput&&u.registerInput(c),us}var ds,Ri;function Go(){if(Ri)return ds;Ri=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ne,{dirname:r,relative:n,resolve:s,sep:i}=Ne,{pathToFileURL:l}=Ne,u=kr(),o=!!(t&&e),h=!!(r&&s&&n&&i);class a{constructor(d,c,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=c,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let c=`
20
20
  `;this.css.includes(`\r
21
- `)&&(u=`\r
22
- `),this.css+=u+"/*# sourceMappingURL="+d+" */";}applyPrevMaps(){for(let d of this.previous()){let u=this.toUrl(this.path(d.file)),m=d.root||r(d.file),f;this.mapOpts.sourcesContent===false?(f=new t(d.text),f.sourcesContent&&(f.sourcesContent=null)):f=d.consumer(),this.map.applySourceMap(f,u,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let d;for(let u=this.root.nodes.length-1;u>=0;u--)d=this.root.nodes[u],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(u);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&a&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,u=>{d+=u;}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:true});}else this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true});let d=1,u=1,m="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,x;this.stringify(this.root,(v,w,C)=>{if(this.css+=v,w&&C!=="end"&&(f.generated.line=d,f.generated.column=u-1,w.source&&w.source.start?(f.source=this.sourcePath(w),f.original.line=w.source.start.line,f.original.column=w.source.start.column-1,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,this.map.addMapping(f))),g=v.match(/\n/g),g?(d+=g.length,x=v.lastIndexOf(`
23
- `),u=v.length-x):u+=v.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(f.source=this.sourcePath(w),f.original.line=w.source.end.line,f.original.column=w.source.end.column-1,f.generated.line=d,f.generated.column=u-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=d,f.generated.column=u-1,this.map.addMapping(f)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==true?false:this.previous().length?this.previous().some(u=>u.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let u=this.memoizedPaths.get(d);if(u)return u;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let f=s(m,d);return this.memoizedPaths.set(d,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let u=d.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u);}});else {let d=new c(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map);}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(u=>{if(u.source){let m=u.source.input.from;if(m&&!d[m]){d[m]=true;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,u.source.input.css);}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css);}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let u=this.memoizedFileURLs.get(d);if(u)return u;if(l){let m=l(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let u=this.memoizedURLs.get(d);if(u)return u;i==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ss=o,ss}var ns,mi;function Rr(){if(mi)return ns;mi=1;let t=Cr();class e extends t{constructor(s){super(s),this.type="comment";}}return ns=e,e.default=e,ns}var is,gi;function it(){if(gi)return is;gi=1;let{isClean:t,my:e}=gn(),r=Er(),s=Rr(),n=Cr(),i,l,c,a;function h(d){return d.map(u=>(u.nodes&&(u.nodes=h(u.nodes)),delete u.source,u))}function o(d){if(d[t]=false,d.proxyOf.nodes)for(let u of d.proxyOf.nodes)o(u);}class p extends n{append(...u){for(let m of u){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(u){if(super.cleanRaws(u),this.nodes)for(let m of this.nodes)m.cleanRaws(u);}each(u){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=u(this.proxyOf.nodes[f],f),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(u){return this.nodes.every(u)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let u=this.lastEach;return this.indexes[u]=0,u}getProxyProcessor(){return {get(u,m){return m==="proxyOf"?u:u[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>u[m](...f.map(g=>typeof g=="function"?(x,v)=>g(x.toProxy(),v):g)):m==="every"||m==="some"?f=>u[m]((g,...x)=>f(g.toProxy(),...x)):m==="root"?()=>u.root().toProxy():m==="nodes"?u.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?u[m].toProxy():u[m]:u[m]},set(u,m,f){return u[m]===f||(u[m]=f,(m==="name"||m==="params"||m==="selector")&&u.markDirty()),true}}}index(u){return typeof u=="number"?u:(u.proxyOf&&(u=u.proxyOf),this.proxyOf.nodes.indexOf(u))}insertAfter(u,m){let f=this.index(u),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(u);for(let v of g)this.proxyOf.nodes.splice(f+1,0,v);let x;for(let v in this.indexes)x=this.indexes[v],f<x&&(this.indexes[v]=x+g.length);return this.markDirty(),this}insertBefore(u,m){let f=this.index(u),g=f===0?"prepend":false,x=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(u);for(let w of x)this.proxyOf.nodes.splice(f,0,w);let v;for(let w in this.indexes)v=this.indexes[w],f<=v&&(this.indexes[w]=v+x.length);return this.markDirty(),this}normalize(u,m){if(typeof u=="string")u=h(i(u).nodes);else if(typeof u>"u")u=[];else if(Array.isArray(u)){u=u.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type==="root"&&this.type!=="document"){u=u.nodes.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type)u=[u];else if(u.prop){if(typeof u.value>"u")throw new Error("Value field is missed in node creation");typeof u.value!="string"&&(u.value=String(u.value)),u=[new r(u)];}else if(u.selector)u=[new l(u)];else if(u.name)u=[new c(u)];else if(u.text)u=[new s(u)];else throw new Error("Unknown node type in node creation");return u.map(g=>(g[e]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[t]&&o(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...u){u=u.reverse();for(let m of u){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length;}return this.markDirty(),this}push(u){return u.parent=this,this.proxyOf.nodes.push(u),this}removeAll(){for(let u of this.proxyOf.nodes)u.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(u){u=this.index(u),this.proxyOf.nodes[u].parent=void 0,this.proxyOf.nodes.splice(u,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=u&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(u,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(u,f));}),this.markDirty(),this}some(u){return this.nodes.some(u)}walk(u){return this.each((m,f)=>{let g;try{g=u(m,f);}catch(x){throw m.addToError(x)}return g!==false&&m.walk&&(g=m.walk(u)),g})}walkAtRules(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&u.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(u){return this.walk((m,f)=>{if(m.type==="comment")return u(m,f)})}walkDecls(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&u.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&u.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="rule")return m(f,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=d=>{i=d;},p.registerRule=d=>{l=d;},p.registerAtRule=d=>{c=d;},p.registerRoot=d=>{a=d;},is=p,p.default=p,p.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,c.prototype):d.type==="rule"?Object.setPrototypeOf(d,l.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,s.prototype):d.type==="root"&&Object.setPrototypeOf(d,a.prototype),d[e]=true,d.nodes&&d.nodes.forEach(u=>{p.rebuild(u);});},is}var os,yi;function yn(){if(yi)return os;yi=1;let t=it(),e,r;class s extends t{constructor(i){super({type:"document",...i}),this.nodes||(this.nodes=[]);}toResult(i={}){return new e(new r,this,i).stringify()}}return s.registerLazyResult=n=>{e=n;},s.registerProcessor=n=>{r=n;},os=s,s.default=s,os}var ls,bi;function Fo(){if(bi)return ls;bi=1;class t{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let n=s.node.rangeBy(s);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in s)this[n]=s[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return ls=t,t.default=t,ls}var cs,wi;function vn(){if(wi)return cs;wi=1;let t=Fo();class e{constructor(s,n,i){this.processor=s,this.messages=[],this.root=n,this.opts=i,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(s,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new t(s,n);return this.messages.push(i),i}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return cs=e,e.default=e,cs}var us,xi;function Ql(){if(xi)return us;xi=1;let t=39,e=34,r=92,s=47,n=10,i=32,l=12,c=9,a=13,h=91,o=93,p=40,d=41,u=123,m=125,f=59,g=42,x=58,v=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return us=function(_,T={}){let R=_.css.valueOf(),j=T.ignoreErrors,D,E,P,W,L,U,J,ue,ae,K,Ze=R.length,M=0,Pe=[],Ce=[];function Ut(){return M}function me(B){throw _.error("Unclosed "+B,M)}function Oe(){return Ce.length===0&&M>=Ze}function rt(B){if(Ce.length)return Ce.pop();if(M>=Ze)return;let le=B?B.ignoreUnclosed:false;switch(D=R.charCodeAt(M),D){case n:case i:case c:case a:case l:{E=M;do E+=1,D=R.charCodeAt(E);while(D===i||D===n||D===c||D===a||D===l);K=["space",R.slice(M,E)],M=E-1;break}case h:case o:case u:case m:case x:case f:case d:{let Q=String.fromCharCode(D);K=[Q,Q,M];break}case p:{if(ue=Pe.length?Pe.pop()[1]:"",ae=R.charCodeAt(M+1),ue==="url"&&ae!==t&&ae!==e&&ae!==i&&ae!==n&&ae!==c&&ae!==l&&ae!==a){E=M;do{if(U=false,E=R.indexOf(")",E+1),E===-1)if(j||le){E=M;break}else me("bracket");for(J=E;R.charCodeAt(J-1)===r;)J-=1,U=!U;}while(U);K=["brackets",R.slice(M,E+1),M,E],M=E;}else E=R.indexOf(")",M+1),W=R.slice(M,E+1),E===-1||b.test(W)?K=["(","(",M]:(K=["brackets",W,M,E],M=E);break}case t:case e:{P=D===t?"'":'"',E=M;do{if(U=false,E=R.indexOf(P,E+1),E===-1)if(j||le){E=M+1;break}else me("string");for(J=E;R.charCodeAt(J-1)===r;)J-=1,U=!U;}while(U);K=["string",R.slice(M,E+1),M,E],M=E;break}case v:{w.lastIndex=M+1,w.test(R),w.lastIndex===0?E=R.length-1:E=w.lastIndex-2,K=["at-word",R.slice(M,E+1),M,E],M=E;break}case r:{for(E=M,L=true;R.charCodeAt(E+1)===r;)E+=1,L=!L;if(D=R.charCodeAt(E+1),L&&D!==s&&D!==i&&D!==n&&D!==c&&D!==a&&D!==l&&(E+=1,y.test(R.charAt(E)))){for(;y.test(R.charAt(E+1));)E+=1;R.charCodeAt(E+1)===i&&(E+=1);}K=["word",R.slice(M,E+1),M,E],M=E;break}default:{D===s&&R.charCodeAt(M+1)===g?(E=R.indexOf("*/",M+2)+1,E===0&&(j||le?E=R.length:me("comment")),K=["comment",R.slice(M,E+1),M,E],M=E):(C.lastIndex=M+1,C.test(R),C.lastIndex===0?E=R.length-1:E=C.lastIndex-2,K=["word",R.slice(M,E+1),M,E],Pe.push(K),M=E);break}}return M++,K}function Ye(B){Ce.push(B);}return {back:Ye,endOfFile:Oe,nextToken:rt,position:Ut}},us}var ds,Si;function bn(){if(Si)return ds;Si=1;let t=it();class e extends t{constructor(s){super(s),this.type="atrule";}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return ds=e,e.default=e,t.registerAtRule(e),ds}var hs,Ci;function Gt(){if(Ci)return hs;Ci=1;let t=it(),e,r;class s extends t{constructor(i){super(i),this.type="root",this.nodes||(this.nodes=[]);}normalize(i,l,c){let a=super.normalize(i);if(l){if(c==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of a)h.raws.before=l.raws.before;}return a}removeChild(i,l){let c=this.index(i);return !l&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(i)}toResult(i={}){return new e(new r,this,i).stringify()}}return s.registerLazyResult=n=>{e=n;},s.registerProcessor=n=>{r=n;},hs=s,s.default=s,t.registerRoot(s),hs}var fs,Ei;function $o(){if(Ei)return fs;Ei=1;let t={comma(e){return t.split(e,[","],true)},space(e){let r=[" ",`
24
- `," "];return t.split(e,r)},split(e,r,s){let n=[],i="",l=false,c=0,a=false,h="",o=false;for(let p of e)o?o=false:p==="\\"?o=true:a?p===h&&(a=false):p==='"'||p==="'"?(a=true,h=p):p==="("?c+=1:p===")"?c>0&&(c-=1):c===0&&r.includes(p)&&(l=true),l?(i!==""&&n.push(i.trim()),i="",l=false):i+=p;return (s||i!=="")&&n.push(i.trim()),n}};return fs=t,t.default=t,fs}var ps,_i;function wn(){if(_i)return ps;_i=1;let t=it(),e=$o();class r extends t{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return e.comma(this.selector)}set selectors(n){let i=this.selector?this.selector.match(/,\s*/):null,l=i?i[0]:","+this.raw("between","beforeOpen");this.selector=n.join(l);}}return ps=r,r.default=r,t.registerRule(r),ps}var ms,Ri;function ec(){if(Ri)return ms;Ri=1;let t=Er(),e=Ql(),r=Rr(),s=bn(),n=Gt(),i=wn(),l={empty:true,space:true};function c(h){for(let o=h.length-1;o>=0;o--){let p=h[o],d=p[3]||p[2];if(d)return d}}class a{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}};}atrule(o){let p=new s;p.name=o[1].slice(1),p.name===""&&this.unnamedAtrule(p,o),this.init(p,o[2]);let d,u,m,f=false,g=false,x=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),d=o[0],d==="("||d==="["?v.push(d==="("?")":"]"):d==="{"&&v.length>0?v.push("}"):d===v[v.length-1]&&v.pop(),v.length===0)if(d===";"){p.source.end=this.getPosition(o[2]),p.source.end.offset++,this.semicolon=true;break}else if(d==="{"){g=true;break}else if(d==="}"){if(x.length>0){for(m=x.length-1,u=x[m];u&&u[0]==="space";)u=x[--m];u&&(p.source.end=this.getPosition(u[3]||u[2]),p.source.end.offset++);}this.end(o);break}else x.push(o);else x.push(o);if(this.tokenizer.endOfFile()){f=true;break}}p.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(p.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(p,"params",x),f&&(o=x[x.length-1],p.source.end=this.getPosition(o[3]||o[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p);}checkMissedSemicolon(o){let p=this.colon(o);if(p===false)return;let d=0,u;for(let m=p-1;m>=0&&(u=o[m],!(u[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",u[0]==="word"?u[3]+1:u[2])}colon(o){let p=0,d,u,m;for(let[f,g]of o.entries()){if(d=g,u=d[0],u==="("&&(p+=1),u===")"&&(p-=1),p===0&&u===":")if(!m)this.doubleColon(d);else {if(m[0]==="word"&&m[1]==="progid")continue;return f}m=d;}return false}comment(o){let p=new r;this.init(p,o[2]),p.source.end=this.getPosition(o[3]||o[2]),p.source.end.offset++;let d=o[1].slice(2,-2);if(/^\s*$/.test(d))p.text="",p.raws.left=d,p.raws.right="";else {let u=d.match(/^(\s*)([^]*\S)(\s*)$/);p.text=u[2],p.raws.left=u[1],p.raws.right=u[3];}}createTokenizer(){this.tokenizer=e(this.input);}decl(o,p){let d=new t;this.init(d,o[0][2]);let u=o[o.length-1];for(u[0]===";"&&(this.semicolon=true,o.pop()),d.source.end=this.getPosition(u[3]||u[2]||c(o)),d.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),d.raws.before+=o.shift()[1];for(d.source.start=this.getPosition(o[0][2]),d.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;d.prop+=o.shift()[1];}d.raws.between="";let m;for(;o.length;)if(m=o.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let f=[],g;for(;o.length&&(g=o[0][0],!(g!=="space"&&g!=="comment"));)f.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(m=o[v],m[1].toLowerCase()==="!important"){d.important=true;let w=this.stringFrom(o,v);w=this.spacesFromEnd(o)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=o.slice(0),C="";for(let b=v;b>0;b--){let y=w[b][0];if(C.trim().indexOf("!")===0&&y!=="space")break;C=w.pop()[1]+C;}C.trim().indexOf("!")===0&&(d.important=true,d.raws.important=C,o=w);}if(m[0]!=="space"&&m[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(d.raws.between+=f.map(v=>v[1]).join(""),f=[]),this.raw(d,"value",f.concat(o),p),d.value.includes(":")&&!p&&this.checkMissedSemicolon(o);}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let p=new i;this.init(p,o[2]),p.selector="",p.raws.between="",this.current=p;}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o);}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(o){if(this.spaces+=o[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(o){let p=this.input.fromOffset(o);return {column:p.col,line:p.line,offset:o}}init(o,p){this.current.push(o),o.source={input:this.input,start:this.getPosition(p)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=false);}other(o){let p=false,d=null,u=false,m=null,f=[],g=o[1].startsWith("--"),x=[],v=o;for(;v;){if(d=v[0],x.push(v),d==="("||d==="[")m||(m=v),f.push(d==="("?")":"]");else if(g&&u&&d==="{")m||(m=v),f.push("}");else if(f.length===0)if(d===";")if(u){this.decl(x,g);return}else break;else if(d==="{"){this.rule(x);return}else if(d==="}"){this.tokenizer.back(x.pop()),p=true;break}else d===":"&&(u=true);else d===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));v=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(p=true),f.length>0&&this.unclosedBracket(m),p&&u){if(!g)for(;x.length&&(v=x[x.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,g);}else this.unknownWord(x);}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case "space":this.spaces+=o[1];break;case ";":this.freeSemicolon(o);break;case "}":this.end(o);break;case "comment":this.comment(o);break;case "at-word":this.atrule(o);break;case "{":this.emptyRule(o);break;default:this.other(o);break}this.endFile();}precheckMissedSemicolon(){}raw(o,p,d,u){let m,f,g=d.length,x="",v=true,w,C;for(let b=0;b<g;b+=1)m=d[b],f=m[0],f==="space"&&b===g-1&&!u?v=false:f==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!l[C]&&!l[w]?x.slice(-1)===","?v=false:x+=m[1]:v=false):x+=m[1];if(!v){let b=d.reduce((y,S)=>y+S[1],"");o.raws[p]={raw:b,value:x};}o[p]=x;}rule(o){o.pop();let p=new i;this.init(p,o[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(p,"selector",o),this.current=p;}spacesAndCommentsFromEnd(o){let p,d="";for(;o.length&&(p=o[o.length-1][0],!(p!=="space"&&p!=="comment"));)d=o.pop()[1]+d;return d}spacesAndCommentsFromStart(o){let p,d="";for(;o.length&&(p=o[0][0],!(p!=="space"&&p!=="comment"));)d+=o.shift()[1];return d}spacesFromEnd(o){let p,d="";for(;o.length&&(p=o[o.length-1][0],p==="space");)d=o.pop()[1]+d;return d}stringFrom(o,p){let d="";for(let u=p;u<o.length;u++)d+=o[u][1];return o.splice(p,o.length-p),d}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word",{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return ms=a,ms}var gs,ki;function xn(){if(ki)return gs;ki=1;let t=it(),e=ec(),r=_r();function s(n,i){let l=new r(n,i),c=new e(l);try{c.parse();}catch(a){throw a}return c.root}return gs=s,s.default=s,t.registerParse(s),gs}var ys,Mi;function Uo(){if(Mi)return ys;Mi=1;let {isClean:t,my:e}=gn(),r=Po(),s=Sr(),n=it(),i=yn(),c=vn(),a=xn(),h=Gt(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},d={Once:true,postcssPlugin:true,prepare:true},u=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function f(C){let b=false,y=o[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[y,y+"-"+b,u,y+"Exit",y+"Exit-"+b]:b?[y,y+"-"+b,y+"Exit",y+"Exit-"+b]:C.append?[y,u,y+"Exit"]:[y,y+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",u,"DocumentExit"]:C.type==="root"?b=["Root",u,"RootExit"]:b=f(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function x(C){return C[t]=false,C.nodes&&C.nodes.forEach(b=>x(b)),C}let v={};class w{constructor(b,y,S){this.stringified=false,this.processed=false;let _;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))_=x(y);else if(y instanceof w||y instanceof c)_=x(y.root),y.map&&(typeof S.map>"u"&&(S.map={}),S.map.inline||(S.map.inline=false),S.map.prev=y.map);else {let T=a;S.syntax&&(T=S.syntax.parse),S.parser&&(T=S.parser),T.parse&&(T=T.parse);try{_=T(y,S);}catch(R){this.processed=true,this.error=R;}_&&!_[e]&&n.rebuild(_);}this.result=new c(b,_,S),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(T=>typeof T=="object"&&T.prepare?{...T,...T.prepare(this.result)}:T);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,y){let S=this.result.lastPlugin;try{y&&y.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=S.postcssPlugin,b.setMessage()):S.postcssVersion;}catch(_){console&&console.error&&console.error(_);}return b}prepareVisitors(){this.listeners={};let b=(y,S,_)=>{this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push([y,_]);};for(let y of this.plugins)if(typeof y=="object")for(let S in y){if(!p[S]&&/^[A-Z]/.test(S))throw new Error(`Unknown event ${S} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[S])if(typeof y[S]=="object")for(let _ in y[S])_==="*"?b(y,S,y[S][_]):b(y,S+"-"+_.toLowerCase(),y[S][_]);else typeof y[S]=="function"&&b(y,S,y[S]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let y=this.plugins[b],S=this.runOnRoot(y);if(m(S))try{await S;}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[t];){b[t]=true;let y=[g(b)];for(;y.length>0;){let S=this.visitTick(y);if(m(S))try{await S;}catch(_){let T=y[y.length-1].node;throw this.handleError(_,T)}}}if(this.listeners.OnceExit)for(let[y,S]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(b.type==="document"){let _=b.nodes.map(T=>S(T,this.helpers));await Promise.all(_);}else await S(b,this.helpers);}catch(_){throw this.handleError(_)}}}return this.processed=true,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(S=>b.Once(S,this.helpers));return m(y[0])?Promise.all(y):y}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let b=this.result.opts,y=s;b.syntax&&(y=b.syntax.stringify),b.stringifier&&(y=b.stringifier),y.stringify&&(y=y.stringify);let _=new r(y,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let b of this.plugins){let y=this.runOnRoot(b);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[t];)b[t]=true,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let y of b.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,b);}return this.result}then(b,y){return this.async().then(b,y)}toString(){return this.css}visitSync(b,y){for(let[S,_]of b){this.result.lastPlugin=S;let T;try{T=_(y,this.helpers);}catch(R){throw this.handleError(R,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(T))throw this.getAsyncError()}}visitTick(b){let y=b[b.length-1],{node:S,visitors:_}=y;if(S.type!=="root"&&S.type!=="document"&&!S.parent){b.pop();return}if(_.length>0&&y.visitorIndex<_.length){let[R,j]=_[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===_.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=R;try{return j(S.toProxy(),this.helpers)}catch(D){throw this.handleError(D,S)}}if(y.iterator!==0){let R=y.iterator,j;for(;j=S.nodes[S.indexes[R]];)if(S.indexes[R]+=1,!j[t]){j[t]=true,b.push(g(j));return}y.iterator=0,delete S.indexes[R];}let T=y.events;for(;y.eventIndex<T.length;){let R=T[y.eventIndex];if(y.eventIndex+=1,R===u){S.nodes&&S.nodes.length&&(S[t]=true,y.iterator=S.getIterator());return}else if(this.listeners[R]){y.visitors=this.listeners[R];return}}b.pop();}walkSync(b){b[t]=true;let y=f(b);for(let S of y)if(S===u)b.nodes&&b.each(_=>{_[t]||this.walkSync(_);});else {let _=this.listeners[S];if(_&&this.visitSync(_,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return w.registerPostcss=C=>{v=C;},ys=w,w.default=w,h.registerLazyResult(w),i.registerLazyResult(w),ys}var vs,Ti;function tc(){if(Ti)return vs;Ti=1;let t=Po(),e=Sr(),s=xn(),n=vn();class i{constructor(c,a,h){a=a.toString(),this.stringified=false,this._processor=c,this._css=a,this._opts=h,this._map=void 0;let o,p=e;this.result=new n(this._processor,o,this._opts),this.result.css=a;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let u=new t(p,o,this._opts,a);if(u.isMap()){let[m,f]=u.generate();m&&(this.result.css=m),f&&(this.result.map=f);}else u.clearAnnotation(),this.result.css=u.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,a){return this.async().then(c,a)}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 c,a=s;try{c=a(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return "NoWorkResult"}}return vs=i,i.default=i,vs}var bs,Oi;function rc(){if(Oi)return bs;Oi=1;let t=tc(),e=Uo(),r=yn(),s=Gt();class n{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let c=[];for(let a of l)if(a.postcss===true?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))c=c.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)c.push(a);else if(typeof a=="function")c.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return c}process(l,c={}){return !this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new t(this,l,c):new e(this,l,c)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return bs=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),bs}var ws,Ii;function sc(){if(Ii)return ws;Ii=1;let t=Er(),e=Do(),r=Rr(),s=bn(),n=_r(),i=Gt(),l=wn();function c(a,h){if(Array.isArray(a))return a.map(d=>c(d));let{inputs:o,...p}=a;if(o){h=[];for(let d of o){let u={...d,__proto__:n.prototype};u.map&&(u.map={...u.map,__proto__:e.prototype}),h.push(u);}}if(p.nodes&&(p.nodes=a.nodes.map(d=>c(d,h))),p.source){let{inputId:d,...u}=p.source;p.source=u,d!=null&&(p.source.input=h[d]);}if(p.type==="root")return new i(p);if(p.type==="decl")return new t(p);if(p.type==="rule")return new l(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new s(p);throw new Error("Unknown node type: "+a.type)}return ws=c,c.default=c,ws}var xs,Ni;function nc(){if(Ni)return xs;Ni=1;let t=mn(),e=Er(),r=Uo(),s=it(),n=rc(),i=Sr(),l=sc(),c=yn(),a=Fo(),h=Rr(),o=bn(),p=vn(),d=_r(),u=xn(),m=$o(),f=wn(),g=Gt(),x=Cr();function v(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new n(w)}return v.plugin=function(C,b){let y=false;function S(...T){console&&console.warn&&!y&&(y=true,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
25
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
26
- https://www.w3ctech.com/topic/2226`));let R=b(...T);return R.postcssPlugin=C,R.postcssVersion=new n().version,R}let _;return Object.defineProperty(S,"postcss",{get(){return _||(_=S()),_}}),S.process=function(T,R,j){return v([S(j)]).process(T,R)},S},v.stringify=i,v.parse=u,v.fromJSON=l,v.list=m,v.comment=w=>new h(w),v.atRule=w=>new o(w),v.decl=w=>new e(w),v.rule=w=>new f(w),v.root=w=>new g(w),v.document=w=>new c(w),v.CssSyntaxError=t,v.Declaration=e,v.Container=s,v.Processor=n,v.Document=c,v.Comment=h,v.Warning=a,v.AtRule=o,v.Result=p,v.Input=d,v.Rule=f,v.Root=g,v.Node=x,r.registerPostcss(v),xs=v,v.default=v,xs}var ic=nc(),re=Gl(ic);re.stringify;re.fromJSON;re.plugin;re.parse;re.list;re.document;re.comment;re.atRule;re.rule;re.decl;re.root;re.CssSyntaxError;re.Declaration;re.Container;re.Processor;re.Document;re.Comment;re.Warning;re.AtRule;re.Result;re.Input;re.Rule;re.Root;re.Node;var oc=Object.defineProperty,ac=(t,e,r)=>e in t?oc(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,Ee=(t,e,r)=>ac(t,typeof e!="symbol"?e+"":e,r);Date.now().toString();function lc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function cc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:true,get:function(){return t[s]}});}),r}var ar={exports:{}},Ai;function uc(){if(Ai)return ar.exports;Ai=1;var t=String,e=function(){return {isColorSupported:false,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return ar.exports=e(),ar.exports.createColors=e,ar.exports}var dc={},hc=Object.freeze(Object.defineProperty({__proto__:null,default:dc},Symbol.toStringTag,{value:"Module"})),Ae=cc(hc),Ss,Di;function Sn(){if(Di)return Ss;Di=1;let t=uc(),e=Ae;class r extends Error{constructor(n,i,l,c,a,h){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),c&&(this.source=c),h&&(this.plugin=h),typeof i<"u"&&typeof l<"u"&&(typeof i=="number"?(this.line=i,this.column=l):(this.line=i.line,this.column=i.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(n){if(!this.source)return "";let i=this.source;n==null&&(n=t.isColorSupported),e&&n&&(i=e(i));let l=i.split(/\r?\n/),c=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),h=String(a).length,o,p;if(n){let{bold:d,gray:u,red:m}=t.createColors(true);o=f=>d(m(f)),p=f=>u(f);}else o=p=d=>d;return l.slice(c,a).map((d,u)=>{let m=c+1+u,f=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=p(f.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+p(f)+d+`
27
- `+g+o("^")}return " "+p(f)+d}).join(`
28
- `)}toString(){let n=this.showSourceCode();return n&&(n=`
21
+ `)&&(c=`\r
22
+ `),this.css+=c+"/*# sourceMappingURL="+d+" */";}applyPrevMaps(){for(let d of this.previous()){let c=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===false?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,c,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let d;for(let c=this.root.nodes.length-1;c>=0;c--)d=this.root.nodes[c],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(c);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&o&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,c=>{d+=c;}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:true});}else this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true});let d=1,c=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,x;this.stringify(this.root,(y,b,S)=>{if(this.css+=y,b&&S!=="end"&&(p.generated.line=d,p.generated.column=c-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=y.match(/\n/g),g?(d+=g.length,x=y.lastIndexOf(`
23
+ `),c=y.length-x):c+=y.length,b&&S!=="start"){let w=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==w.last||w.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=c-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=c-1,this.map.addMapping(p)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==true?false:this.previous().length?this.previous().some(c=>c.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let c=this.memoizedPaths.get(d);if(c)return c;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let c=d.source.input.map;this.previousMaps.includes(c)||this.previousMaps.push(c);}});else {let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map);}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(c=>{if(c.source){let m=c.source.input.from;if(m&&!d[m]){d[m]=true;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,c.source.input.css);}}});else if(this.css){let c=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(c,this.css);}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let c=this.memoizedFileURLs.get(d);if(c)return c;if(l){let m=l(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let c=this.memoizedURLs.get(d);if(c)return c;i==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ds=a,ds}var hs,ki;function Mr(){if(ki)return hs;ki=1;let t=_r();class e extends t{constructor(n){super(n),this.type="comment";}}return hs=e,e.default=e,hs}var fs,Mi;function nt(){if(Mi)return fs;Mi=1;let{isClean:t,my:e}=En(),r=Rr(),n=Mr(),s=_r(),i,l,u,o;function h(d){return d.map(c=>(c.nodes&&(c.nodes=h(c.nodes)),delete c.source,c))}function a(d){if(d[t]=false,d.proxyOf.nodes)for(let c of d.proxyOf.nodes)a(c);}class f extends s{append(...c){for(let m of c){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(c){if(super.cleanRaws(c),this.nodes)for(let m of this.nodes)m.cleanRaws(c);}each(c){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=c(this.proxyOf.nodes[p],p),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(c){return this.nodes.every(c)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let c=this.lastEach;return this.indexes[c]=0,c}getProxyProcessor(){return {get(c,m){return m==="proxyOf"?c:c[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>c[m](...p.map(g=>typeof g=="function"?(x,y)=>g(x.toProxy(),y):g)):m==="every"||m==="some"?p=>c[m]((g,...x)=>p(g.toProxy(),...x)):m==="root"?()=>c.root().toProxy():m==="nodes"?c.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?c[m].toProxy():c[m]:c[m]},set(c,m,p){return c[m]===p||(c[m]=p,(m==="name"||m==="params"||m==="selector")&&c.markDirty()),true}}}index(c){return typeof c=="number"?c:(c.proxyOf&&(c=c.proxyOf),this.proxyOf.nodes.indexOf(c))}insertAfter(c,m){let p=this.index(c),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(c);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let x;for(let y in this.indexes)x=this.indexes[y],p<x&&(this.indexes[y]=x+g.length);return this.markDirty(),this}insertBefore(c,m){let p=this.index(c),g=p===0?"prepend":false,x=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(c);for(let b of x)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+x.length);return this.markDirty(),this}normalize(c,m){if(typeof c=="string")c=h(i(c).nodes);else if(typeof c>"u")c=[];else if(Array.isArray(c)){c=c.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore");}else if(c.type==="root"&&this.type!=="document"){c=c.nodes.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore");}else if(c.type)c=[c];else if(c.prop){if(typeof c.value>"u")throw new Error("Value field is missed in node creation");typeof c.value!="string"&&(c.value=String(c.value)),c=[new r(c)];}else if(c.selector)c=[new l(c)];else if(c.name)c=[new u(c)];else if(c.text)c=[new n(c)];else throw new Error("Unknown node type in node creation");return c.map(g=>(g[e]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[t]&&a(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...c){c=c.reverse();for(let m of c){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length;}return this.markDirty(),this}push(c){return c.parent=this,this.proxyOf.nodes.push(c),this}removeAll(){for(let c of this.proxyOf.nodes)c.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(c){c=this.index(c),this.proxyOf.nodes[c].parent=void 0,this.proxyOf.nodes.splice(c,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=c&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(c,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(c,p));}),this.markDirty(),this}some(c){return this.nodes.some(c)}walk(c){return this.each((m,p)=>{let g;try{g=c(m,p);}catch(x){throw m.addToError(x)}return g!==false&&m.walk&&(g=m.walk(c)),g})}walkAtRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&c.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(c){return this.walk((m,p)=>{if(m.type==="comment")return c(m,p)})}walkDecls(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&c.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&c.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=d=>{i=d;},f.registerRule=d=>{l=d;},f.registerAtRule=d=>{u=d;},f.registerRoot=d=>{o=d;},fs=f,f.default=f,f.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,u.prototype):d.type==="rule"?Object.setPrototypeOf(d,l.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,o.prototype),d[e]=true,d.nodes&&d.nodes.forEach(c=>{f.rebuild(c);});},fs}var ps,Ti;function _n(){if(Ti)return ps;Ti=1;let t=nt(),e,r;class n extends t{constructor(i){super({type:"document",...i}),this.nodes||(this.nodes=[]);}toResult(i={}){return new e(new r,this,i).stringify()}}return n.registerLazyResult=s=>{e=s;},n.registerProcessor=s=>{r=s;},ps=n,n.default=n,ps}var gs,Ii;function Zo(){if(Ii)return gs;Ii=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let s=n.node.rangeBy(n);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column;}for(let s in n)this[s]=n[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}}return gs=t,t.default=t,gs}var ys,Ni;function Rn(){if(Ni)return ys;Ni=1;let t=Zo();class e{constructor(n,s,i){this.processor=n,this.messages=[],this.root=s,this.opts=i,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(n,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let i=new t(n,s);return this.messages.push(i),i}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return ys=e,e.default=e,ys}var vs,Ai;function vc(){if(Ai)return vs;Ai=1;let t=39,e=34,r=92,n=47,s=10,i=32,l=12,u=9,o=13,h=91,a=93,f=40,d=41,c=123,m=125,p=59,g=42,x=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return vs=function(_,T={}){let R=_.css.valueOf(),z=T.ignoreErrors,D,E,me,L,P,F,q,te,ne,J,Ye=R.length,M=0,Le=[],Ce=[];function Ut(){return M}function ge(B){throw _.error("Unclosed "+B,M)}function Oe(){return Ce.length===0&&M>=Ye}function tt(B){if(Ce.length)return Ce.pop();if(M>=Ye)return;let ce=B?B.ignoreUnclosed:false;switch(D=R.charCodeAt(M),D){case s:case i:case u:case o:case l:{E=M;do E+=1,D=R.charCodeAt(E);while(D===i||D===s||D===u||D===o||D===l);J=["space",R.slice(M,E)],M=E-1;break}case h:case a:case c:case m:case x:case p:case d:{let K=String.fromCharCode(D);J=[K,K,M];break}case f:{if(te=Le.length?Le.pop()[1]:"",ne=R.charCodeAt(M+1),te==="url"&&ne!==t&&ne!==e&&ne!==i&&ne!==s&&ne!==u&&ne!==l&&ne!==o){E=M;do{if(F=false,E=R.indexOf(")",E+1),E===-1)if(z||ce){E=M;break}else ge("bracket");for(q=E;R.charCodeAt(q-1)===r;)q-=1,F=!F;}while(F);J=["brackets",R.slice(M,E+1),M,E],M=E;}else E=R.indexOf(")",M+1),L=R.slice(M,E+1),E===-1||w.test(L)?J=["(","(",M]:(J=["brackets",L,M,E],M=E);break}case t:case e:{me=D===t?"'":'"',E=M;do{if(F=false,E=R.indexOf(me,E+1),E===-1)if(z||ce){E=M+1;break}else ge("string");for(q=E;R.charCodeAt(q-1)===r;)q-=1,F=!F;}while(F);J=["string",R.slice(M,E+1),M,E],M=E;break}case y:{b.lastIndex=M+1,b.test(R),b.lastIndex===0?E=R.length-1:E=b.lastIndex-2,J=["at-word",R.slice(M,E+1),M,E],M=E;break}case r:{for(E=M,P=true;R.charCodeAt(E+1)===r;)E+=1,P=!P;if(D=R.charCodeAt(E+1),P&&D!==n&&D!==i&&D!==s&&D!==u&&D!==o&&D!==l&&(E+=1,v.test(R.charAt(E)))){for(;v.test(R.charAt(E+1));)E+=1;R.charCodeAt(E+1)===i&&(E+=1);}J=["word",R.slice(M,E+1),M,E],M=E;break}default:{D===n&&R.charCodeAt(M+1)===g?(E=R.indexOf("*/",M+2)+1,E===0&&(z||ce?E=R.length:ge("comment")),J=["comment",R.slice(M,E+1),M,E],M=E):(S.lastIndex=M+1,S.test(R),S.lastIndex===0?E=R.length-1:E=S.lastIndex-2,J=["word",R.slice(M,E+1),M,E],Le.push(J),M=E);break}}return M++,J}function Ze(B){Ce.push(B);}return {back:Ze,endOfFile:Oe,nextToken:tt,position:Ut}},vs}var bs,Di;function kn(){if(Di)return bs;Di=1;let t=nt();class e extends t{constructor(n){super(n),this.type="atrule";}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return bs=e,e.default=e,t.registerAtRule(e),bs}var ws,Pi;function qt(){if(Pi)return ws;Pi=1;let t=nt(),e,r;class n extends t{constructor(i){super(i),this.type="root",this.nodes||(this.nodes=[]);}normalize(i,l,u){let o=super.normalize(i);if(l){if(u==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of o)h.raws.before=l.raws.before;}return o}removeChild(i,l){let u=this.index(i);return !l&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(i)}toResult(i={}){return new e(new r,this,i).stringify()}}return n.registerLazyResult=s=>{e=s;},n.registerProcessor=s=>{r=s;},ws=n,n.default=n,t.registerRoot(n),ws}var xs,Li;function Xo(){if(Li)return xs;Li=1;let t={comma(e){return t.split(e,[","],true)},space(e){let r=[" ",`
24
+ `," "];return t.split(e,r)},split(e,r,n){let s=[],i="",l=false,u=0,o=false,h="",a=false;for(let f of e)a?a=false:f==="\\"?a=true:o?f===h&&(o=false):f==='"'||f==="'"?(o=true,h=f):f==="("?u+=1:f===")"?u>0&&(u-=1):u===0&&r.includes(f)&&(l=true),l?(i!==""&&s.push(i.trim()),i="",l=false):i+=f;return (n||i!=="")&&s.push(i.trim()),s}};return xs=t,t.default=t,xs}var Ss,Fi;function Mn(){if(Fi)return Ss;Fi=1;let t=nt(),e=Xo();class r extends t{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return e.comma(this.selector)}set selectors(s){let i=this.selector?this.selector.match(/,\s*/):null,l=i?i[0]:","+this.raw("between","beforeOpen");this.selector=s.join(l);}}return Ss=r,r.default=r,t.registerRule(r),Ss}var Cs,Ui;function bc(){if(Ui)return Cs;Ui=1;let t=Rr(),e=vc(),r=Mr(),n=kn(),s=qt(),i=Mn(),l={empty:true,space:true};function u(h){for(let a=h.length-1;a>=0;a--){let f=h[a],d=f[3]||f[2];if(d)return d}}class o{constructor(a){this.input=a,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}};}atrule(a){let f=new n;f.name=a[1].slice(1),f.name===""&&this.unnamedAtrule(f,a),this.init(f,a[2]);let d,c,m,p=false,g=false,x=[],y=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){f.source.end=this.getPosition(a[2]),f.source.end.offset++,this.semicolon=true;break}else if(d==="{"){g=true;break}else if(d==="}"){if(x.length>0){for(m=x.length-1,c=x[m];c&&c[0]==="space";)c=x[--m];c&&(f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++);}this.end(a);break}else x.push(a);else x.push(a);if(this.tokenizer.endOfFile()){p=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(f.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(f,"params",x),p&&(a=x[x.length-1],f.source.end=this.getPosition(a[3]||a[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(a){let f=this.colon(a);if(f===false)return;let d=0,c;for(let m=f-1;m>=0&&(c=a[m],!(c[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(a){let f=0,d,c,m;for(let[p,g]of a.entries()){if(d=g,c=d[0],c==="("&&(f+=1),c===")"&&(f-=1),f===0&&c===":")if(!m)this.doubleColon(d);else {if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d;}return false}comment(a){let f=new r;this.init(f,a[2]),f.source.end=this.getPosition(a[3]||a[2]),f.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))f.text="",f.raws.left=d,f.raws.right="";else {let c=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=c[2],f.raws.left=c[1],f.raws.right=c[3];}}createTokenizer(){this.tokenizer=e(this.input);}decl(a,f){let d=new t;this.init(d,a[0][2]);let c=a[a.length-1];for(c[0]===";"&&(this.semicolon=true,a.pop()),d.source.end=this.getPosition(c[3]||c[2]||u(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let y=a[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=a.shift()[1];}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let y=a.length-1;y>=0;y--){if(m=a[y],m[1].toLowerCase()==="!important"){d.important=true;let b=this.stringFrom(a,y);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),S="";for(let w=y;w>0;w--){let v=b[w][0];if(S.trim().indexOf("!")===0&&v!=="space")break;S=b.pop()[1]+S;}S.trim().indexOf("!")===0&&(d.important=true,d.raws.important=S,a=b);}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(a);}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let f=new i;this.init(f,a[2]),f.selector="",f.raws.between="",this.current=f;}end(a){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a);}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(a){if(this.spaces+=a[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(a){let f=this.input.fromOffset(a);return {column:f.col,line:f.line,offset:a}}init(a,f){this.current.push(a),a.source={input:this.input,start:this.getPosition(f)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=false);}other(a){let f=false,d=null,c=false,m=null,p=[],g=a[1].startsWith("--"),x=[],y=a;for(;y;){if(d=y[0],x.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&c&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(c){this.decl(x,g);return}else break;else if(d==="{"){this.rule(x);return}else if(d==="}"){this.tokenizer.back(x.pop()),f=true;break}else d===":"&&(c=true);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),p.length>0&&this.unclosedBracket(m),f&&c){if(!g)for(;x.length&&(y=x[x.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,g);}else this.unknownWord(x);}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case "space":this.spaces+=a[1];break;case ";":this.freeSemicolon(a);break;case "}":this.end(a);break;case "comment":this.comment(a);break;case "at-word":this.atrule(a);break;case "{":this.emptyRule(a);break;default:this.other(a);break}this.endFile();}precheckMissedSemicolon(){}raw(a,f,d,c){let m,p,g=d.length,x="",y=true,b,S;for(let w=0;w<g;w+=1)m=d[w],p=m[0],p==="space"&&w===g-1&&!c?y=false:p==="comment"?(S=d[w-1]?d[w-1][0]:"empty",b=d[w+1]?d[w+1][0]:"empty",!l[S]&&!l[b]?x.slice(-1)===","?y=false:x+=m[1]:y=false):x+=m[1];if(!y){let w=d.reduce((v,C)=>v+C[1],"");a.raws[f]={raw:w,value:x};}a[f]=x;}rule(a){a.pop();let f=new i;this.init(f,a[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(f,"selector",a),this.current=f;}spacesAndCommentsFromEnd(a){let f,d="";for(;a.length&&(f=a[a.length-1][0],!(f!=="space"&&f!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let f,d="";for(;a.length&&(f=a[0][0],!(f!=="space"&&f!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let f,d="";for(;a.length&&(f=a[a.length-1][0],f==="space");)d=a.pop()[1]+d;return d}stringFrom(a,f){let d="";for(let c=f;c<a.length;c++)d+=a[c][1];return a.splice(f,a.length-f),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Cs=o,Cs}var Es,$i;function Tn(){if($i)return Es;$i=1;let t=nt(),e=bc(),r=kr();function n(s,i){let l=new r(s,i),u=new e(l);try{u.parse();}catch(o){throw o}return u.root}return Es=n,n.default=n,t.registerParse(n),Es}var _s,Bi;function Jo(){if(Bi)return _s;Bi=1;let {isClean:t,my:e}=En(),r=Go(),n=Er(),s=nt(),i=_n(),u=Rn(),o=Tn(),h=qt(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},d={Once:true,postcssPlugin:true,prepare:true},c=0;function m(S){return typeof S=="object"&&typeof S.then=="function"}function p(S){let w=false,v=a[S.type];return S.type==="decl"?w=S.prop.toLowerCase():S.type==="atrule"&&(w=S.name.toLowerCase()),w&&S.append?[v,v+"-"+w,c,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:S.append?[v,c,v+"Exit"]:[v,v+"Exit"]}function g(S){let w;return S.type==="document"?w=["Document",c,"DocumentExit"]:S.type==="root"?w=["Root",c,"RootExit"]:w=p(S),{eventIndex:0,events:w,iterator:0,node:S,visitorIndex:0,visitors:[]}}function x(S){return S[t]=false,S.nodes&&S.nodes.forEach(w=>x(w)),S}let y={};class b{constructor(w,v,C){this.stringified=false,this.processed=false;let _;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))_=x(v);else if(v instanceof b||v instanceof u)_=x(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=v.map);else {let T=o;C.syntax&&(T=C.syntax.parse),C.parser&&(T=C.parser),T.parse&&(T=T.parse);try{_=T(v,C);}catch(R){this.processed=true,this.error=R;}_&&!_[e]&&s.rebuild(_);}this.result=new u(w,_,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(T=>typeof T=="object"&&T.prepare?{...T,...T.prepare(this.result)}:T);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion;}catch(_){console&&console.error&&console.error(_);}return w}prepareVisitors(){this.listeners={};let w=(v,C,_)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,_]);};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof v[C]=="object")for(let _ in v[C])_==="*"?w(v,C,v[C][_]):w(v,C+"-"+_.toLowerCase(),v[C][_]);else typeof v[C]=="function"&&w(v,C,v[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(m(C))try{await C;}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[t];){w[t]=true;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(m(C))try{await C;}catch(_){let T=v[v.length-1].node;throw this.handleError(_,T)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let _=w.nodes.map(T=>C(T,this.helpers));await Promise.all(_);}else await C(w,this.helpers);}catch(_){throw this.handleError(_)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,v=n;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let _=new r(v,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let v=this.runOnRoot(w);if(m(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[t];)w[t]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,_]of w){this.result.lastPlugin=C;let T;try{T=_(v,this.helpers);}catch(R){throw this.handleError(R,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return true;if(m(T))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:_}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(_.length>0&&v.visitorIndex<_.length){let[R,z]=_[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===_.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=R;try{return z(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(v.iterator!==0){let R=v.iterator,z;for(;z=C.nodes[C.indexes[R]];)if(C.indexes[R]+=1,!z[t]){z[t]=true,w.push(g(z));return}v.iterator=0,delete C.indexes[R];}let T=v.events;for(;v.eventIndex<T.length;){let R=T[v.eventIndex];if(v.eventIndex+=1,R===c){C.nodes&&C.nodes.length&&(C[t]=true,v.iterator=C.getIterator());return}else if(this.listeners[R]){v.visitors=this.listeners[R];return}}w.pop();}walkSync(w){w[t]=true;let v=p(w);for(let C of v)if(C===c)w.nodes&&w.each(_=>{_[t]||this.walkSync(_);});else {let _=this.listeners[C];if(_&&this.visitSync(_,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return b.registerPostcss=S=>{y=S;},_s=b,b.default=b,h.registerLazyResult(b),i.registerLazyResult(b),_s}var Rs,zi;function wc(){if(zi)return Rs;zi=1;let t=Go(),e=Er(),n=Tn(),s=Rn();class i{constructor(u,o,h){o=o.toString(),this.stringified=false,this._processor=u,this._css=o,this._opts=h,this._map=void 0;let a,f=e;this.result=new s(this._processor,a,this._opts),this.result.css=o;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let c=new t(f,a,this._opts,o);if(c.isMap()){let[m,p]=c.generate();m&&(this.result.css=m),p&&(this.result.map=p);}else c.clearAnnotation(),this.result.css=c.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,o){return this.async().then(u,o)}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 u,o=n;try{u=o(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return "NoWorkResult"}}return Rs=i,i.default=i,Rs}var ks,ji;function xc(){if(ji)return ks;ji=1;let t=wc(),e=Jo(),r=_n(),n=qt();class s{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let u=[];for(let o of l)if(o.postcss===true?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))u=u.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)u.push(o);else if(typeof o=="function")u.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return u}process(l,u={}){return !this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new t(this,l,u):new e(this,l,u)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return ks=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),ks}var Ms,Wi;function Sc(){if(Wi)return Ms;Wi=1;let t=Rr(),e=qo(),r=Mr(),n=kn(),s=kr(),i=qt(),l=Mn();function u(o,h){if(Array.isArray(o))return o.map(d=>u(d));let{inputs:a,...f}=o;if(a){h=[];for(let d of a){let c={...d,__proto__:s.prototype};c.map&&(c.map={...c.map,__proto__:e.prototype}),h.push(c);}}if(f.nodes&&(f.nodes=o.nodes.map(d=>u(d,h))),f.source){let{inputId:d,...c}=f.source;f.source=c,d!=null&&(f.source.input=h[d]);}if(f.type==="root")return new i(f);if(f.type==="decl")return new t(f);if(f.type==="rule")return new l(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new n(f);throw new Error("Unknown node type: "+o.type)}return Ms=u,u.default=u,Ms}var Ts,Vi;function Cc(){if(Vi)return Ts;Vi=1;let t=Cn(),e=Rr(),r=Jo(),n=nt(),s=xc(),i=Er(),l=Sc(),u=_n(),o=Zo(),h=Mr(),a=kn(),f=Rn(),d=kr(),c=Tn(),m=Xo(),p=Mn(),g=qt(),x=_r();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new s(b)}return y.plugin=function(S,w){let v=false;function C(...T){console&&console.warn&&!v&&(v=true,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
25
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(S+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
26
+ https://www.w3ctech.com/topic/2226`));let R=w(...T);return R.postcssPlugin=S,R.postcssVersion=new s().version,R}let _;return Object.defineProperty(C,"postcss",{get(){return _||(_=C()),_}}),C.process=function(T,R,z){return y([C(z)]).process(T,R)},C},y.stringify=i,y.parse=c,y.fromJSON=l,y.list=m,y.comment=b=>new h(b),y.atRule=b=>new a(b),y.decl=b=>new e(b),y.rule=b=>new p(b),y.root=b=>new g(b),y.document=b=>new u(b),y.CssSyntaxError=t,y.Declaration=e,y.Container=n,y.Processor=s,y.Document=u,y.Comment=h,y.Warning=o,y.AtRule=a,y.Result=f,y.Input=d,y.Rule=p,y.Root=g,y.Node=x,r.registerPostcss(y),Ts=y,y.default=y,Ts}var Ec=Cc(),re=hc(Ec);re.stringify;re.fromJSON;re.plugin;re.parse;re.list;re.document;re.comment;re.atRule;re.rule;re.decl;re.root;re.CssSyntaxError;re.Declaration;re.Container;re.Processor;re.Document;re.Comment;re.Warning;re.AtRule;re.Result;re.Input;re.Rule;re.Root;re.Node;var _c=Object.defineProperty,Rc=(t,e,r)=>e in t?_c(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,Ee=(t,e,r)=>Rc(t,typeof e!="symbol"?e+"":e,r);Date.now().toString();function kc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Mc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:true,get:function(){return t[n]}});}),r}var cr={exports:{}},Hi;function Tc(){if(Hi)return cr.exports;Hi=1;var t=String,e=function(){return {isColorSupported:false,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return cr.exports=e(),cr.exports.createColors=e,cr.exports}var Oc={},Ic=Object.freeze(Object.defineProperty({__proto__:null,default:Oc},Symbol.toStringTag,{value:"Module"})),Ae=Mc(Ic),Os,qi;function On(){if(qi)return Os;qi=1;let t=Tc(),e=Ae;class r extends Error{constructor(s,i,l,u,o,h){super(s),this.name="CssSyntaxError",this.reason=s,o&&(this.file=o),u&&(this.source=u),h&&(this.plugin=h),typeof i<"u"&&typeof l<"u"&&(typeof i=="number"?(this.line=i,this.column=l):(this.line=i.line,this.column=i.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(s){if(!this.source)return "";let i=this.source;s==null&&(s=t.isColorSupported),e&&s&&(i=e(i));let l=i.split(/\r?\n/),u=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),h=String(o).length,a,f;if(s){let{bold:d,gray:c,red:m}=t.createColors(true);a=p=>d(m(p)),f=p=>c(p);}else a=f=d=>d;return l.slice(u,o).map((d,c)=>{let m=u+1+c,p=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=f(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+f(p)+d+`
27
+ `+g+a("^")}return " "+f(p)+d}).join(`
28
+ `)}toString(){let s=this.showSourceCode();return s&&(s=`
29
29
 
30
- `+n+`
31
- `),this.name+": "+this.message+n}}return Ss=r,r.default=r,Ss}var lr={},Pi;function Cn(){return Pi||(Pi=1,lr.isClean=Symbol("isClean"),lr.my=Symbol("my")),lr}var Cs,Li;function Bo(){if(Li)return Cs;Li=1;let t={after:`
30
+ `+s+`
31
+ `),this.name+": "+this.message+s}}return Os=r,r.default=r,Os}var ur={},Gi;function In(){return Gi||(Gi=1,ur.isClean=Symbol("isClean"),ur.my=Symbol("my")),ur}var Is,Yi;function Ko(){if(Yi)return Is;Yi=1;let t={after:`
32
32
  `,beforeClose:`
33
33
  `,beforeComment:`
34
34
  `,beforeDecl:`
35
35
  `,beforeOpen:" ",beforeRule:`
36
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function e(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,i){let l="@"+n.name,c=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?l+=n.raws.afterName:c&&(l+=" "),n.nodes)this.block(n,l+c);else {let a=(n.raws.between||"")+(i?";":"");this.builder(l+c+a,n);}}beforeAfter(n,i){let l;n.type==="decl"?l=this.raw(n,null,"beforeDecl"):n.type==="comment"?l=this.raw(n,null,"beforeComment"):i==="before"?l=this.raw(n,null,"beforeRule"):l=this.raw(n,null,"beforeClose");let c=n.parent,a=0;for(;c&&c.type!=="root";)a+=1,c=c.parent;if(l.includes(`
37
- `)){let h=this.raw(n,null,"indent");if(h.length)for(let o=0;o<a;o++)l+=h;}return l}block(n,i){let l=this.raw(n,"between","beforeOpen");this.builder(i+l+"{",n,"start");let c;n.nodes&&n.nodes.length?(this.body(n),c=this.raw(n,"after")):c=this.raw(n,"after","emptyBody"),c&&this.builder(c),this.builder("}",n,"end");}body(n){let i=n.nodes.length-1;for(;i>0&&n.nodes[i].type==="comment";)i-=1;let l=this.raw(n,"semicolon");for(let c=0;c<n.nodes.length;c++){let a=n.nodes[c],h=this.raw(a,"before");h&&this.builder(h),this.stringify(a,i!==c||l);}}comment(n){let i=this.raw(n,"left","commentLeft"),l=this.raw(n,"right","commentRight");this.builder("/*"+i+n.text+l+"*/",n);}decl(n,i){let l=this.raw(n,"between","colon"),c=n.prop+l+this.rawValue(n,"value");n.important&&(c+=n.raws.important||" !important"),i&&(c+=";"),this.builder(c,n);}document(n){this.body(n);}raw(n,i,l){let c;if(l||(l=i),i&&(c=n.raws[i],typeof c<"u"))return c;let a=n.parent;if(l==="before"&&(!a||a.type==="root"&&a.first===n||a&&a.type==="document"))return "";if(!a)return t[l];let h=n.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(n,l);{let o="raw"+e(l);this[o]?c=this[o](h,n):h.walk(p=>{if(c=p.raws[i],typeof c<"u")return false});}return typeof c>"u"&&(c=t[l]),h.rawCache[l]=c,c}rawBeforeClose(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return i=l.raws.after,i.includes(`
38
- `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawBeforeComment(n,i){let l;return n.walkComments(c=>{if(typeof c.raws.before<"u")return l=c.raws.before,l.includes(`
39
- `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(n,i){let l;return n.walkDecls(c=>{if(typeof c.raws.before<"u")return l=c.raws.before,l.includes(`
40
- `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(n){let i;return n.walk(l=>{if(l.type!=="decl"&&(i=l.raws.between,typeof i<"u"))return false}),i}rawBeforeRule(n){let i;return n.walk(l=>{if(l.nodes&&(l.parent!==n||n.first!==l)&&typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
41
- `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawColon(n){let i;return n.walkDecls(l=>{if(typeof l.raws.between<"u")return i=l.raws.between.replace(/[^\s:]/g,""),false}),i}rawEmptyBody(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length===0&&(i=l.raws.after,typeof i<"u"))return false}),i}rawIndent(n){if(n.raws.indent)return n.raws.indent;let i;return n.walk(l=>{let c=l.parent;if(c&&c!==n&&c.parent&&c.parent===n&&typeof l.raws.before<"u"){let a=l.raws.before.split(`
42
- `);return i=a[a.length-1],i=i.replace(/\S/g,""),false}}),i}rawSemicolon(n){let i;return n.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(i=l.raws.semicolon,typeof i<"u"))return false}),i}rawValue(n,i){let l=n[i],c=n.raws[i];return c&&c.value===l?c.raw:l}root(n){this.body(n),n.raws.after&&this.builder(n.raws.after);}rule(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end");}stringify(n,i){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,i);}}return Cs=r,r.default=r,Cs}var Es,Fi;function kr(){if(Fi)return Es;Fi=1;let t=Bo();function e(r,s){new t(s).stringify(r);}return Es=e,e.default=e,Es}var _s,$i;function Mr(){if($i)return _s;$i=1;let{isClean:t,my:e}=Cn(),r=Sn(),s=Bo(),n=kr();function i(c,a){let h=new c.constructor;for(let o in c){if(!Object.prototype.hasOwnProperty.call(c,o)||o==="proxyCache")continue;let p=c[o],d=typeof p;o==="parent"&&d==="object"?a&&(h[o]=a):o==="source"?h[o]=p:Array.isArray(p)?h[o]=p.map(u=>i(u,h)):(d==="object"&&p!==null&&(p=i(p)),h[o]=p);}return h}class l{constructor(a={}){this.raws={},this[t]=false,this[e]=true;for(let h in a)if(h==="nodes"){this.nodes=[];for(let o of a[h])typeof o.clone=="function"?this.append(o.clone()):this.append(o);}else this[h]=a[h];}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between;}clone(a={}){let h=i(this);for(let o in a)h[o]=a[o];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:o,start:p}=this.rangeBy(h);return this.source.input.error(a,{column:p.column,line:p.line},{column:o.column,line:o.line},h)}return new r(a)}getProxyProcessor(){return {get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,o){return a[h]===o||(a[h]=o,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),true}}}markDirty(){if(this[t]){this[t]=false;let a=this;for(;a=a.parent;)a[t]=false;}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a,h){let o=this.source.start;if(a.index)o=this.positionInside(a.index,h);else if(a.word){h=this.toString();let p=h.indexOf(a.word);p!==-1&&(o=this.positionInside(p,h));}return o}positionInside(a,h){let o=h||this.toString(),p=this.source.start.column,d=this.source.start.line;for(let u=0;u<a;u++)o[u]===`
43
- `?(p=1,d+=1):p+=1;return {column:p,line:d}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a){let h={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(a.word){let p=this.toString(),d=p.indexOf(a.word);d!==-1&&(h=this.positionInside(d,p),o=this.positionInside(d+a.word.length,p));}else a.start?h={column:a.start.column,line:a.start.line}:a.index&&(h=this.positionInside(a.index)),a.end?o={column:a.end.column,line:a.end.line}:typeof a.endIndex=="number"?o=this.positionInside(a.endIndex):a.index&&(o=this.positionInside(a.index+1));return (o.line<h.line||o.line===h.line&&o.column<=h.column)&&(o={column:h.column+1,line:h.line}),{end:o,start:h}}raw(a,h){return new s().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,o=false;for(let p of a)p===this?o=true:o?(this.parent.insertAfter(h,p),h=p):this.parent.insertBefore(h,p);o||this.remove();}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let o={},p=h==null;h=h||new Map;let d=0;for(let u in this){if(!Object.prototype.hasOwnProperty.call(this,u)||u==="parent"||u==="proxyCache")continue;let m=this[u];if(Array.isArray(m))o[u]=m.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,h):f);else if(typeof m=="object"&&m.toJSON)o[u]=m.toJSON(null,h);else if(u==="source"){let f=h.get(m.input);f==null&&(f=d,h.set(m.input,d),d++),o[u]={end:m.end,inputId:f,start:m.start};}else o[u]=m;}return p&&(o.inputs=[...h.keys()].map(u=>u.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=n){a.stringify&&(a=a.stringify);let h="";return a(this,o=>{h+=o;}),h}warn(a,h,o){let p={node:this};for(let d in o)p[d]=o[d];return a.warn(h,p)}get proxyOf(){return this}}return _s=l,l.default=l,_s}var Rs,Ui;function Tr(){if(Ui)return Rs;Ui=1;let t=Mr();class e extends t{constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Rs=e,e.default=e,Rs}var ks,Bi;function fc(){if(Bi)return ks;Bi=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ks={nanoid:(s=21)=>{let n="",i=s;for(;i--;)n+=t[Math.random()*64|0];return n},customAlphabet:(s,n=21)=>(i=n)=>{let l="",c=i;for(;c--;)l+=s[Math.random()*s.length|0];return l}},ks}var Ms,ji;function jo(){if(ji)return Ms;ji=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{existsSync:r,readFileSync:s}=Ae,{dirname:n,join:i}=Ae;function l(a){return Buffer?Buffer.from(a,"base64").toString():window.atob(a)}class c{constructor(h,o){if(o.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let p=o.map?o.map.prev:void 0,d=this.loadMap(o.from,p);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=n(this.mapFile)),d&&(this.text=d);}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(h){let o=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,u=/^data:application\/json,/;if(d.test(h)||u.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(o.test(h)||p.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let o=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let p=h.lastIndexOf(o.pop()),d=h.indexOf("*/",p);p>-1&&d>-1&&(this.annotation=this.getAnnotationURL(h.substring(p,d)));}loadFile(h){if(this.root=n(h),r(h))return this.mapFile=h,s(h,"utf-8").toString().trim()}loadMap(h,o){if(o===false)return false;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let p=o(h);if(p){let d=this.loadFile(p);if(!d)throw new Error("Unable to load previous source map: "+p.toString());return d}}else {if(o instanceof t)return e.fromSourceMap(o).toString();if(o instanceof e)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return h&&(p=i(n(h),p)),this.loadFile(p)}}}startWith(h,o){return h?h.substr(0,o.length)===o:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ms=c,c.default=c,Ms}var Ts,zi;function Or(){if(zi)return Ts;zi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{fileURLToPath:r,pathToFileURL:s}=Ae,{isAbsolute:n,resolve:i}=Ae,{nanoid:l}=fc(),c=Ae,a=Sn(),h=jo(),o=Symbol("fromOffsetCache"),p=!!(t&&e),d=!!(i&&n);class u{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!d||/^\w+:\/\//.test(g.from)||n(g.from)?this.file=g.from:this.file=i(g.from)),d&&p){let x=new h(this.css,g);if(x.text){this.map=x;let v=x.consumer().file;!this.file&&v&&(this.file=this.mapResolve(v));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(f,g,x,v={}){let w,C,b;if(g&&typeof g=="object"){let S=g,_=x;if(typeof S.offset=="number"){let T=this.fromOffset(S.offset);g=T.line,x=T.col;}else g=S.line,x=S.column;if(typeof _.offset=="number"){let T=this.fromOffset(_.offset);C=T.line,b=T.col;}else C=_.line,b=_.column;}else if(!x){let S=this.fromOffset(g);g=S.line,x=S.col;}let y=this.origin(g,x,C,b);return y?w=new a(f,y.endLine===void 0?y.line:{column:y.column,line:y.line},y.endLine===void 0?y.column:{column:y.endColumn,line:y.endLine},y.source,y.file,v.plugin):w=new a(f,C===void 0?g:{column:x,line:g},C===void 0?x:{column:b,line:C},this.css,this.file,v.plugin),w.input={column:x,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(s&&(w.input.url=s(this.file).toString()),w.input.file=this.file),w}fromOffset(f){let g,x;if(this[o])x=this[o];else {let w=this.css.split(`
44
- `);x=new Array(w.length);let C=0;for(let b=0,y=w.length;b<y;b++)x[b]=C,C+=w[b].length+1;this[o]=x;}g=x[x.length-1];let v=0;if(f>=g)v=x.length-1;else {let w=x.length-2,C;for(;v<w;)if(C=v+(w-v>>1),f<x[C])w=C-1;else if(f>=x[C+1])v=C+1;else {v=C;break}}return {col:f-x[v]+1,line:v+1}}mapResolve(f){return /^\w+:\/\//.test(f)?f:i(this.map.consumer().sourceRoot||this.map.root||".",f)}origin(f,g,x,v){if(!this.map)return false;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:f});if(!C.source)return false;let b;typeof x=="number"&&(b=w.originalPositionFor({column:v,line:x}));let y;n(C.source)?y=s(C.source):y=new URL(C.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let S={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:y.toString()};if(y.protocol==="file:")if(r)S.file=r(y);else throw new Error("file: protocol is not available in this PostCSS build");let _=w.sourceContentFor(C.source);return _&&(S.source=_),S}toJSON(){let f={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(f[g]=this[g]);return this.map&&(f.map={...this.map},f.map.consumerCache&&(f.map.consumerCache=void 0)),f}get from(){return this.file||this.id}}return Ts=u,u.default=u,c&&c.registerInput&&c.registerInput(u),Ts}var Os,Wi;function zo(){if(Wi)return Os;Wi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{dirname:r,relative:s,resolve:n,sep:i}=Ae,{pathToFileURL:l}=Ae,c=Or(),a=!!(t&&e),h=!!(r&&n&&s&&i);class o{constructor(d,u,m,f){this.stringify=d,this.mapOpts=m.map||{},this.root=u,this.opts=m,this.css=f,this.originalCSS=f,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let u=`
36
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(s){this.builder=s;}atrule(s,i){let l="@"+s.name,u=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?l+=s.raws.afterName:u&&(l+=" "),s.nodes)this.block(s,l+u);else {let o=(s.raws.between||"")+(i?";":"");this.builder(l+u+o,s);}}beforeAfter(s,i){let l;s.type==="decl"?l=this.raw(s,null,"beforeDecl"):s.type==="comment"?l=this.raw(s,null,"beforeComment"):i==="before"?l=this.raw(s,null,"beforeRule"):l=this.raw(s,null,"beforeClose");let u=s.parent,o=0;for(;u&&u.type!=="root";)o+=1,u=u.parent;if(l.includes(`
37
+ `)){let h=this.raw(s,null,"indent");if(h.length)for(let a=0;a<o;a++)l+=h;}return l}block(s,i){let l=this.raw(s,"between","beforeOpen");this.builder(i+l+"{",s,"start");let u;s.nodes&&s.nodes.length?(this.body(s),u=this.raw(s,"after")):u=this.raw(s,"after","emptyBody"),u&&this.builder(u),this.builder("}",s,"end");}body(s){let i=s.nodes.length-1;for(;i>0&&s.nodes[i].type==="comment";)i-=1;let l=this.raw(s,"semicolon");for(let u=0;u<s.nodes.length;u++){let o=s.nodes[u],h=this.raw(o,"before");h&&this.builder(h),this.stringify(o,i!==u||l);}}comment(s){let i=this.raw(s,"left","commentLeft"),l=this.raw(s,"right","commentRight");this.builder("/*"+i+s.text+l+"*/",s);}decl(s,i){let l=this.raw(s,"between","colon"),u=s.prop+l+this.rawValue(s,"value");s.important&&(u+=s.raws.important||" !important"),i&&(u+=";"),this.builder(u,s);}document(s){this.body(s);}raw(s,i,l){let u;if(l||(l=i),i&&(u=s.raws[i],typeof u<"u"))return u;let o=s.parent;if(l==="before"&&(!o||o.type==="root"&&o.first===s||o&&o.type==="document"))return "";if(!o)return t[l];let h=s.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(s,l);{let a="raw"+e(l);this[a]?u=this[a](h,s):h.walk(f=>{if(u=f.raws[i],typeof u<"u")return false});}return typeof u>"u"&&(u=t[l]),h.rawCache[l]=u,u}rawBeforeClose(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return i=l.raws.after,i.includes(`
38
+ `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawBeforeComment(s,i){let l;return s.walkComments(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
39
+ `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(s,i){let l;return s.walkDecls(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
40
+ `)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(i,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(s){let i;return s.walk(l=>{if(l.type!=="decl"&&(i=l.raws.between,typeof i<"u"))return false}),i}rawBeforeRule(s){let i;return s.walk(l=>{if(l.nodes&&(l.parent!==s||s.first!==l)&&typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
41
+ `)&&(i=i.replace(/[^\n]+$/,"")),false}),i&&(i=i.replace(/\S/g,"")),i}rawColon(s){let i;return s.walkDecls(l=>{if(typeof l.raws.between<"u")return i=l.raws.between.replace(/[^\s:]/g,""),false}),i}rawEmptyBody(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length===0&&(i=l.raws.after,typeof i<"u"))return false}),i}rawIndent(s){if(s.raws.indent)return s.raws.indent;let i;return s.walk(l=>{let u=l.parent;if(u&&u!==s&&u.parent&&u.parent===s&&typeof l.raws.before<"u"){let o=l.raws.before.split(`
42
+ `);return i=o[o.length-1],i=i.replace(/\S/g,""),false}}),i}rawSemicolon(s){let i;return s.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(i=l.raws.semicolon,typeof i<"u"))return false}),i}rawValue(s,i){let l=s[i],u=s.raws[i];return u&&u.value===l?u.raw:l}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after);}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end");}stringify(s,i){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,i);}}return Is=r,r.default=r,Is}var Ns,Zi;function Tr(){if(Zi)return Ns;Zi=1;let t=Ko();function e(r,n){new t(n).stringify(r);}return Ns=e,e.default=e,Ns}var As,Xi;function Or(){if(Xi)return As;Xi=1;let{isClean:t,my:e}=In(),r=On(),n=Ko(),s=Tr();function i(u,o){let h=new u.constructor;for(let a in u){if(!Object.prototype.hasOwnProperty.call(u,a)||a==="proxyCache")continue;let f=u[a],d=typeof f;a==="parent"&&d==="object"?o&&(h[a]=o):a==="source"?h[a]=f:Array.isArray(f)?h[a]=f.map(c=>i(c,h)):(d==="object"&&f!==null&&(f=i(f)),h[a]=f);}return h}class l{constructor(o={}){this.raws={},this[t]=false,this[e]=true;for(let h in o)if(h==="nodes"){this.nodes=[];for(let a of o[h])typeof a.clone=="function"?this.append(a.clone()):this.append(a);}else this[h]=o[h];}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let h=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let h in o)this[h]=o[h];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between;}clone(o={}){let h=i(this);for(let a in o)h[a]=o[a];return h}cloneAfter(o={}){let h=this.clone(o);return this.parent.insertAfter(this,h),h}cloneBefore(o={}){let h=this.clone(o);return this.parent.insertBefore(this,h),h}error(o,h={}){if(this.source){let{end:a,start:f}=this.rangeBy(h);return this.source.input.error(o,{column:f.column,line:f.line},{column:a.column,line:a.line},h)}return new r(o)}getProxyProcessor(){return {get(o,h){return h==="proxyOf"?o:h==="root"?()=>o.root().toProxy():o[h]},set(o,h,a){return o[h]===a||(o[h]=a,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&o.markDirty()),true}}}markDirty(){if(this[t]){this[t]=false;let o=this;for(;o=o.parent;)o[t]=false;}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,h){let a=this.source.start;if(o.index)a=this.positionInside(o.index,h);else if(o.word){h=this.toString();let f=h.indexOf(o.word);f!==-1&&(a=this.positionInside(f,h));}return a}positionInside(o,h){let a=h||this.toString(),f=this.source.start.column,d=this.source.start.line;for(let c=0;c<o;c++)a[c]===`
43
+ `?(f=1,d+=1):f+=1;return {column:f,line:d}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let h={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(o.word){let f=this.toString(),d=f.indexOf(o.word);d!==-1&&(h=this.positionInside(d,f),a=this.positionInside(d+o.word.length,f));}else o.start?h={column:o.start.column,line:o.start.line}:o.index&&(h=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return (a.line<h.line||a.line===h.line&&a.column<=h.column)&&(a={column:h.column+1,line:h.line}),{end:a,start:h}}raw(o,h){return new n().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,a=false;for(let f of o)f===this?a=true:a?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);a||this.remove();}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let a={},f=h==null;h=h||new Map;let d=0;for(let c in this){if(!Object.prototype.hasOwnProperty.call(this,c)||c==="parent"||c==="proxyCache")continue;let m=this[c];if(Array.isArray(m))a[c]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,h):p);else if(typeof m=="object"&&m.toJSON)a[c]=m.toJSON(null,h);else if(c==="source"){let p=h.get(m.input);p==null&&(p=d,h.set(m.input,d),d++),a[c]={end:m.end,inputId:p,start:m.start};}else a[c]=m;}return f&&(a.inputs=[...h.keys()].map(c=>c.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,a=>{h+=a;}),h}warn(o,h,a){let f={node:this};for(let d in a)f[d]=a[d];return o.warn(h,f)}get proxyOf(){return this}}return As=l,l.default=l,As}var Ds,Ji;function Ir(){if(Ji)return Ds;Ji=1;let t=Or();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Ds=e,e.default=e,Ds}var Ps,Ki;function Nc(){if(Ki)return Ps;Ki=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ps={nanoid:(n=21)=>{let s="",i=n;for(;i--;)s+=t[Math.random()*64|0];return s},customAlphabet:(n,s=21)=>(i=s)=>{let l="",u=i;for(;u--;)l+=n[Math.random()*n.length|0];return l}},Ps}var Ls,Qi;function Qo(){if(Qi)return Ls;Qi=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{existsSync:r,readFileSync:n}=Ae,{dirname:s,join:i}=Ae;function l(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class u{constructor(h,a){if(a.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let f=a.map?a.map.prev:void 0,d=this.loadMap(a.from,f);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=s(this.mapFile)),d&&(this.text=d);}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(h){let a=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/;if(d.test(h)||c.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(a.test(h)||f.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let a=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let f=h.lastIndexOf(a.pop()),d=h.indexOf("*/",f);f>-1&&d>-1&&(this.annotation=this.getAnnotationURL(h.substring(f,d)));}loadFile(h){if(this.root=s(h),r(h))return this.mapFile=h,n(h,"utf-8").toString().trim()}loadMap(h,a){if(a===false)return false;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let f=a(h);if(f){let d=this.loadFile(f);if(!d)throw new Error("Unable to load previous source map: "+f.toString());return d}}else {if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return h&&(f=i(s(h),f)),this.loadFile(f)}}}startWith(h,a){return h?h.substr(0,a.length)===a:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ls=u,u.default=u,Ls}var Fs,eo;function Nr(){if(eo)return Fs;eo=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{fileURLToPath:r,pathToFileURL:n}=Ae,{isAbsolute:s,resolve:i}=Ae,{nanoid:l}=Nc(),u=Ae,o=On(),h=Qo(),a=Symbol("fromOffsetCache"),f=!!(t&&e),d=!!(i&&s);class c{constructor(p,g={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!d||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=i(g.from)),d&&f){let x=new h(this.css,g);if(x.text){this.map=x;let y=x.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(p,g,x,y={}){let b,S,w;if(g&&typeof g=="object"){let C=g,_=x;if(typeof C.offset=="number"){let T=this.fromOffset(C.offset);g=T.line,x=T.col;}else g=C.line,x=C.column;if(typeof _.offset=="number"){let T=this.fromOffset(_.offset);S=T.line,w=T.col;}else S=_.line,w=_.column;}else if(!x){let C=this.fromOffset(g);g=C.line,x=C.col;}let v=this.origin(g,x,S,w);return v?b=new o(p,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):b=new o(p,S===void 0?g:{column:x,line:g},S===void 0?x:{column:w,line:S},this.css,this.file,y.plugin),b.input={column:x,endColumn:w,endLine:S,line:g,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,x;if(this[a])x=this[a];else {let b=this.css.split(`
44
+ `);x=new Array(b.length);let S=0;for(let w=0,v=b.length;w<v;w++)x[w]=S,S+=b[w].length+1;this[a]=x;}g=x[x.length-1];let y=0;if(p>=g)y=x.length-1;else {let b=x.length-2,S;for(;y<b;)if(S=y+(b-y>>1),p<x[S])b=S-1;else if(p>=x[S+1])y=S+1;else {y=S;break}}return {col:p-x[y]+1,line:y+1}}mapResolve(p){return /^\w+:\/\//.test(p)?p:i(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,x,y){if(!this.map)return false;let b=this.map.consumer(),S=b.originalPositionFor({column:g,line:p});if(!S.source)return false;let w;typeof x=="number"&&(w=b.originalPositionFor({column:y,line:x}));let v;s(S.source)?v=n(S.source):v=new URL(S.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let C={column:S.column,endColumn:w&&w.column,endLine:w&&w.line,line:S.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let _=b.sourceContentFor(S.source);return _&&(C.source=_),C}toJSON(){let p={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Fs=c,c.default=c,u&&u.registerInput&&u.registerInput(c),Fs}var Us,to;function ea(){if(to)return Us;to=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=Ae,{dirname:r,relative:n,resolve:s,sep:i}=Ae,{pathToFileURL:l}=Ae,u=Nr(),o=!!(t&&e),h=!!(r&&s&&n&&i);class a{constructor(d,c,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=c,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let c=`
45
45
  `;this.css.includes(`\r
46
- `)&&(u=`\r
47
- `),this.css+=u+"/*# sourceMappingURL="+d+" */";}applyPrevMaps(){for(let d of this.previous()){let u=this.toUrl(this.path(d.file)),m=d.root||r(d.file),f;this.mapOpts.sourcesContent===false?(f=new t(d.text),f.sourcesContent&&(f.sourcesContent=null)):f=d.consumer(),this.map.applySourceMap(f,u,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let d;for(let u=this.root.nodes.length-1;u>=0;u--)d=this.root.nodes[u],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(u);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&a&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,u=>{d+=u;}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:true});}else this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true});let d=1,u=1,m="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,x;this.stringify(this.root,(v,w,C)=>{if(this.css+=v,w&&C!=="end"&&(f.generated.line=d,f.generated.column=u-1,w.source&&w.source.start?(f.source=this.sourcePath(w),f.original.line=w.source.start.line,f.original.column=w.source.start.column-1,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,this.map.addMapping(f))),g=v.match(/\n/g),g?(d+=g.length,x=v.lastIndexOf(`
48
- `),u=v.length-x):u+=v.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(f.source=this.sourcePath(w),f.original.line=w.source.end.line,f.original.column=w.source.end.column-1,f.generated.line=d,f.generated.column=u-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=d,f.generated.column=u-1,this.map.addMapping(f)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==true?false:this.previous().length?this.previous().some(u=>u.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let u=this.memoizedPaths.get(d);if(u)return u;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let f=s(m,d);return this.memoizedPaths.set(d,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let u=d.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u);}});else {let d=new c(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map);}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(u=>{if(u.source){let m=u.source.input.from;if(m&&!d[m]){d[m]=true;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,u.source.input.css);}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css);}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let u=this.memoizedFileURLs.get(d);if(u)return u;if(l){let m=l(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let u=this.memoizedURLs.get(d);if(u)return u;i==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Os=o,Os}var Is,Vi;function Ir(){if(Vi)return Is;Vi=1;let t=Mr();class e extends t{constructor(s){super(s),this.type="comment";}}return Is=e,e.default=e,Is}var Ns,qi;function ot(){if(qi)return Ns;qi=1;let{isClean:t,my:e}=Cn(),r=Tr(),s=Ir(),n=Mr(),i,l,c,a;function h(d){return d.map(u=>(u.nodes&&(u.nodes=h(u.nodes)),delete u.source,u))}function o(d){if(d[t]=false,d.proxyOf.nodes)for(let u of d.proxyOf.nodes)o(u);}class p extends n{append(...u){for(let m of u){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(u){if(super.cleanRaws(u),this.nodes)for(let m of this.nodes)m.cleanRaws(u);}each(u){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=u(this.proxyOf.nodes[f],f),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(u){return this.nodes.every(u)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let u=this.lastEach;return this.indexes[u]=0,u}getProxyProcessor(){return {get(u,m){return m==="proxyOf"?u:u[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>u[m](...f.map(g=>typeof g=="function"?(x,v)=>g(x.toProxy(),v):g)):m==="every"||m==="some"?f=>u[m]((g,...x)=>f(g.toProxy(),...x)):m==="root"?()=>u.root().toProxy():m==="nodes"?u.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?u[m].toProxy():u[m]:u[m]},set(u,m,f){return u[m]===f||(u[m]=f,(m==="name"||m==="params"||m==="selector")&&u.markDirty()),true}}}index(u){return typeof u=="number"?u:(u.proxyOf&&(u=u.proxyOf),this.proxyOf.nodes.indexOf(u))}insertAfter(u,m){let f=this.index(u),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(u);for(let v of g)this.proxyOf.nodes.splice(f+1,0,v);let x;for(let v in this.indexes)x=this.indexes[v],f<x&&(this.indexes[v]=x+g.length);return this.markDirty(),this}insertBefore(u,m){let f=this.index(u),g=f===0?"prepend":false,x=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(u);for(let w of x)this.proxyOf.nodes.splice(f,0,w);let v;for(let w in this.indexes)v=this.indexes[w],f<=v&&(this.indexes[w]=v+x.length);return this.markDirty(),this}normalize(u,m){if(typeof u=="string")u=h(i(u).nodes);else if(typeof u>"u")u=[];else if(Array.isArray(u)){u=u.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type==="root"&&this.type!=="document"){u=u.nodes.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type)u=[u];else if(u.prop){if(typeof u.value>"u")throw new Error("Value field is missed in node creation");typeof u.value!="string"&&(u.value=String(u.value)),u=[new r(u)];}else if(u.selector)u=[new l(u)];else if(u.name)u=[new c(u)];else if(u.text)u=[new s(u)];else throw new Error("Unknown node type in node creation");return u.map(g=>(g[e]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[t]&&o(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...u){u=u.reverse();for(let m of u){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length;}return this.markDirty(),this}push(u){return u.parent=this,this.proxyOf.nodes.push(u),this}removeAll(){for(let u of this.proxyOf.nodes)u.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(u){u=this.index(u),this.proxyOf.nodes[u].parent=void 0,this.proxyOf.nodes.splice(u,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=u&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(u,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(u,f));}),this.markDirty(),this}some(u){return this.nodes.some(u)}walk(u){return this.each((m,f)=>{let g;try{g=u(m,f);}catch(x){throw m.addToError(x)}return g!==false&&m.walk&&(g=m.walk(u)),g})}walkAtRules(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&u.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(u){return this.walk((m,f)=>{if(m.type==="comment")return u(m,f)})}walkDecls(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&u.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(u,m){return m?u instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&u.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===u)return m(f,g)}):(m=u,this.walk((f,g)=>{if(f.type==="rule")return m(f,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=d=>{i=d;},p.registerRule=d=>{l=d;},p.registerAtRule=d=>{c=d;},p.registerRoot=d=>{a=d;},Ns=p,p.default=p,p.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,c.prototype):d.type==="rule"?Object.setPrototypeOf(d,l.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,s.prototype):d.type==="root"&&Object.setPrototypeOf(d,a.prototype),d[e]=true,d.nodes&&d.nodes.forEach(u=>{p.rebuild(u);});},Ns}var As,Hi;function En(){if(Hi)return As;Hi=1;let t=ot(),e,r;class s extends t{constructor(i){super({type:"document",...i}),this.nodes||(this.nodes=[]);}toResult(i={}){return new e(new r,this,i).stringify()}}return s.registerLazyResult=n=>{e=n;},s.registerProcessor=n=>{r=n;},As=s,s.default=s,As}var Ps,Zi;function Vo(){if(Zi)return Ps;Zi=1;class t{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let n=s.node.rangeBy(s);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in s)this[n]=s[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ps=t,t.default=t,Ps}var Ls,Yi;function _n(){if(Yi)return Ls;Yi=1;let t=Vo();class e{constructor(s,n,i){this.processor=s,this.messages=[],this.root=n,this.opts=i,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(s,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new t(s,n);return this.messages.push(i),i}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Ls=e,e.default=e,Ls}var Fs,Xi;function pc(){if(Xi)return Fs;Xi=1;let t=39,e=34,r=92,s=47,n=10,i=32,l=12,c=9,a=13,h=91,o=93,p=40,d=41,u=123,m=125,f=59,g=42,x=58,v=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return Fs=function(_,T={}){let R=_.css.valueOf(),j=T.ignoreErrors,D,E,P,W,L,U,J,ue,ae,K,Ze=R.length,M=0,Pe=[],Ce=[];function Ut(){return M}function me(B){throw _.error("Unclosed "+B,M)}function Oe(){return Ce.length===0&&M>=Ze}function rt(B){if(Ce.length)return Ce.pop();if(M>=Ze)return;let le=B?B.ignoreUnclosed:false;switch(D=R.charCodeAt(M),D){case n:case i:case c:case a:case l:{E=M;do E+=1,D=R.charCodeAt(E);while(D===i||D===n||D===c||D===a||D===l);K=["space",R.slice(M,E)],M=E-1;break}case h:case o:case u:case m:case x:case f:case d:{let Q=String.fromCharCode(D);K=[Q,Q,M];break}case p:{if(ue=Pe.length?Pe.pop()[1]:"",ae=R.charCodeAt(M+1),ue==="url"&&ae!==t&&ae!==e&&ae!==i&&ae!==n&&ae!==c&&ae!==l&&ae!==a){E=M;do{if(U=false,E=R.indexOf(")",E+1),E===-1)if(j||le){E=M;break}else me("bracket");for(J=E;R.charCodeAt(J-1)===r;)J-=1,U=!U;}while(U);K=["brackets",R.slice(M,E+1),M,E],M=E;}else E=R.indexOf(")",M+1),W=R.slice(M,E+1),E===-1||b.test(W)?K=["(","(",M]:(K=["brackets",W,M,E],M=E);break}case t:case e:{P=D===t?"'":'"',E=M;do{if(U=false,E=R.indexOf(P,E+1),E===-1)if(j||le){E=M+1;break}else me("string");for(J=E;R.charCodeAt(J-1)===r;)J-=1,U=!U;}while(U);K=["string",R.slice(M,E+1),M,E],M=E;break}case v:{w.lastIndex=M+1,w.test(R),w.lastIndex===0?E=R.length-1:E=w.lastIndex-2,K=["at-word",R.slice(M,E+1),M,E],M=E;break}case r:{for(E=M,L=true;R.charCodeAt(E+1)===r;)E+=1,L=!L;if(D=R.charCodeAt(E+1),L&&D!==s&&D!==i&&D!==n&&D!==c&&D!==a&&D!==l&&(E+=1,y.test(R.charAt(E)))){for(;y.test(R.charAt(E+1));)E+=1;R.charCodeAt(E+1)===i&&(E+=1);}K=["word",R.slice(M,E+1),M,E],M=E;break}default:{D===s&&R.charCodeAt(M+1)===g?(E=R.indexOf("*/",M+2)+1,E===0&&(j||le?E=R.length:me("comment")),K=["comment",R.slice(M,E+1),M,E],M=E):(C.lastIndex=M+1,C.test(R),C.lastIndex===0?E=R.length-1:E=C.lastIndex-2,K=["word",R.slice(M,E+1),M,E],Pe.push(K),M=E);break}}return M++,K}function Ye(B){Ce.push(B);}return {back:Ye,endOfFile:Oe,nextToken:rt,position:Ut}},Fs}var $s,Ji;function Rn(){if(Ji)return $s;Ji=1;let t=ot();class e extends t{constructor(s){super(s),this.type="atrule";}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return $s=e,e.default=e,t.registerAtRule(e),$s}var Us,Ki;function Zt(){if(Ki)return Us;Ki=1;let t=ot(),e,r;class s extends t{constructor(i){super(i),this.type="root",this.nodes||(this.nodes=[]);}normalize(i,l,c){let a=super.normalize(i);if(l){if(c==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of a)h.raws.before=l.raws.before;}return a}removeChild(i,l){let c=this.index(i);return !l&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(i)}toResult(i={}){return new e(new r,this,i).stringify()}}return s.registerLazyResult=n=>{e=n;},s.registerProcessor=n=>{r=n;},Us=s,s.default=s,t.registerRoot(s),Us}var Bs,Qi;function qo(){if(Qi)return Bs;Qi=1;let t={comma(e){return t.split(e,[","],true)},space(e){let r=[" ",`
49
- `," "];return t.split(e,r)},split(e,r,s){let n=[],i="",l=false,c=0,a=false,h="",o=false;for(let p of e)o?o=false:p==="\\"?o=true:a?p===h&&(a=false):p==='"'||p==="'"?(a=true,h=p):p==="("?c+=1:p===")"?c>0&&(c-=1):c===0&&r.includes(p)&&(l=true),l?(i!==""&&n.push(i.trim()),i="",l=false):i+=p;return (s||i!=="")&&n.push(i.trim()),n}};return Bs=t,t.default=t,Bs}var js,eo;function kn(){if(eo)return js;eo=1;let t=ot(),e=qo();class r extends t{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return e.comma(this.selector)}set selectors(n){let i=this.selector?this.selector.match(/,\s*/):null,l=i?i[0]:","+this.raw("between","beforeOpen");this.selector=n.join(l);}}return js=r,r.default=r,t.registerRule(r),js}var zs,to;function mc(){if(to)return zs;to=1;let t=Tr(),e=pc(),r=Ir(),s=Rn(),n=Zt(),i=kn(),l={empty:true,space:true};function c(h){for(let o=h.length-1;o>=0;o--){let p=h[o],d=p[3]||p[2];if(d)return d}}class a{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}};}atrule(o){let p=new s;p.name=o[1].slice(1),p.name===""&&this.unnamedAtrule(p,o),this.init(p,o[2]);let d,u,m,f=false,g=false,x=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),d=o[0],d==="("||d==="["?v.push(d==="("?")":"]"):d==="{"&&v.length>0?v.push("}"):d===v[v.length-1]&&v.pop(),v.length===0)if(d===";"){p.source.end=this.getPosition(o[2]),p.source.end.offset++,this.semicolon=true;break}else if(d==="{"){g=true;break}else if(d==="}"){if(x.length>0){for(m=x.length-1,u=x[m];u&&u[0]==="space";)u=x[--m];u&&(p.source.end=this.getPosition(u[3]||u[2]),p.source.end.offset++);}this.end(o);break}else x.push(o);else x.push(o);if(this.tokenizer.endOfFile()){f=true;break}}p.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(p.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(p,"params",x),f&&(o=x[x.length-1],p.source.end=this.getPosition(o[3]||o[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p);}checkMissedSemicolon(o){let p=this.colon(o);if(p===false)return;let d=0,u;for(let m=p-1;m>=0&&(u=o[m],!(u[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",u[0]==="word"?u[3]+1:u[2])}colon(o){let p=0,d,u,m;for(let[f,g]of o.entries()){if(d=g,u=d[0],u==="("&&(p+=1),u===")"&&(p-=1),p===0&&u===":")if(!m)this.doubleColon(d);else {if(m[0]==="word"&&m[1]==="progid")continue;return f}m=d;}return false}comment(o){let p=new r;this.init(p,o[2]),p.source.end=this.getPosition(o[3]||o[2]),p.source.end.offset++;let d=o[1].slice(2,-2);if(/^\s*$/.test(d))p.text="",p.raws.left=d,p.raws.right="";else {let u=d.match(/^(\s*)([^]*\S)(\s*)$/);p.text=u[2],p.raws.left=u[1],p.raws.right=u[3];}}createTokenizer(){this.tokenizer=e(this.input);}decl(o,p){let d=new t;this.init(d,o[0][2]);let u=o[o.length-1];for(u[0]===";"&&(this.semicolon=true,o.pop()),d.source.end=this.getPosition(u[3]||u[2]||c(o)),d.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),d.raws.before+=o.shift()[1];for(d.source.start=this.getPosition(o[0][2]),d.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;d.prop+=o.shift()[1];}d.raws.between="";let m;for(;o.length;)if(m=o.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let f=[],g;for(;o.length&&(g=o[0][0],!(g!=="space"&&g!=="comment"));)f.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(m=o[v],m[1].toLowerCase()==="!important"){d.important=true;let w=this.stringFrom(o,v);w=this.spacesFromEnd(o)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=o.slice(0),C="";for(let b=v;b>0;b--){let y=w[b][0];if(C.trim().indexOf("!")===0&&y!=="space")break;C=w.pop()[1]+C;}C.trim().indexOf("!")===0&&(d.important=true,d.raws.important=C,o=w);}if(m[0]!=="space"&&m[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(d.raws.between+=f.map(v=>v[1]).join(""),f=[]),this.raw(d,"value",f.concat(o),p),d.value.includes(":")&&!p&&this.checkMissedSemicolon(o);}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let p=new i;this.init(p,o[2]),p.selector="",p.raws.between="",this.current=p;}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o);}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(o){if(this.spaces+=o[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(o){let p=this.input.fromOffset(o);return {column:p.col,line:p.line,offset:o}}init(o,p){this.current.push(o),o.source={input:this.input,start:this.getPosition(p)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=false);}other(o){let p=false,d=null,u=false,m=null,f=[],g=o[1].startsWith("--"),x=[],v=o;for(;v;){if(d=v[0],x.push(v),d==="("||d==="[")m||(m=v),f.push(d==="("?")":"]");else if(g&&u&&d==="{")m||(m=v),f.push("}");else if(f.length===0)if(d===";")if(u){this.decl(x,g);return}else break;else if(d==="{"){this.rule(x);return}else if(d==="}"){this.tokenizer.back(x.pop()),p=true;break}else d===":"&&(u=true);else d===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));v=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(p=true),f.length>0&&this.unclosedBracket(m),p&&u){if(!g)for(;x.length&&(v=x[x.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,g);}else this.unknownWord(x);}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case "space":this.spaces+=o[1];break;case ";":this.freeSemicolon(o);break;case "}":this.end(o);break;case "comment":this.comment(o);break;case "at-word":this.atrule(o);break;case "{":this.emptyRule(o);break;default:this.other(o);break}this.endFile();}precheckMissedSemicolon(){}raw(o,p,d,u){let m,f,g=d.length,x="",v=true,w,C;for(let b=0;b<g;b+=1)m=d[b],f=m[0],f==="space"&&b===g-1&&!u?v=false:f==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!l[C]&&!l[w]?x.slice(-1)===","?v=false:x+=m[1]:v=false):x+=m[1];if(!v){let b=d.reduce((y,S)=>y+S[1],"");o.raws[p]={raw:b,value:x};}o[p]=x;}rule(o){o.pop();let p=new i;this.init(p,o[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(p,"selector",o),this.current=p;}spacesAndCommentsFromEnd(o){let p,d="";for(;o.length&&(p=o[o.length-1][0],!(p!=="space"&&p!=="comment"));)d=o.pop()[1]+d;return d}spacesAndCommentsFromStart(o){let p,d="";for(;o.length&&(p=o[0][0],!(p!=="space"&&p!=="comment"));)d+=o.shift()[1];return d}spacesFromEnd(o){let p,d="";for(;o.length&&(p=o[o.length-1][0],p==="space");)d=o.pop()[1]+d;return d}stringFrom(o,p){let d="";for(let u=p;u<o.length;u++)d+=o[u][1];return o.splice(p,o.length-p),d}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word",{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return zs=a,zs}var Ws,ro;function Mn(){if(ro)return Ws;ro=1;let t=ot(),e=mc(),r=Or();function s(n,i){let l=new r(n,i),c=new e(l);try{c.parse();}catch(a){throw a}return c.root}return Ws=s,s.default=s,t.registerParse(s),Ws}var Vs,so;function Ho(){if(so)return Vs;so=1;let {isClean:t,my:e}=Cn(),r=zo(),s=kr(),n=ot(),i=En(),c=_n(),a=Mn(),h=Zt(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},d={Once:true,postcssPlugin:true,prepare:true},u=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function f(C){let b=false,y=o[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[y,y+"-"+b,u,y+"Exit",y+"Exit-"+b]:b?[y,y+"-"+b,y+"Exit",y+"Exit-"+b]:C.append?[y,u,y+"Exit"]:[y,y+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",u,"DocumentExit"]:C.type==="root"?b=["Root",u,"RootExit"]:b=f(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function x(C){return C[t]=false,C.nodes&&C.nodes.forEach(b=>x(b)),C}let v={};class w{constructor(b,y,S){this.stringified=false,this.processed=false;let _;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))_=x(y);else if(y instanceof w||y instanceof c)_=x(y.root),y.map&&(typeof S.map>"u"&&(S.map={}),S.map.inline||(S.map.inline=false),S.map.prev=y.map);else {let T=a;S.syntax&&(T=S.syntax.parse),S.parser&&(T=S.parser),T.parse&&(T=T.parse);try{_=T(y,S);}catch(R){this.processed=true,this.error=R;}_&&!_[e]&&n.rebuild(_);}this.result=new c(b,_,S),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(T=>typeof T=="object"&&T.prepare?{...T,...T.prepare(this.result)}:T);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,y){let S=this.result.lastPlugin;try{y&&y.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=S.postcssPlugin,b.setMessage()):S.postcssVersion;}catch(_){console&&console.error&&console.error(_);}return b}prepareVisitors(){this.listeners={};let b=(y,S,_)=>{this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push([y,_]);};for(let y of this.plugins)if(typeof y=="object")for(let S in y){if(!p[S]&&/^[A-Z]/.test(S))throw new Error(`Unknown event ${S} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[S])if(typeof y[S]=="object")for(let _ in y[S])_==="*"?b(y,S,y[S][_]):b(y,S+"-"+_.toLowerCase(),y[S][_]);else typeof y[S]=="function"&&b(y,S,y[S]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let y=this.plugins[b],S=this.runOnRoot(y);if(m(S))try{await S;}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[t];){b[t]=true;let y=[g(b)];for(;y.length>0;){let S=this.visitTick(y);if(m(S))try{await S;}catch(_){let T=y[y.length-1].node;throw this.handleError(_,T)}}}if(this.listeners.OnceExit)for(let[y,S]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(b.type==="document"){let _=b.nodes.map(T=>S(T,this.helpers));await Promise.all(_);}else await S(b,this.helpers);}catch(_){throw this.handleError(_)}}}return this.processed=true,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(S=>b.Once(S,this.helpers));return m(y[0])?Promise.all(y):y}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let b=this.result.opts,y=s;b.syntax&&(y=b.syntax.stringify),b.stringifier&&(y=b.stringifier),y.stringify&&(y=y.stringify);let _=new r(y,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let b of this.plugins){let y=this.runOnRoot(b);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[t];)b[t]=true,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let y of b.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,b);}return this.result}then(b,y){return this.async().then(b,y)}toString(){return this.css}visitSync(b,y){for(let[S,_]of b){this.result.lastPlugin=S;let T;try{T=_(y,this.helpers);}catch(R){throw this.handleError(R,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(T))throw this.getAsyncError()}}visitTick(b){let y=b[b.length-1],{node:S,visitors:_}=y;if(S.type!=="root"&&S.type!=="document"&&!S.parent){b.pop();return}if(_.length>0&&y.visitorIndex<_.length){let[R,j]=_[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===_.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=R;try{return j(S.toProxy(),this.helpers)}catch(D){throw this.handleError(D,S)}}if(y.iterator!==0){let R=y.iterator,j;for(;j=S.nodes[S.indexes[R]];)if(S.indexes[R]+=1,!j[t]){j[t]=true,b.push(g(j));return}y.iterator=0,delete S.indexes[R];}let T=y.events;for(;y.eventIndex<T.length;){let R=T[y.eventIndex];if(y.eventIndex+=1,R===u){S.nodes&&S.nodes.length&&(S[t]=true,y.iterator=S.getIterator());return}else if(this.listeners[R]){y.visitors=this.listeners[R];return}}b.pop();}walkSync(b){b[t]=true;let y=f(b);for(let S of y)if(S===u)b.nodes&&b.each(_=>{_[t]||this.walkSync(_);});else {let _=this.listeners[S];if(_&&this.visitSync(_,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return w.registerPostcss=C=>{v=C;},Vs=w,w.default=w,h.registerLazyResult(w),i.registerLazyResult(w),Vs}var qs,no;function gc(){if(no)return qs;no=1;let t=zo(),e=kr(),s=Mn(),n=_n();class i{constructor(c,a,h){a=a.toString(),this.stringified=false,this._processor=c,this._css=a,this._opts=h,this._map=void 0;let o,p=e;this.result=new n(this._processor,o,this._opts),this.result.css=a;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let u=new t(p,o,this._opts,a);if(u.isMap()){let[m,f]=u.generate();m&&(this.result.css=m),f&&(this.result.map=f);}else u.clearAnnotation(),this.result.css=u.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,a){return this.async().then(c,a)}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 c,a=s;try{c=a(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return "NoWorkResult"}}return qs=i,i.default=i,qs}var Hs,io;function yc(){if(io)return Hs;io=1;let t=gc(),e=Ho(),r=En(),s=Zt();class n{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let c=[];for(let a of l)if(a.postcss===true?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))c=c.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)c.push(a);else if(typeof a=="function")c.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return c}process(l,c={}){return !this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new t(this,l,c):new e(this,l,c)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return Hs=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),Hs}var Gs,oo;function vc(){if(oo)return Gs;oo=1;let t=Tr(),e=jo(),r=Ir(),s=Rn(),n=Or(),i=Zt(),l=kn();function c(a,h){if(Array.isArray(a))return a.map(d=>c(d));let{inputs:o,...p}=a;if(o){h=[];for(let d of o){let u={...d,__proto__:n.prototype};u.map&&(u.map={...u.map,__proto__:e.prototype}),h.push(u);}}if(p.nodes&&(p.nodes=a.nodes.map(d=>c(d,h))),p.source){let{inputId:d,...u}=p.source;p.source=u,d!=null&&(p.source.input=h[d]);}if(p.type==="root")return new i(p);if(p.type==="decl")return new t(p);if(p.type==="rule")return new l(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new s(p);throw new Error("Unknown node type: "+a.type)}return Gs=c,c.default=c,Gs}var Zs,ao;function bc(){if(ao)return Zs;ao=1;let t=Sn(),e=Tr(),r=Ho(),s=ot(),n=yc(),i=kr(),l=vc(),c=En(),a=Vo(),h=Ir(),o=Rn(),p=_n(),d=Or(),u=Mn(),m=qo(),f=kn(),g=Zt(),x=Mr();function v(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new n(w)}return v.plugin=function(C,b){let y=false;function S(...T){console&&console.warn&&!y&&(y=true,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
50
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
51
- https://www.w3ctech.com/topic/2226`));let R=b(...T);return R.postcssPlugin=C,R.postcssVersion=new n().version,R}let _;return Object.defineProperty(S,"postcss",{get(){return _||(_=S()),_}}),S.process=function(T,R,j){return v([S(j)]).process(T,R)},S},v.stringify=i,v.parse=u,v.fromJSON=l,v.list=m,v.comment=w=>new h(w),v.atRule=w=>new o(w),v.decl=w=>new e(w),v.rule=w=>new f(w),v.root=w=>new g(w),v.document=w=>new c(w),v.CssSyntaxError=t,v.Declaration=e,v.Container=s,v.Processor=n,v.Document=c,v.Comment=h,v.Warning=a,v.AtRule=o,v.Result=p,v.Input=d,v.Rule=f,v.Root=g,v.Node=x,r.registerPostcss(v),Zs=v,v.default=v,Zs}var wc=bc(),se=lc(wc);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 en=class t{constructor(...e){Ee(this,"parentElement",null),Ee(this,"parentNode",null),Ee(this,"ownerDocument"),Ee(this,"firstChild",null),Ee(this,"lastChild",null),Ee(this,"previousSibling",null),Ee(this,"nextSibling",null),Ee(this,"ELEMENT_NODE",1),Ee(this,"TEXT_NODE",3),Ee(this,"nodeType"),Ee(this,"nodeName"),Ee(this,"RRNodeType");}get childNodes(){let e=[],r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var lo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},co={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cr={},Go={},xc=()=>!!globalThis.Zone;function Tn(t){if(cr[t])return cr[t];let e=globalThis[t],r=e.prototype,s=t in lo?lo[t]:void 0,n=!!(s&&s.every(c=>{var a,h;return !!((h=(a=Object.getOwnPropertyDescriptor(r,c))==null?void 0:a.get)!=null&&h.toString().includes("[native code]"))})),i=t in co?co[t]:void 0,l=!!(i&&i.every(c=>{var a;return typeof r[c]=="function"&&((a=r[c])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!xc())return cr[t]=e.prototype,e.prototype;try{let c=document.createElement("iframe");c.style.display="none",document.body.appendChild(c);let a=c.contentWindow;if(!a)return e.prototype;let h=a[t].prototype;if(!h)return c.remove(),r;let o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(c.classList.add("rr-block"),c.setAttribute("__rrwebUntaintedMutationObserver",""),Go[t]=()=>c.remove()):c.remove(),cr[t]=h}catch{return r}}var Ys={};function We(t,e,r){var s;let n=`${t}.${String(r)}`;if(Ys[n])return Ys[n].call(e);let i=Tn(t),l=(s=Object.getOwnPropertyDescriptor(i,r))==null?void 0:s.get;return l?(Ys[n]=l,l.call(e)):e[r]}var Xs={};function Zo(t,e,r){let s=`${t}.${String(r)}`;if(Xs[s])return Xs[s].bind(e);let i=Tn(t)[r];return typeof i!="function"?e[r]:(Xs[s]=i,i.bind(e))}function Sc(t){return We("Node",t,"ownerDocument")}function Cc(t){return We("Node",t,"childNodes")}function Ec(t){return We("Node",t,"parentNode")}function _c(t){return We("Node",t,"parentElement")}function Rc(t){return We("Node",t,"textContent")}function kc(t,e){return Zo("Node",t,"contains")(e)}function Mc(t){return Zo("Node",t,"getRootNode")()}function Tc(t){return !t||!("host"in t)?null:We("ShadowRoot",t,"host")}function Oc(t){return t.styleSheets}function Ic(t){return !t||!("shadowRoot"in t)?null:We("Element",t,"shadowRoot")}function Nc(t,e){return We("Element",t,"querySelector")(e)}function Ac(t,e){return We("Element",t,"querySelectorAll")(e)}function Yo(){return [Tn("MutationObserver").constructor,Go.MutationObserver??(()=>{})]}var qt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(qt=()=>new Date().getTime());function at(t,e,r){try{if(!(e in t))return ()=>{};let s=t[e],n=r(s);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),t[e]=n,()=>{t[e]=s;}}catch{return ()=>{}}}var H={ownerDocument:Sc,childNodes:Cc,parentNode:Ec,parentElement:_c,textContent:Rc,contains:kc,getRootNode:Mc,host:Tc,styleSheets:Oc,shadowRoot:Ic,querySelector:Nc,querySelectorAll:Ac,nowTimestamp:qt,mutationObserverCtor:Yo,patch:at};function ge(t,e,r=document){let s={capture:true,passive:true};return r.addEventListener(t,e,s),()=>r.removeEventListener(t,e,s)}var _t=`Please stop import mirror directly. Instead of that,\r
46
+ `)&&(c=`\r
47
+ `),this.css+=c+"/*# sourceMappingURL="+d+" */";}applyPrevMaps(){for(let d of this.previous()){let c=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===false?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,c,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let d;for(let c=this.root.nodes.length-1;c>=0;c--)d=this.root.nodes[c],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(c);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&o&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,c=>{d+=c;}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:true});}else this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new e({file:this.outputFile(),ignoreInvalidMapping:true});let d=1,c=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,x;this.stringify(this.root,(y,b,S)=>{if(this.css+=y,b&&S!=="end"&&(p.generated.line=d,p.generated.column=c-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=y.match(/\n/g),g?(d+=g.length,x=y.lastIndexOf(`
48
+ `),c=y.length-x):c+=y.length,b&&S!=="start"){let w=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==w.last||w.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=c-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=c-1,this.map.addMapping(p)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==true?false:this.previous().length?this.previous().some(c=>c.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let c=this.memoizedPaths.get(d);if(c)return c;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let c=d.source.input.map;this.previousMaps.includes(c)||this.previousMaps.push(c);}});else {let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map);}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(c=>{if(c.source){let m=c.source.input.from;if(m&&!d[m]){d[m]=true;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,c.source.input.css);}}});else if(this.css){let c=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(c,this.css);}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let c=this.memoizedFileURLs.get(d);if(c)return c;if(l){let m=l(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let c=this.memoizedURLs.get(d);if(c)return c;i==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Us=a,Us}var $s,ro;function Ar(){if(ro)return $s;ro=1;let t=Or();class e extends t{constructor(n){super(n),this.type="comment";}}return $s=e,e.default=e,$s}var Bs,so;function it(){if(so)return Bs;so=1;let{isClean:t,my:e}=In(),r=Ir(),n=Ar(),s=Or(),i,l,u,o;function h(d){return d.map(c=>(c.nodes&&(c.nodes=h(c.nodes)),delete c.source,c))}function a(d){if(d[t]=false,d.proxyOf.nodes)for(let c of d.proxyOf.nodes)a(c);}class f extends s{append(...c){for(let m of c){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(c){if(super.cleanRaws(c),this.nodes)for(let m of this.nodes)m.cleanRaws(c);}each(c){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=c(this.proxyOf.nodes[p],p),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(c){return this.nodes.every(c)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let c=this.lastEach;return this.indexes[c]=0,c}getProxyProcessor(){return {get(c,m){return m==="proxyOf"?c:c[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>c[m](...p.map(g=>typeof g=="function"?(x,y)=>g(x.toProxy(),y):g)):m==="every"||m==="some"?p=>c[m]((g,...x)=>p(g.toProxy(),...x)):m==="root"?()=>c.root().toProxy():m==="nodes"?c.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?c[m].toProxy():c[m]:c[m]},set(c,m,p){return c[m]===p||(c[m]=p,(m==="name"||m==="params"||m==="selector")&&c.markDirty()),true}}}index(c){return typeof c=="number"?c:(c.proxyOf&&(c=c.proxyOf),this.proxyOf.nodes.indexOf(c))}insertAfter(c,m){let p=this.index(c),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(c);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let x;for(let y in this.indexes)x=this.indexes[y],p<x&&(this.indexes[y]=x+g.length);return this.markDirty(),this}insertBefore(c,m){let p=this.index(c),g=p===0?"prepend":false,x=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(c);for(let b of x)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+x.length);return this.markDirty(),this}normalize(c,m){if(typeof c=="string")c=h(i(c).nodes);else if(typeof c>"u")c=[];else if(Array.isArray(c)){c=c.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore");}else if(c.type==="root"&&this.type!=="document"){c=c.nodes.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore");}else if(c.type)c=[c];else if(c.prop){if(typeof c.value>"u")throw new Error("Value field is missed in node creation");typeof c.value!="string"&&(c.value=String(c.value)),c=[new r(c)];}else if(c.selector)c=[new l(c)];else if(c.name)c=[new u(c)];else if(c.text)c=[new n(c)];else throw new Error("Unknown node type in node creation");return c.map(g=>(g[e]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[t]&&a(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...c){c=c.reverse();for(let m of c){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length;}return this.markDirty(),this}push(c){return c.parent=this,this.proxyOf.nodes.push(c),this}removeAll(){for(let c of this.proxyOf.nodes)c.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(c){c=this.index(c),this.proxyOf.nodes[c].parent=void 0,this.proxyOf.nodes.splice(c,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=c&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(c,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(c,p));}),this.markDirty(),this}some(c){return this.nodes.some(c)}walk(c){return this.each((m,p)=>{let g;try{g=c(m,p);}catch(x){throw m.addToError(x)}return g!==false&&m.walk&&(g=m.walk(c)),g})}walkAtRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&c.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(c){return this.walk((m,p)=>{if(m.type==="comment")return c(m,p)})}walkDecls(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&c.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&c.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=d=>{i=d;},f.registerRule=d=>{l=d;},f.registerAtRule=d=>{u=d;},f.registerRoot=d=>{o=d;},Bs=f,f.default=f,f.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,u.prototype):d.type==="rule"?Object.setPrototypeOf(d,l.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,o.prototype),d[e]=true,d.nodes&&d.nodes.forEach(c=>{f.rebuild(c);});},Bs}var zs,no;function Nn(){if(no)return zs;no=1;let t=it(),e,r;class n extends t{constructor(i){super({type:"document",...i}),this.nodes||(this.nodes=[]);}toResult(i={}){return new e(new r,this,i).stringify()}}return n.registerLazyResult=s=>{e=s;},n.registerProcessor=s=>{r=s;},zs=n,n.default=n,zs}var Ws,oo;function ra(){if(oo)return Ws;oo=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let s=n.node.rangeBy(n);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column;}for(let s in n)this[s]=n[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}}return Ws=t,t.default=t,Ws}var Vs,ao;function An(){if(ao)return Vs;ao=1;let t=ra();class e{constructor(n,s,i){this.processor=n,this.messages=[],this.root=s,this.opts=i,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(n,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let i=new t(n,s);return this.messages.push(i),i}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Vs=e,e.default=e,Vs}var Hs,lo;function Ac(){if(lo)return Hs;lo=1;let t=39,e=34,r=92,n=47,s=10,i=32,l=12,u=9,o=13,h=91,a=93,f=40,d=41,c=123,m=125,p=59,g=42,x=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Hs=function(_,T={}){let R=_.css.valueOf(),z=T.ignoreErrors,D,E,me,L,P,F,q,te,ne,J,Ye=R.length,M=0,Le=[],Ce=[];function Ut(){return M}function ge(B){throw _.error("Unclosed "+B,M)}function Oe(){return Ce.length===0&&M>=Ye}function tt(B){if(Ce.length)return Ce.pop();if(M>=Ye)return;let ce=B?B.ignoreUnclosed:false;switch(D=R.charCodeAt(M),D){case s:case i:case u:case o:case l:{E=M;do E+=1,D=R.charCodeAt(E);while(D===i||D===s||D===u||D===o||D===l);J=["space",R.slice(M,E)],M=E-1;break}case h:case a:case c:case m:case x:case p:case d:{let K=String.fromCharCode(D);J=[K,K,M];break}case f:{if(te=Le.length?Le.pop()[1]:"",ne=R.charCodeAt(M+1),te==="url"&&ne!==t&&ne!==e&&ne!==i&&ne!==s&&ne!==u&&ne!==l&&ne!==o){E=M;do{if(F=false,E=R.indexOf(")",E+1),E===-1)if(z||ce){E=M;break}else ge("bracket");for(q=E;R.charCodeAt(q-1)===r;)q-=1,F=!F;}while(F);J=["brackets",R.slice(M,E+1),M,E],M=E;}else E=R.indexOf(")",M+1),L=R.slice(M,E+1),E===-1||w.test(L)?J=["(","(",M]:(J=["brackets",L,M,E],M=E);break}case t:case e:{me=D===t?"'":'"',E=M;do{if(F=false,E=R.indexOf(me,E+1),E===-1)if(z||ce){E=M+1;break}else ge("string");for(q=E;R.charCodeAt(q-1)===r;)q-=1,F=!F;}while(F);J=["string",R.slice(M,E+1),M,E],M=E;break}case y:{b.lastIndex=M+1,b.test(R),b.lastIndex===0?E=R.length-1:E=b.lastIndex-2,J=["at-word",R.slice(M,E+1),M,E],M=E;break}case r:{for(E=M,P=true;R.charCodeAt(E+1)===r;)E+=1,P=!P;if(D=R.charCodeAt(E+1),P&&D!==n&&D!==i&&D!==s&&D!==u&&D!==o&&D!==l&&(E+=1,v.test(R.charAt(E)))){for(;v.test(R.charAt(E+1));)E+=1;R.charCodeAt(E+1)===i&&(E+=1);}J=["word",R.slice(M,E+1),M,E],M=E;break}default:{D===n&&R.charCodeAt(M+1)===g?(E=R.indexOf("*/",M+2)+1,E===0&&(z||ce?E=R.length:ge("comment")),J=["comment",R.slice(M,E+1),M,E],M=E):(S.lastIndex=M+1,S.test(R),S.lastIndex===0?E=R.length-1:E=S.lastIndex-2,J=["word",R.slice(M,E+1),M,E],Le.push(J),M=E);break}}return M++,J}function Ze(B){Ce.push(B);}return {back:Ze,endOfFile:Oe,nextToken:tt,position:Ut}},Hs}var qs,co;function Dn(){if(co)return qs;co=1;let t=it();class e extends t{constructor(n){super(n),this.type="atrule";}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return qs=e,e.default=e,t.registerAtRule(e),qs}var Gs,uo;function Gt(){if(uo)return Gs;uo=1;let t=it(),e,r;class n extends t{constructor(i){super(i),this.type="root",this.nodes||(this.nodes=[]);}normalize(i,l,u){let o=super.normalize(i);if(l){if(u==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of o)h.raws.before=l.raws.before;}return o}removeChild(i,l){let u=this.index(i);return !l&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(i)}toResult(i={}){return new e(new r,this,i).stringify()}}return n.registerLazyResult=s=>{e=s;},n.registerProcessor=s=>{r=s;},Gs=n,n.default=n,t.registerRoot(n),Gs}var Ys,ho;function sa(){if(ho)return Ys;ho=1;let t={comma(e){return t.split(e,[","],true)},space(e){let r=[" ",`
49
+ `," "];return t.split(e,r)},split(e,r,n){let s=[],i="",l=false,u=0,o=false,h="",a=false;for(let f of e)a?a=false:f==="\\"?a=true:o?f===h&&(o=false):f==='"'||f==="'"?(o=true,h=f):f==="("?u+=1:f===")"?u>0&&(u-=1):u===0&&r.includes(f)&&(l=true),l?(i!==""&&s.push(i.trim()),i="",l=false):i+=f;return (n||i!=="")&&s.push(i.trim()),s}};return Ys=t,t.default=t,Ys}var Zs,fo;function Pn(){if(fo)return Zs;fo=1;let t=it(),e=sa();class r extends t{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return e.comma(this.selector)}set selectors(s){let i=this.selector?this.selector.match(/,\s*/):null,l=i?i[0]:","+this.raw("between","beforeOpen");this.selector=s.join(l);}}return Zs=r,r.default=r,t.registerRule(r),Zs}var Xs,po;function Dc(){if(po)return Xs;po=1;let t=Ir(),e=Ac(),r=Ar(),n=Dn(),s=Gt(),i=Pn(),l={empty:true,space:true};function u(h){for(let a=h.length-1;a>=0;a--){let f=h[a],d=f[3]||f[2];if(d)return d}}class o{constructor(a){this.input=a,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}};}atrule(a){let f=new n;f.name=a[1].slice(1),f.name===""&&this.unnamedAtrule(f,a),this.init(f,a[2]);let d,c,m,p=false,g=false,x=[],y=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){f.source.end=this.getPosition(a[2]),f.source.end.offset++,this.semicolon=true;break}else if(d==="{"){g=true;break}else if(d==="}"){if(x.length>0){for(m=x.length-1,c=x[m];c&&c[0]==="space";)c=x[--m];c&&(f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++);}this.end(a);break}else x.push(a);else x.push(a);if(this.tokenizer.endOfFile()){p=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(f.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(f,"params",x),p&&(a=x[x.length-1],f.source.end=this.getPosition(a[3]||a[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(a){let f=this.colon(a);if(f===false)return;let d=0,c;for(let m=f-1;m>=0&&(c=a[m],!(c[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(a){let f=0,d,c,m;for(let[p,g]of a.entries()){if(d=g,c=d[0],c==="("&&(f+=1),c===")"&&(f-=1),f===0&&c===":")if(!m)this.doubleColon(d);else {if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d;}return false}comment(a){let f=new r;this.init(f,a[2]),f.source.end=this.getPosition(a[3]||a[2]),f.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))f.text="",f.raws.left=d,f.raws.right="";else {let c=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=c[2],f.raws.left=c[1],f.raws.right=c[3];}}createTokenizer(){this.tokenizer=e(this.input);}decl(a,f){let d=new t;this.init(d,a[0][2]);let c=a[a.length-1];for(c[0]===";"&&(this.semicolon=true,a.pop()),d.source.end=this.getPosition(c[3]||c[2]||u(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let y=a[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=a.shift()[1];}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let y=a.length-1;y>=0;y--){if(m=a[y],m[1].toLowerCase()==="!important"){d.important=true;let b=this.stringFrom(a,y);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),S="";for(let w=y;w>0;w--){let v=b[w][0];if(S.trim().indexOf("!")===0&&v!=="space")break;S=b.pop()[1]+S;}S.trim().indexOf("!")===0&&(d.important=true,d.raws.important=S,a=b);}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(a);}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let f=new i;this.init(f,a[2]),f.selector="",f.raws.between="",this.current=f;}end(a){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a);}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(a){if(this.spaces+=a[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(a){let f=this.input.fromOffset(a);return {column:f.col,line:f.line,offset:a}}init(a,f){this.current.push(a),a.source={input:this.input,start:this.getPosition(f)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=false);}other(a){let f=false,d=null,c=false,m=null,p=[],g=a[1].startsWith("--"),x=[],y=a;for(;y;){if(d=y[0],x.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&c&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(c){this.decl(x,g);return}else break;else if(d==="{"){this.rule(x);return}else if(d==="}"){this.tokenizer.back(x.pop()),f=true;break}else d===":"&&(c=true);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),p.length>0&&this.unclosedBracket(m),f&&c){if(!g)for(;x.length&&(y=x[x.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,g);}else this.unknownWord(x);}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case "space":this.spaces+=a[1];break;case ";":this.freeSemicolon(a);break;case "}":this.end(a);break;case "comment":this.comment(a);break;case "at-word":this.atrule(a);break;case "{":this.emptyRule(a);break;default:this.other(a);break}this.endFile();}precheckMissedSemicolon(){}raw(a,f,d,c){let m,p,g=d.length,x="",y=true,b,S;for(let w=0;w<g;w+=1)m=d[w],p=m[0],p==="space"&&w===g-1&&!c?y=false:p==="comment"?(S=d[w-1]?d[w-1][0]:"empty",b=d[w+1]?d[w+1][0]:"empty",!l[S]&&!l[b]?x.slice(-1)===","?y=false:x+=m[1]:y=false):x+=m[1];if(!y){let w=d.reduce((v,C)=>v+C[1],"");a.raws[f]={raw:w,value:x};}a[f]=x;}rule(a){a.pop();let f=new i;this.init(f,a[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(f,"selector",a),this.current=f;}spacesAndCommentsFromEnd(a){let f,d="";for(;a.length&&(f=a[a.length-1][0],!(f!=="space"&&f!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let f,d="";for(;a.length&&(f=a[0][0],!(f!=="space"&&f!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let f,d="";for(;a.length&&(f=a[a.length-1][0],f==="space");)d=a.pop()[1]+d;return d}stringFrom(a,f){let d="";for(let c=f;c<a.length;c++)d+=a[c][1];return a.splice(f,a.length-f),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Xs=o,Xs}var Js,mo;function Ln(){if(mo)return Js;mo=1;let t=it(),e=Dc(),r=Nr();function n(s,i){let l=new r(s,i),u=new e(l);try{u.parse();}catch(o){throw o}return u.root}return Js=n,n.default=n,t.registerParse(n),Js}var Ks,go;function na(){if(go)return Ks;go=1;let {isClean:t,my:e}=In(),r=ea(),n=Tr(),s=it(),i=Nn(),u=An(),o=Ln(),h=Gt(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},d={Once:true,postcssPlugin:true,prepare:true},c=0;function m(S){return typeof S=="object"&&typeof S.then=="function"}function p(S){let w=false,v=a[S.type];return S.type==="decl"?w=S.prop.toLowerCase():S.type==="atrule"&&(w=S.name.toLowerCase()),w&&S.append?[v,v+"-"+w,c,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:S.append?[v,c,v+"Exit"]:[v,v+"Exit"]}function g(S){let w;return S.type==="document"?w=["Document",c,"DocumentExit"]:S.type==="root"?w=["Root",c,"RootExit"]:w=p(S),{eventIndex:0,events:w,iterator:0,node:S,visitorIndex:0,visitors:[]}}function x(S){return S[t]=false,S.nodes&&S.nodes.forEach(w=>x(w)),S}let y={};class b{constructor(w,v,C){this.stringified=false,this.processed=false;let _;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))_=x(v);else if(v instanceof b||v instanceof u)_=x(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=v.map);else {let T=o;C.syntax&&(T=C.syntax.parse),C.parser&&(T=C.parser),T.parse&&(T=T.parse);try{_=T(v,C);}catch(R){this.processed=true,this.error=R;}_&&!_[e]&&s.rebuild(_);}this.result=new u(w,_,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(T=>typeof T=="object"&&T.prepare?{...T,...T.prepare(this.result)}:T);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion;}catch(_){console&&console.error&&console.error(_);}return w}prepareVisitors(){this.listeners={};let w=(v,C,_)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,_]);};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof v[C]=="object")for(let _ in v[C])_==="*"?w(v,C,v[C][_]):w(v,C+"-"+_.toLowerCase(),v[C][_]);else typeof v[C]=="function"&&w(v,C,v[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(m(C))try{await C;}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[t];){w[t]=true;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(m(C))try{await C;}catch(_){let T=v[v.length-1].node;throw this.handleError(_,T)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let _=w.nodes.map(T=>C(T,this.helpers));await Promise.all(_);}else await C(w,this.helpers);}catch(_){throw this.handleError(_)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,v=n;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let _=new r(v,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let v=this.runOnRoot(w);if(m(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[t];)w[t]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,_]of w){this.result.lastPlugin=C;let T;try{T=_(v,this.helpers);}catch(R){throw this.handleError(R,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return true;if(m(T))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:_}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(_.length>0&&v.visitorIndex<_.length){let[R,z]=_[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===_.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=R;try{return z(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(v.iterator!==0){let R=v.iterator,z;for(;z=C.nodes[C.indexes[R]];)if(C.indexes[R]+=1,!z[t]){z[t]=true,w.push(g(z));return}v.iterator=0,delete C.indexes[R];}let T=v.events;for(;v.eventIndex<T.length;){let R=T[v.eventIndex];if(v.eventIndex+=1,R===c){C.nodes&&C.nodes.length&&(C[t]=true,v.iterator=C.getIterator());return}else if(this.listeners[R]){v.visitors=this.listeners[R];return}}w.pop();}walkSync(w){w[t]=true;let v=p(w);for(let C of v)if(C===c)w.nodes&&w.each(_=>{_[t]||this.walkSync(_);});else {let _=this.listeners[C];if(_&&this.visitSync(_,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return b.registerPostcss=S=>{y=S;},Ks=b,b.default=b,h.registerLazyResult(b),i.registerLazyResult(b),Ks}var Qs,yo;function Pc(){if(yo)return Qs;yo=1;let t=ea(),e=Tr(),n=Ln(),s=An();class i{constructor(u,o,h){o=o.toString(),this.stringified=false,this._processor=u,this._css=o,this._opts=h,this._map=void 0;let a,f=e;this.result=new s(this._processor,a,this._opts),this.result.css=o;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let c=new t(f,a,this._opts,o);if(c.isMap()){let[m,p]=c.generate();m&&(this.result.css=m),p&&(this.result.map=p);}else c.clearAnnotation(),this.result.css=c.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,o){return this.async().then(u,o)}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 u,o=n;try{u=o(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return "NoWorkResult"}}return Qs=i,i.default=i,Qs}var en,vo;function Lc(){if(vo)return en;vo=1;let t=Pc(),e=na(),r=Nn(),n=Gt();class s{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let u=[];for(let o of l)if(o.postcss===true?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))u=u.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)u.push(o);else if(typeof o=="function")u.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return u}process(l,u={}){return !this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new t(this,l,u):new e(this,l,u)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return en=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),en}var tn,bo;function Fc(){if(bo)return tn;bo=1;let t=Ir(),e=Qo(),r=Ar(),n=Dn(),s=Nr(),i=Gt(),l=Pn();function u(o,h){if(Array.isArray(o))return o.map(d=>u(d));let{inputs:a,...f}=o;if(a){h=[];for(let d of a){let c={...d,__proto__:s.prototype};c.map&&(c.map={...c.map,__proto__:e.prototype}),h.push(c);}}if(f.nodes&&(f.nodes=o.nodes.map(d=>u(d,h))),f.source){let{inputId:d,...c}=f.source;f.source=c,d!=null&&(f.source.input=h[d]);}if(f.type==="root")return new i(f);if(f.type==="decl")return new t(f);if(f.type==="rule")return new l(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new n(f);throw new Error("Unknown node type: "+o.type)}return tn=u,u.default=u,tn}var rn,wo;function Uc(){if(wo)return rn;wo=1;let t=On(),e=Ir(),r=na(),n=it(),s=Lc(),i=Tr(),l=Fc(),u=Nn(),o=ra(),h=Ar(),a=Dn(),f=An(),d=Nr(),c=Ln(),m=sa(),p=Pn(),g=Gt(),x=Or();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new s(b)}return y.plugin=function(S,w){let v=false;function C(...T){console&&console.warn&&!v&&(v=true,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
50
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(S+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
51
+ https://www.w3ctech.com/topic/2226`));let R=w(...T);return R.postcssPlugin=S,R.postcssVersion=new s().version,R}let _;return Object.defineProperty(C,"postcss",{get(){return _||(_=C()),_}}),C.process=function(T,R,z){return y([C(z)]).process(T,R)},C},y.stringify=i,y.parse=c,y.fromJSON=l,y.list=m,y.comment=b=>new h(b),y.atRule=b=>new a(b),y.decl=b=>new e(b),y.rule=b=>new p(b),y.root=b=>new g(b),y.document=b=>new u(b),y.CssSyntaxError=t,y.Declaration=e,y.Container=n,y.Processor=s,y.Document=u,y.Comment=h,y.Warning=o,y.AtRule=a,y.Result=f,y.Input=d,y.Rule=p,y.Root=g,y.Node=x,r.registerPostcss(y),rn=y,y.default=y,rn}var $c=Uc(),se=kc($c);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 cn=class t{constructor(...e){Ee(this,"parentElement",null),Ee(this,"parentNode",null),Ee(this,"ownerDocument"),Ee(this,"firstChild",null),Ee(this,"lastChild",null),Ee(this,"previousSibling",null),Ee(this,"nextSibling",null),Ee(this,"ELEMENT_NODE",1),Ee(this,"TEXT_NODE",3),Ee(this,"nodeType"),Ee(this,"nodeName"),Ee(this,"RRNodeType");}get childNodes(){let e=[],r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var xo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},So={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dr={},ia={},Bc=()=>!!globalThis.Zone;function Fn(t){if(dr[t])return dr[t];let e=globalThis[t],r=e.prototype,n=t in xo?xo[t]:void 0,s=!!(n&&n.every(u=>{var o,h;return !!((h=(o=Object.getOwnPropertyDescriptor(r,u))==null?void 0:o.get)!=null&&h.toString().includes("[native code]"))})),i=t in So?So[t]:void 0,l=!!(i&&i.every(u=>{var o;return typeof r[u]=="function"&&((o=r[u])==null?void 0:o.toString().includes("[native code]"))}));if(s&&l&&!Bc())return dr[t]=e.prototype,e.prototype;try{let u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);let o=u.contentWindow;if(!o)return e.prototype;let h=o[t].prototype;if(!h)return u.remove(),r;let a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),ia[t]=()=>u.remove()):u.remove(),dr[t]=h}catch{return r}}var sn={};function We(t,e,r){var n;let s=`${t}.${String(r)}`;if(sn[s])return sn[s].call(e);let i=Fn(t),l=(n=Object.getOwnPropertyDescriptor(i,r))==null?void 0:n.get;return l?(sn[s]=l,l.call(e)):e[r]}var nn={};function oa(t,e,r){let n=`${t}.${String(r)}`;if(nn[n])return nn[n].bind(e);let i=Fn(t)[r];return typeof i!="function"?e[r]:(nn[n]=i,i.bind(e))}function zc(t){return We("Node",t,"ownerDocument")}function jc(t){return We("Node",t,"childNodes")}function Wc(t){return We("Node",t,"parentNode")}function Vc(t){return We("Node",t,"parentElement")}function Hc(t){return We("Node",t,"textContent")}function qc(t,e){return oa("Node",t,"contains")(e)}function Gc(t){return oa("Node",t,"getRootNode")()}function Yc(t){return !t||!("host"in t)?null:We("ShadowRoot",t,"host")}function Zc(t){return t.styleSheets}function Xc(t){return !t||!("shadowRoot"in t)?null:We("Element",t,"shadowRoot")}function Jc(t,e){return We("Element",t,"querySelector")(e)}function Kc(t,e){return We("Element",t,"querySelectorAll")(e)}function aa(){return [Fn("MutationObserver").constructor,ia.MutationObserver??(()=>{})]}var Vt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Vt=()=>new Date().getTime());function ot(t,e,r){try{if(!(e in t))return ()=>{};let n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,()=>{t[e]=n;}}catch{return ()=>{}}}var H={ownerDocument:zc,childNodes:jc,parentNode:Wc,parentElement:Vc,textContent:Hc,contains:qc,getRootNode:Gc,host:Yc,styleSheets:Zc,shadowRoot:Xc,querySelector:Jc,querySelectorAll:Kc,nowTimestamp:Vt,mutationObserverCtor:aa,patch:ot};function ye(t,e,r=document){let n={capture:true,passive:true};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}var Et=`Please stop import mirror directly. Instead of that,\r
52
52
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
53
- or you can use record.mirror to access the mirror instance during recording.`,uo={map:{},getId(){return console.error(_t),-1},getNode(){return console.error(_t),null},removeNodeFromMap(){console.error(_t);},has(){return console.error(_t),false},reset(){console.error(_t);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(uo=new Proxy(uo,{get(t,e,r){return e==="map"&&console.error(_t),Reflect.get(t,e,r)}}));function Ht(t,e,r={}){let s=null,n=0;return function(...i){let l=Date.now();!n&&r.leading===false&&(n=l);let c=e-(l-n),a=this;c<=0||c>e?(s&&(clearTimeout(s),s=null),n=l,t.apply(a,i)):!s&&r.trailing!==false&&(s=setTimeout(()=>{n=r.leading===false?0:Date.now(),s=null,t.apply(a,i);},c));}}function Nr(t,e,r,s,n=window){let i=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,s?r:{set(l){setTimeout(()=>{r.set.call(this,l);},0),i&&i.set&&i.set.call(this,l);}}),()=>Nr(t,e,i||{},true)}function Xo(t){var e,r,s,n;let i=t.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:i.documentElement.scrollLeft||i?.body&&((e=H.parentElement(i.body))==null?void 0:e.scrollLeft)||((r=i?.body)==null?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:i?.documentElement.scrollTop||i?.body&&((s=H.parentElement(i.body))==null?void 0:s.scrollTop)||((n=i?.body)==null?void 0:n.scrollTop)||0}}function Jo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ko(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Qo(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function ye(t,e,r,s){if(!t)return false;let n=Qo(t);if(!n)return false;try{if(typeof e=="string"){if(n.classList.contains(e)||s&&n.closest("."+e)!==null)return !0}else if(vr(n,e,s))return !0}catch{}return !!(r&&(n.matches(r)||s&&n.closest(r)!==null))}function Dc(t,e){return e.getId(t)!==-1}function Js(t,e,r){return t.tagName==="TITLE"&&r.headTitleMutations?true:e.getId(t)===Vt}function ea(t,e){if(jt(t))return false;let r=e.getId(t);if(!e.has(r))return true;let s=H.parentNode(t);return s&&s.nodeType===t.DOCUMENT_NODE?false:s?ea(s,e):true}function tn(t){return !!t.changedTouches}function Pc(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function ta(t,e){return !!(t.nodeName==="IFRAME"&&e.getMeta(t))}function ra(t,e){return !!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function rn(t){return t?t instanceof en&&"shadowRoot"in t?!!t.shadowRoot:!!H.shadowRoot(t):false}var sn=class{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map);}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let s;return r===void 0?s=this.id++:s=r,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 sa(t){var e;let r=null;return "getRootNode"in t&&((e=H.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))&&(r=H.host(H.getRootNode(t))),r}function Lc(t){let e=t,r;for(;r=sa(e);)e=r;return e}function Fc(t){let e=H.ownerDocument(t);if(!e)return false;let r=Lc(t);return H.contains(e,r)}function na(t){let e=H.ownerDocument(t);return e?H.contains(e,t)||Fc(t):false}var X=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t))(X||{}),Z=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Z||{}),ve=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(ve||{}),je=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(je||{}),Ot=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Ot||{}),Rt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Rt||{});var ia=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ia||{});function ho(t){return "__ln"in t}var nn=class{constructor(){O(this,"length",0),O(this,"head",null),O(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<e;s++)r=r?.next||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&ho(e.previousSibling)){let s=e.previousSibling.__ln.next;r.next=s,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,s&&(s.previous=r);}else if(e.nextSibling&&ho(e.nextSibling)&&e.nextSibling.__ln.previous){let s=e.nextSibling.__ln.previous;r.previous=s,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,s&&(s.next=r);}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++;}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},fo=(t,e)=>`${t}@${e}`,on=class{constructor(){O(this,"frozen",false),O(this,"locked",false),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),O(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],r=new Set,s=new nn,n=a=>{let h=a,o=Vt;for(;o===Vt;)h=h&&h.nextSibling,o=h&&this.mirror.getId(h);return o},i=a=>{let h=H.parentNode(a);if(!h||!na(a))return;let o=false;if(a.nodeType===Node.TEXT_NODE){let m=h.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(h)&&(o=true);}let p=jt(h)?this.mirror.getId(sa(a)):this.mirror.getId(h),d=n(a);if(p===-1||d===-1)return s.addNode(a);let u=Mt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{ta(m,this.mirror)&&this.iframeManager.addIframe(m),ra(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),rn(a)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(a),this.doc);},onIframeLoad:(m,f)=>{this.iframeManager.attachIframe(m,f),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,f)=>{this.stylesheetManager.attachLinkElement(m,f);},cssCaptured:o});u&&(e.push({parentId:p,nextId:d,node:u}),r.add(u.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)po(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(H.parentNode(a))||i(a);for(let a of this.addedSet)!mo(this.droppedSet,a)&&!po(this.removesSubTreeCache,a,this.mirror)||mo(this.movedSet,a)?i(a):this.droppedSet.add(a);let l=null;for(;s.length;){let a=null;if(l){let h=this.mirror.getId(H.parentNode(l.value)),o=n(l.value);h!==-1&&o!==-1&&(a=l);}if(!a){let h=s.tail;for(;h;){let o=h;if(h=h.previous,o){let p=this.mirror.getId(H.parentNode(o.value));if(n(o.value)===-1)continue;if(p!==-1){a=o;break}else {let u=o.value,m=H.parentNode(u);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=H.host(m);if(this.mirror.getId(f)!==-1){a=o;break}}}}}}if(!a){for(;s.head;)s.removeNode(s.head.value);break}l=a.previous,s.removeNode(a.value),i(a.value);}let c={texts:this.texts.map(a=>{let h=a.node,o=H.parentNode(h);return o&&o.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(o),{id:this.mirror.getId(h),value:a.value}}).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:h}=a;if(typeof h.style=="string"){let o=JSON.stringify(a.styleDiff),p=JSON.stringify(a._unchangedStyles);o.length<h.style.length&&(o+p).split("var(").length===h.style.split("var(").length&&(h.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:h}}).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c));}),O(this,"genTextAreaValueMutation",e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r));let s=Array.from(H.childNodes(e),n=>H.textContent(n)||"").join("");r.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:s,maskInputFn:this.maskInputFn});}),O(this,"processMutation",e=>{if(!Js(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let r=H.textContent(e.target);!ye(e.target,this.blockClass,this.blockSelector,false)&&r!==e.oldValue&&this.texts.push({value:Io(e.target,this.maskTextClass,this.maskTextSelector,true)&&r?this.maskTextFn?this.maskTextFn(r,Qo(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case "attributes":{let r=e.target,s=e.attributeName,n=e.target.getAttribute(s);if(s==="value"){let l=gr(r);n=mr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:n,maskInputFn:this.maskInputFn});}if(ye(e.target,this.blockClass,this.blockSelector,false)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)s="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),s==="type"&&r.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Oo(r.tagName,s))if(i.attributes[s]=To(this.doc,nt(r.tagName),nt(s),n),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(let c of Array.from(r.style)){let a=r.style.getPropertyValue(c),h=r.style.getPropertyPriority(c);a!==l.style.getPropertyValue(c)||h!==l.style.getPropertyPriority(c)?h===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,h]:i._unchangedStyles[c]=[a,h];}for(let c of Array.from(l.style))r.style.getPropertyValue(c)===""&&(i.styleDiff[c]=false);}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(ye(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let s=this.mirror.getId(r),n=jt(e.target)?this.mirror.getId(H.host(e.target)):this.mirror.getId(e.target);ye(e.target,this.blockClass,this.blockSelector,false)||Js(r,this.mirror,this.slimDOMOptions)||!Dc(r,this.mirror)||(this.addedSet.has(r)?(an(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&s===-1||ea(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[fo(s,n)]?an(this.movedSet,r):(this.removes.push({parentId:n,id:s,isShadow:jt(e.target)&&zt(e.target)?true:void 0}),$c(r,this.removesSubTreeCache))),this.mapRemoves.push(r));});break}}}),O(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Js(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[fo(this.mirror.getId(e),s)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);ye(e,this.blockClass,this.blockSelector,false)||(H.childNodes(e).forEach(s=>this.genAdds(s)),rn(e)&&H.childNodes(H.shadowRoot(e)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,e);}));}});}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=e[r];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function an(t,e){t.delete(e),H.childNodes(e).forEach(r=>an(t,r));}function $c(t,e){let r=[t];for(;r.length;){let s=r.pop();e.has(s)||(e.add(s),H.childNodes(s).forEach(n=>r.push(n)));}}function po(t,e,r){return t.size===0?false:Uc(t,e)}function Uc(t,e,r){let s=H.parentNode(e);return s?t.has(s):false}function mo(t,e){return t.size===0?false:oa(t,e)}function oa(t,e){let r=H.parentNode(e);return r?t.has(r)?true:oa(t,r):false}var Wt;function Bc(t){Wt=t;}function jc(){Wt=void 0;}var Y=t=>Wt?(...r)=>{try{return t(...r)}catch(s){if(Wt&&Wt(s)===true)return;throw s}}:t,st=[];function Yt(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function aa(t,e){let r=new on;st.push(r),r.init(t);let[s,n]=Yo(),i=new s(Y(r.processMutations.bind(r)));return i.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),[i,n]}function zc({mousemoveCb:t,sampling:e,doc:r,mirror:s}){if(e.mousemove===false)return ()=>{};let n=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,l=[],c,a=Ht(Y(p=>{let d=Date.now()-c;t(l.map(u=>(u.timeOffset-=d,u)),p),l=[],c=null;}),i),h=Y(Ht(Y(p=>{let d=Yt(p),{clientX:u,clientY:m}=tn(p)?p.changedTouches[0]:p;c||(c=qt()),l.push({x:u,y:m,id:s.getId(d),timeOffset:qt()-c}),a(typeof DragEvent<"u"&&p instanceof DragEvent?Z.Drag:p instanceof MouseEvent?Z.MouseMove:Z.TouchMove);}),n,{trailing:!1})),o=[ge("mousemove",h,r),ge("touchmove",h,r),ge("drag",h,r)];return Y(()=>{o.forEach(p=>p());})}function Wc({mouseInteractionCb:t,doc:e,mirror:r,blockClass:s,blockSelector:n,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let l=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[],a=null,h=o=>p=>{let d=Yt(p);if(ye(d,s,n,true))return;let u=null,m=o;if("pointerType"in p){switch(p.pointerType){case "mouse":u=je.Mouse;break;case "touch":u=je.Touch;break;case "pen":u=je.Pen;break}u===je.Touch?ve[o]===ve.MouseDown?m="TouchStart":ve[o]===ve.MouseUp&&(m="TouchEnd"):je.Pen;}else tn(p)&&(u=je.Touch);u!==null?(a=u,(m.startsWith("Touch")&&u===je.Touch||m.startsWith("Mouse")&&u===je.Mouse)&&(u=null)):ve[o]===ve.Click&&(u=a,a=null);let f=tn(p)?p.changedTouches[0]:p;if(!f)return;let g=r.getId(d),{clientX:x,clientY:v}=f;Y(t)({type:ve[m],id:g,x,y:v,...u!==null&&{pointerType:u}});};return Object.keys(ve).filter(o=>Number.isNaN(Number(o))&&!o.endsWith("_Departed")&&l[o]!==false).forEach(o=>{let p=nt(o),d=h(o);if(window.PointerEvent)switch(ve[o]){case ve.MouseDown:case ve.MouseUp:p=p.replace("mouse","pointer");break;case ve.TouchStart:case ve.TouchEnd:return}c.push(ge(p,d,e));}),Y(()=>{c.forEach(o=>o());})}function la({scrollCb:t,doc:e,mirror:r,blockClass:s,blockSelector:n,sampling:i}){let l=Y(Ht(Y(c=>{let a=Yt(c);if(!a||ye(a,s,n,!0))return;let h=r.getId(a);if(a===e&&e.defaultView){let o=Xo(e.defaultView);t({id:h,x:o.left,y:o.top});}else t({id:h,x:a.scrollLeft,y:a.scrollTop});}),i.scroll||100));return ge("scroll",l,e)}function Vc({viewportResizeCb:t},{win:e}){let r=-1,s=-1,n=Y(Ht(Y(()=>{let i=Jo(),l=Ko();(r!==i||s!==l)&&(t({width:Number(l),height:Number(i)}),r=i,s=l);}),200));return ge("resize",n,e)}var qc=["INPUT","TEXTAREA","SELECT"],go=new WeakMap;function Hc({inputCb:t,doc:e,mirror:r,blockClass:s,blockSelector:n,ignoreClass:i,ignoreSelector:l,maskInputOptions:c,maskInputFn:a,sampling:h,userTriggeredOnInput:o}){function p(v){let w=Yt(v),C=v.isTrusted,b=w&&w.tagName;if(w&&b==="OPTION"&&(w=H.parentElement(w)),!w||!b||qc.indexOf(b)<0||ye(w,s,n,true)||w.classList.contains(i)||l&&w.matches(l))return;let y=w.value,S=false,_=gr(w)||"";_==="radio"||_==="checkbox"?S=w.checked:(c[b.toLowerCase()]||c[_])&&(y=mr({element:w,maskInputOptions:c,tagName:b,type:_,value:y,maskInputFn:a})),d(w,o?{text:y,isChecked:S,userTriggered:C}:{text:y,isChecked:S});let T=w.name;_==="radio"&&T&&S&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(R=>{if(R!==w){let j=R.value;d(R,o?{text:j,isChecked:!S,userTriggered:false}:{text:j,isChecked:!S});}});}function d(v,w){let C=go.get(v);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){go.set(v,w);let b=r.getId(v);Y(t)({...w,id:b});}}let m=(h.input==="last"?["change"]:["input","change"]).map(v=>ge(v,Y(p),e)),f=e.defaultView;if(!f)return ()=>{m.forEach(v=>v());};let g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),x=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...x.map(v=>Nr(v[0],v[1],{set(){Y(p)({target:this,isTrusted:false});}},false,f))),Y(()=>{m.forEach(v=>v());})}function br(t){let e=[];function r(s,n){if(ur("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||ur("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||ur("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||ur("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){let l=Array.from(s.parentRule.cssRules).indexOf(s);return n.unshift(l),r(s.parentRule,n)}else if(s.parentStyleSheet){let l=Array.from(s.parentStyleSheet.cssRules).indexOf(s);n.unshift(l);}return n}return r(t,e)}function Xe(t,e,r){let s,n;return t?(t.ownerNode?s=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:s}):{}}function Gc({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return ()=>{};let n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Y((o,p,d)=>{let[u,m]=d,{id:f,styleId:g}=Xe(p,e,r.styleMirror);return (f&&f!==-1||g&&g!==-1)&&t({id:f,styleId:g,adds:[{rule:u,index:m}]}),o.apply(p,d)})}),s.CSSStyleSheet.prototype.addRule=function(o,p,d=this.cssRules.length){let u=`${o} { ${p} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[u,d])};let i=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Y((o,p,d)=>{let[u]=d,{id:m,styleId:f}=Xe(p,e,r.styleMirror);return (m&&m!==-1||f&&f!==-1)&&t({id:m,styleId:f,removes:[{index:u}]}),o.apply(p,d)})}),s.CSSStyleSheet.prototype.removeRule=function(o){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[o])};let l;s.CSSStyleSheet.prototype.replace&&(l=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:Y((o,p,d)=>{let[u]=d,{id:m,styleId:f}=Xe(p,e,r.styleMirror);return (m&&m!==-1||f&&f!==-1)&&t({id:m,styleId:f,replace:u}),o.apply(p,d)})}));let c;s.CSSStyleSheet.prototype.replaceSync&&(c=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:Y((o,p,d)=>{let[u]=d,{id:m,styleId:f}=Xe(p,e,r.styleMirror);return (m&&m!==-1||f&&f!==-1)&&t({id:m,styleId:f,replaceSync:u}),o.apply(p,d)})}));let a={};dr("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(dr("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),dr("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),dr("CSSSupportsRule")&&(a.CSSSupportsRule=s.CSSSupportsRule));let h={};return Object.entries(a).forEach(([o,p])=>{h[o]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(h[o].insertRule,{apply:Y((d,u,m)=>{let[f,g]=m,{id:x,styleId:v}=Xe(u.parentStyleSheet,e,r.styleMirror);return (x&&x!==-1||v&&v!==-1)&&t({id:x,styleId:v,adds:[{rule:f,index:[...br(u),g||0]}]}),d.apply(u,m)})}),p.prototype.deleteRule=new Proxy(h[o].deleteRule,{apply:Y((d,u,m)=>{let[f]=m,{id:g,styleId:x}=Xe(u.parentStyleSheet,e,r.styleMirror);return (g&&g!==-1||x&&x!==-1)&&t({id:g,styleId:x,removes:[{index:[...br(u),f]}]}),d.apply(u,m)})});}),Y(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=i,l&&(s.CSSStyleSheet.prototype.replace=l),c&&(s.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([o,p])=>{p.prototype.insertRule=h[o].insertRule,p.prototype.deleteRule=h[o].deleteRule;});})}function ca({mirror:t,stylesheetManager:e},r){var s,n,i;let l=null;r.nodeName==="#document"?l=t.getId(r):l=t.getId(H.host(r));let c=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(i=(n=r.ownerDocument)==null?void 0:n.defaultView)==null?void 0:i.ShadowRoot,a=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!c||!a?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var h;return (h=a.get)==null?void 0:h.call(this)},set(h){var o;let p=(o=a.set)==null?void 0:o.call(this,h);if(l!==null&&l!==-1)try{e.adoptStyleSheets(h,l);}catch{}return p}}),Y(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function Zc({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){let i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Y((c,a,h)=>{var o;let[p,d,u]=h;if(r.has(p))return i.apply(a,[p,d,u]);let{id:m,styleId:f}=Xe((o=a.parentRule)==null?void 0:o.parentStyleSheet,e,s.styleMirror);return (m&&m!==-1||f&&f!==-1)&&t({id:m,styleId:f,set:{property:p,value:d,priority:u},index:br(a.parentRule)}),c.apply(a,h)})});let l=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Y((c,a,h)=>{var o;let[p]=h;if(r.has(p))return l.apply(a,[p]);let{id:d,styleId:u}=Xe((o=a.parentRule)==null?void 0:o.parentStyleSheet,e,s.styleMirror);return (d&&d!==-1||u&&u!==-1)&&t({id:d,styleId:u,remove:{property:p},index:br(a.parentRule)}),c.apply(a,h)})}),Y(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=l;})}function Yc({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:s,sampling:n,doc:i}){let l=Y(a=>Ht(Y(h=>{let o=Yt(h);if(!o||ye(o,e,r,!0))return;let{currentTime:p,volume:d,muted:u,playbackRate:m,loop:f}=o;t({type:a,id:s.getId(o),currentTime:p,volume:d,muted:u,playbackRate:m,loop:f});}),n.media||500)),c=[ge("play",l(Rt.Play),i),ge("pause",l(Rt.Pause),i),ge("seeked",l(Rt.Seeked),i),ge("volumechange",l(Rt.VolumeChange),i),ge("ratechange",l(Rt.RateChange),i)];return Y(()=>{c.forEach(a=>a());})}function Xc({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return ()=>{};let s=[],n=new WeakMap,i=r.FontFace;r.FontFace=function(a,h,o){let p=new i(a,h,o);return n.set(p,{family:a,buffer:typeof h!="string",descriptors:o,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),p};let l=at(e.fonts,"add",function(c){return function(a){return setTimeout(Y(()=>{let h=n.get(a);h&&(t(h),n.delete(a));}),0),c.apply(this,[a])}});return s.push(()=>{r.FontFace=i;}),s.push(l),Y(()=>{s.forEach(c=>c());})}function Jc(t){let{doc:e,mirror:r,blockClass:s,blockSelector:n,selectionCb:i}=t,l=true,c=Y(()=>{let a=e.getSelection();if(!a||l&&a?.isCollapsed)return;l=a.isCollapsed||!1;let h=[],o=a.rangeCount||0;for(let p=0;p<o;p++){let d=a.getRangeAt(p),{startContainer:u,startOffset:m,endContainer:f,endOffset:g}=d;ye(u,s,n,!0)||ye(f,s,n,!0)||h.push({start:r.getId(u),startOffset:m,end:r.getId(f),endOffset:g});}i({ranges:h});});return c(),ge("selectionchange",c)}function Kc({doc:t,customElementCb:e}){let r=t.defaultView;return !r||!r.customElements?()=>{}:at(r.customElements,"define",function(n){return function(i,l,c){try{e({define:{name:i}});}catch{console.warn(`Custom element callback failed for ${i}`);}return n.apply(this,[i,l,c])}})}function Qc(t,e){let{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:l,inputCb:c,mediaInteractionCb:a,styleSheetRuleCb:h,styleDeclarationCb:o,canvasMutationCb:p,fontCb:d,selectionCb:u,customElementCb:m}=t;t.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),r(...f);},t.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),s(...f);},t.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),n(...f);},t.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),i(...f);},t.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),l(...f);},t.inputCb=(...f)=>{e.input&&e.input(...f),c(...f);},t.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),a(...f);},t.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),h(...f);},t.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),o(...f);},t.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),p(...f);},t.fontCb=(...f)=>{e.font&&e.font(...f),d(...f);},t.selectionCb=(...f)=>{e.selection&&e.selection(...f),u(...f);},t.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),m(...f);};}function eu(t,e={}){let r=t.doc.defaultView;if(!r)return ()=>{};Qc(t,e);let s,n=()=>{};t.recordDOM&&([s,n]=aa(t,t.doc));let i=zc(t),l=Wc(t),c=la(t),a=Vc(t,{win:r}),h=Hc(t),o=Yc(t),p=()=>{},d=()=>{},u=()=>{},m=()=>{};t.recordDOM&&(p=Gc(t,{win:r}),d=ca(t,t.doc),u=Zc(t,{win:r}),t.collectFonts&&(m=Xc(t)));let f=Jc(t),g=Kc(t),x=[];for(let v of t.plugins)x.push(v.observer(v.callback,r,v.options));return Y(()=>{st.forEach(v=>v.reset()),s?.disconnect(),n(),i(),l(),c(),a(),h(),o(),p(),d(),u(),m(),f(),g(),x.forEach(v=>v());})}function ur(t){return typeof window[t]<"u"}function dr(t){return !!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var wr=class{constructor(e){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,r,s,n){let i=s||this.getIdToRemoteIdMap(e),l=n||this.getRemoteIdToIdMap(e),c=i.get(r);return c||(c=this.generateIdFn(),i.set(r,c),l.set(c,r)),c}getIds(e,r){let s=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getId(e,i,s,n))}getRemoteId(e,r,s){let n=s||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let i=n.get(r);return i||-1}getRemoteIds(e,r){let s=this.getRemoteIdToIdMap(e);return r.map(n=>this.getRemoteId(e,n,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 r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}},ln=class{constructor(e){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new wr(Mo)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new wr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(e){this.iframes.set(e,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,r){var s,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((s=e.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument));}handleMessage(e){let r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let i=this.transformCrossOriginEvent(n,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout);}transformCrossOriginEvent(e,r){var s;switch(r.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:X.IncrementalSnapshot,data:{source:Z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case X.Meta:case X.Load:case X.DomContentLoaded:return false;case X.Plugin:return r;case X.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case X.IncrementalSnapshot:switch(r.data.source){case Z.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(n.node,i);}),r.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"]);}),r.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"]);}),r.data.texts.forEach(n=>{this.replaceIds(n,e,["id"]);}),r;case Z.Drag:case Z.TouchMove:case Z.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,e,["id"]);}),r;case Z.ViewportResize:return false;case Z.MediaInteraction:case Z.MouseInteraction:case Z.Scroll:case Z.CanvasMutation:case Z.Input:return this.replaceIds(r.data,e,["id"]),r;case Z.StyleSheetRule:case Z.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case Z.Font:return r;case Z.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"]);}),r;case Z.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(s=r.data.styles)==null||s.forEach(n=>{this.replaceStyleIds(n,e,["styleId"]);}),r}}return false}replace(e,r,s,n){for(let i of n)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=e.getIds(s,r[i]):r[i]=e.getId(s,r[i]));return r}replaceIds(e,r,s){return this.replace(this.crossOriginIframeMirror,e,r,s)}replaceStyleIds(e,r,s){return this.replace(this.crossOriginIframeStyleMirror,e,r,s)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(s=>{this.replaceIdOnNode(s,r);});}patchRootIdOnNode(e,r){e.type!==ia.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r);});}},cn=class{constructor(e){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(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,r){if(!zt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let[s]=aa({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(la({...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(H.host(e))),this.restoreHandlers.push(ca({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,r){let s=this;this.restoreHandlers.push(at(e.prototype,"attachShadow",function(n){return function(i){let l=n.call(this,i),c=H.shadowRoot(this);return c&&na(this)&&s.addShadowRoot(c,r),l}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Bt=0;Bt<Tt.length;Bt++)tu[Tt.charCodeAt(Bt)]=Bt;var Bt,ru=function(t){var e=new Uint8Array(t),r,s=e.length,n="";for(r=0;r<s;r+=3)n+=Tt[e[r]>>2],n+=Tt[(e[r]&3)<<4|e[r+1]>>4],n+=Tt[(e[r+1]&15)<<2|e[r+2]>>6],n+=Tt[e[r+2]&63];return s%3===2?n=n.substring(0,n.length-1)+"=":s%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var yo=new Map;function su(t,e){let r=yo.get(t);return r||(r=new Map,yo.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var ua=(t,e,r)=>{if(!t||!(ha(t,e)||typeof t=="object"))return;let s=t.constructor.name,n=su(r,s),i=n.indexOf(t);return i===-1&&(i=n.length,n.push(t)),i};function hr(t,e,r){if(t instanceof Array)return t.map(s=>hr(s,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return {rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let s=t.constructor.name,n=ru(t);return {rr_type:s,base64:n}}else {if(t instanceof DataView)return {rr_type:t.constructor.name,args:[hr(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let s=t.constructor.name,{src:n}=t;return {rr_type:s,src:n}}else if(t instanceof HTMLCanvasElement){let s="HTMLImageElement",n=t.toDataURL();return {rr_type:s,src:n}}else {if(t instanceof ImageData)return {rr_type:t.constructor.name,args:[hr(t.data,e,r),t.width,t.height]};if(ha(t,e)||typeof t=="object"){let s=t.constructor.name,n=ua(t,e,r);return {rr_type:s,index:n}}}}return t}var da=(t,e,r)=>t.map(s=>hr(s,e,r)),ha=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);function nu(t,e,r,s){let n=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let l of i)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;let c=at(e.CanvasRenderingContext2D.prototype,l,function(a){return function(...h){return ye(this.canvas,r,s,!0)||setTimeout(()=>{let o=da(h,e,this);t(this.canvas,{type:Ot["2D"],property:l,args:o});},0),a.apply(this,h)}});n.push(c);}catch{let c=Nr(e.CanvasRenderingContext2D.prototype,l,{set(a){t(this.canvas,{type:Ot["2D"],property:l,args:[a],setter:true});}});n.push(c);}return ()=>{n.forEach(l=>l());}}function iu(t){return t==="experimental-webgl"?"webgl":t}function vo(t,e,r,s){let n=[];try{let i=at(t.HTMLCanvasElement.prototype,"getContext",function(l){return function(c,...a){if(!ye(this,e,r,!0)){let h=iu(c);if("__context"in this||(this.__context=h),s&&["webgl","webgl2"].includes(h))if(a[0]&&typeof a[0]=="object"){let o=a[0];o.preserveDrawingBuffer||(o.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return l.apply(this,[c,...a])}});n.push(i);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(i=>i());}}function bo(t,e,r,s,n,i){let l=[],c=Object.getOwnPropertyNames(t);for(let a of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof t[a]!="function")continue;let h=at(t,a,function(o){return function(...p){let d=o.apply(this,p);if(ua(d,i,this),"tagName"in this.canvas&&!ye(this.canvas,s,n,!0)){let u=da(p,i,this),m={type:e,property:a,args:u};r(this.canvas,m);}return d}});l.push(h);}catch{let h=Nr(t,a,{set(o){r(this.canvas,{type:e,property:a,args:[o],setter:true});}});l.push(h);}return l}function ou(t,e,r,s){let n=[];return typeof e.WebGLRenderingContext<"u"&&n.push(...bo(e.WebGLRenderingContext.prototype,Ot.WebGL,t,r,s,e)),typeof e.WebGL2RenderingContext<"u"&&n.push(...bo(e.WebGL2RenderingContext.prototype,Ot.WebGL2,t,r,s,e)),()=>{n.forEach(i=>i());}}var fa=`(function() {
53
+ or you can use record.mirror to access the mirror instance during recording.`,Co={map:{},getId(){return console.error(Et),-1},getNode(){return console.error(Et),null},removeNodeFromMap(){console.error(Et);},has(){return console.error(Et),false},reset(){console.error(Et);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Co=new Proxy(Co,{get(t,e,r){return e==="map"&&console.error(Et),Reflect.get(t,e,r)}}));function Ht(t,e,r={}){let n=null,s=0;return function(...i){let l=Date.now();!s&&r.leading===false&&(s=l);let u=e-(l-s),o=this;u<=0||u>e?(n&&(clearTimeout(n),n=null),s=l,t.apply(o,i)):!n&&r.trailing!==false&&(n=setTimeout(()=>{s=r.leading===false?0:Date.now(),n=null,t.apply(o,i);},u));}}function Dr(t,e,r,n,s=window){let i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,n?r:{set(l){setTimeout(()=>{r.set.call(this,l);},0),i&&i.set&&i.set.call(this,l);}}),()=>Dr(t,e,i||{},true)}function la(t){var e,r,n,s;let i=t.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:i.documentElement.scrollLeft||i?.body&&((e=H.parentElement(i.body))==null?void 0:e.scrollLeft)||((r=i?.body)==null?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:i?.documentElement.scrollTop||i?.body&&((n=H.parentElement(i.body))==null?void 0:n.scrollTop)||((s=i?.body)==null?void 0:s.scrollTop)||0}}function ca(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ua(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function da(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function ve(t,e,r,n){if(!t)return false;let s=da(t);if(!s)return false;try{if(typeof e=="string"){if(s.classList.contains(e)||n&&s.closest("."+e)!==null)return !0}else if(wr(s,e,n))return !0}catch{}return !!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function Qc(t,e){return e.getId(t)!==-1}function on(t,e,r){return t.tagName==="TITLE"&&r.headTitleMutations?true:e.getId(t)===Wt}function ha(t,e){if(Bt(t))return false;let r=e.getId(t);if(!e.has(r))return true;let n=H.parentNode(t);return n&&n.nodeType===t.DOCUMENT_NODE?false:n?ha(n,e):true}function un(t){return !!t.changedTouches}function eu(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function fa(t,e){return !!(t.nodeName==="IFRAME"&&e.getMeta(t))}function pa(t,e){return !!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function dn(t){return t?t instanceof cn&&"shadowRoot"in t?!!t.shadowRoot:!!H.shadowRoot(t):false}var hn=class{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map);}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function ma(t){var e;let r=null;return "getRootNode"in t&&((e=H.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))&&(r=H.host(H.getRootNode(t))),r}function tu(t){let e=t,r;for(;r=ma(e);)e=r;return e}function ru(t){let e=H.ownerDocument(t);if(!e)return false;let r=tu(t);return H.contains(e,r)}function ga(t){let e=H.ownerDocument(t);return e?H.contains(e,t)||ru(t):false}var X=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t))(X||{}),Y=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Y||{}),be=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(be||{}),ze=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(ze||{}),Tt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Tt||{}),_t=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(_t||{});var ya=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ya||{});function Eo(t){return "__ln"in t}var fn=class{constructor(){O(this,"length",0),O(this,"head",null),O(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<e;n++)r=r?.next||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&Eo(e.previousSibling)){let n=e.previousSibling.__ln.next;r.next=n,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,n&&(n.previous=r);}else if(e.nextSibling&&Eo(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;r.previous=n,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,n&&(n.next=r);}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++;}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},_o=(t,e)=>`${t}@${e}`,pn=class{constructor(){O(this,"frozen",false),O(this,"locked",false),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),O(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],r=new Set,n=new fn,s=o=>{let h=o,a=Wt;for(;a===Wt;)h=h&&h.nextSibling,a=h&&this.mirror.getId(h);return a},i=o=>{let h=H.parentNode(o);if(!h||!ga(o))return;let a=false;if(o.nodeType===Node.TEXT_NODE){let m=h.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(h)&&(a=true);}let f=Bt(h)?this.mirror.getId(ma(o)):this.mirror.getId(h),d=s(o);if(f===-1||d===-1)return n.addNode(o);let c=kt(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{fa(m,this.mirror)&&this.iframeManager.addIframe(m),pa(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),dn(o)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(o),this.doc);},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p);},cssCaptured:a});c&&(e.push({parentId:f,nextId:d,node:c}),r.add(c.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let o of this.movedSet)Ro(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(H.parentNode(o))||i(o);for(let o of this.addedSet)!ko(this.droppedSet,o)&&!Ro(this.removesSubTreeCache,o,this.mirror)||ko(this.movedSet,o)?i(o):this.droppedSet.add(o);let l=null;for(;n.length;){let o=null;if(l){let h=this.mirror.getId(H.parentNode(l.value)),a=s(l.value);h!==-1&&a!==-1&&(o=l);}if(!o){let h=n.tail;for(;h;){let a=h;if(h=h.previous,a){let f=this.mirror.getId(H.parentNode(a.value));if(s(a.value)===-1)continue;if(f!==-1){o=a;break}else {let c=a.value,m=H.parentNode(c);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=H.host(m);if(this.mirror.getId(p)!==-1){o=a;break}}}}}}if(!o){for(;n.head;)n.removeNode(n.head.value);break}l=o.previous,n.removeNode(o.value),i(o.value);}let u={texts:this.texts.map(o=>{let h=o.node,a=H.parentNode(h);return a&&a.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(a),{id:this.mirror.getId(h),value:o.value}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{let{attributes:h}=o;if(typeof h.style=="string"){let a=JSON.stringify(o.styleDiff),f=JSON.stringify(o._unchangedStyles);a.length<h.style.length&&(a+f).split("var(").length===h.style.split("var(").length&&(h.style=o.styleDiff);}return {id:this.mirror.getId(o.node),attributes:h}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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(u));}),O(this,"genTextAreaValueMutation",e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r));let n=Array.from(H.childNodes(e),s=>H.textContent(s)||"").join("");r.attributes.value=yr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:vr(e),value:n,maskInputFn:this.maskInputFn});}),O(this,"processMutation",e=>{if(!on(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let r=H.textContent(e.target);!ve(e.target,this.blockClass,this.blockSelector,false)&&r!==e.oldValue&&this.texts.push({value:Wo(e.target,this.maskTextClass,this.maskTextSelector,true)&&r?this.maskTextFn?this.maskTextFn(r,da(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case "attributes":{let r=e.target,n=e.attributeName,s=e.target.getAttribute(n);if(n==="value"){let l=vr(r);s=yr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:s,maskInputFn:this.maskInputFn});}if(ve(e.target,this.blockClass,this.blockSelector,false)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)n="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n==="type"&&r.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!jo(r.tagName,n))if(i.attributes[n]=zo(this.doc,st(r.tagName),st(n),s),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(let u of Array.from(r.style)){let o=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);o!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?i.styleDiff[u]=o:i.styleDiff[u]=[o,h]:i._unchangedStyles[u]=[o,h];}for(let u of Array.from(l.style))r.style.getPropertyValue(u)===""&&(i.styleDiff[u]=false);}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(ve(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let n=this.mirror.getId(r),s=Bt(e.target)?this.mirror.getId(H.host(e.target)):this.mirror.getId(e.target);ve(e.target,this.blockClass,this.blockSelector,false)||on(r,this.mirror,this.slimDOMOptions)||!Qc(r,this.mirror)||(this.addedSet.has(r)?(mn(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||ha(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[_o(n,s)]?mn(this.movedSet,r):(this.removes.push({parentId:s,id:n,isShadow:Bt(e.target)&&zt(e.target)?true:void 0}),su(r,this.removesSubTreeCache))),this.mapRemoves.push(r));});break}}}),O(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(on(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[_o(this.mirror.getId(e),n)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);ve(e,this.blockClass,this.blockSelector,false)||(H.childNodes(e).forEach(n=>this.genAdds(n)),dn(e)&&H.childNodes(H.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e);}));}});}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=e[r];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function mn(t,e){t.delete(e),H.childNodes(e).forEach(r=>mn(t,r));}function su(t,e){let r=[t];for(;r.length;){let n=r.pop();e.has(n)||(e.add(n),H.childNodes(n).forEach(s=>r.push(s)));}}function Ro(t,e,r){return t.size===0?false:nu(t,e)}function nu(t,e,r){let n=H.parentNode(e);return n?t.has(n):false}function ko(t,e){return t.size===0?false:va(t,e)}function va(t,e){let r=H.parentNode(e);return r?t.has(r)?true:va(t,r):false}var jt;function iu(t){jt=t;}function ou(){jt=void 0;}var Z=t=>jt?(...r)=>{try{return t(...r)}catch(n){if(jt&&jt(n)===true)return;throw n}}:t,rt=[];function Yt(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function ba(t,e){let r=new pn;rt.push(r),r.init(t);let[n,s]=aa(),i=new n(Z(r.processMutations.bind(r)));return i.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),[i,s]}function au({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===false)return ()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,l=[],u,o=Ht(Z(f=>{let d=Date.now()-u;t(l.map(c=>(c.timeOffset-=d,c)),f),l=[],u=null;}),i),h=Z(Ht(Z(f=>{let d=Yt(f),{clientX:c,clientY:m}=un(f)?f.changedTouches[0]:f;u||(u=Vt()),l.push({x:c,y:m,id:n.getId(d),timeOffset:Vt()-u}),o(typeof DragEvent<"u"&&f instanceof DragEvent?Y.Drag:f instanceof MouseEvent?Y.MouseMove:Y.TouchMove);}),s,{trailing:!1})),a=[ye("mousemove",h,r),ye("touchmove",h,r),ye("drag",h,r)];return Z(()=>{a.forEach(f=>f());})}function lu({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:s,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let l=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,u=[],o=null,h=a=>f=>{let d=Yt(f);if(ve(d,n,s,true))return;let c=null,m=a;if("pointerType"in f){switch(f.pointerType){case "mouse":c=ze.Mouse;break;case "touch":c=ze.Touch;break;case "pen":c=ze.Pen;break}c===ze.Touch?be[a]===be.MouseDown?m="TouchStart":be[a]===be.MouseUp&&(m="TouchEnd"):ze.Pen;}else un(f)&&(c=ze.Touch);c!==null?(o=c,(m.startsWith("Touch")&&c===ze.Touch||m.startsWith("Mouse")&&c===ze.Mouse)&&(c=null)):be[a]===be.Click&&(c=o,o=null);let p=un(f)?f.changedTouches[0]:f;if(!p)return;let g=r.getId(d),{clientX:x,clientY:y}=p;Z(t)({type:be[m],id:g,x,y,...c!==null&&{pointerType:c}});};return Object.keys(be).filter(a=>Number.isNaN(Number(a))&&!a.endsWith("_Departed")&&l[a]!==false).forEach(a=>{let f=st(a),d=h(a);if(window.PointerEvent)switch(be[a]){case be.MouseDown:case be.MouseUp:f=f.replace("mouse","pointer");break;case be.TouchStart:case be.TouchEnd:return}u.push(ye(f,d,e));}),Z(()=>{u.forEach(a=>a());})}function wa({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:s,sampling:i}){let l=Z(Ht(Z(u=>{let o=Yt(u);if(!o||ve(o,n,s,!0))return;let h=r.getId(o);if(o===e&&e.defaultView){let a=la(e.defaultView);t({id:h,x:a.left,y:a.top});}else t({id:h,x:o.scrollLeft,y:o.scrollTop});}),i.scroll||100));return ye("scroll",l,e)}function cu({viewportResizeCb:t},{win:e}){let r=-1,n=-1,s=Z(Ht(Z(()=>{let i=ca(),l=ua();(r!==i||n!==l)&&(t({width:Number(l),height:Number(i)}),r=i,n=l);}),200));return ye("resize",s,e)}var uu=["INPUT","TEXTAREA","SELECT"],Mo=new WeakMap;function du({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:s,ignoreClass:i,ignoreSelector:l,maskInputOptions:u,maskInputFn:o,sampling:h,userTriggeredOnInput:a}){function f(y){let b=Yt(y),S=y.isTrusted,w=b&&b.tagName;if(b&&w==="OPTION"&&(b=H.parentElement(b)),!b||!w||uu.indexOf(w)<0||ve(b,n,s,true)||b.classList.contains(i)||l&&b.matches(l))return;let v=b.value,C=false,_=vr(b)||"";_==="radio"||_==="checkbox"?C=b.checked:(u[w.toLowerCase()]||u[_])&&(v=yr({element:b,maskInputOptions:u,tagName:w,type:_,value:v,maskInputFn:o})),d(b,a?{text:v,isChecked:C,userTriggered:S}:{text:v,isChecked:C});let T=b.name;_==="radio"&&T&&C&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(R=>{if(R!==b){let z=R.value;d(R,a?{text:z,isChecked:!C,userTriggered:false}:{text:z,isChecked:!C});}});}function d(y,b){let S=Mo.get(y);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Mo.set(y,b);let w=r.getId(y);Z(t)({...b,id:w});}}let m=(h.input==="last"?["change"]:["input","change"]).map(y=>ye(y,Z(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(y=>y());};let g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),x=[[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(...x.map(y=>Dr(y[0],y[1],{set(){Z(f)({target:this,isTrusted:false});}},false,p))),Z(()=>{m.forEach(y=>y());})}function xr(t){let e=[];function r(n,s){if(hr("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||hr("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||hr("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||hr("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let l=Array.from(n.parentRule.cssRules).indexOf(n);return s.unshift(l),r(n.parentRule,s)}else if(n.parentStyleSheet){let l=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(l);}return s}return r(t,e)}function Xe(t,e,r){let n,s;return t?(t.ownerNode?n=e.getId(t.ownerNode):s=r.getId(t),{styleId:s,id:n}):{}}function hu({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return ()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Z((a,f,d)=>{let[c,m]=d,{id:p,styleId:g}=Xe(f,e,r.styleMirror);return (p&&p!==-1||g&&g!==-1)&&t({id:p,styleId:g,adds:[{rule:c,index:m}]}),a.apply(f,d)})}),n.CSSStyleSheet.prototype.addRule=function(a,f,d=this.cssRules.length){let c=`${a} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[c,d])};let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Z((a,f,d)=>{let[c]=d,{id:m,styleId:p}=Xe(f,e,r.styleMirror);return (m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,removes:[{index:c}]}),a.apply(f,d)})}),n.CSSStyleSheet.prototype.removeRule=function(a){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[a])};let l;n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:Z((a,f,d)=>{let[c]=d,{id:m,styleId:p}=Xe(f,e,r.styleMirror);return (m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replace:c}),a.apply(f,d)})}));let u;n.CSSStyleSheet.prototype.replaceSync&&(u=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Z((a,f,d)=>{let[c]=d,{id:m,styleId:p}=Xe(f,e,r.styleMirror);return (m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replaceSync:c}),a.apply(f,d)})}));let o={};fr("CSSGroupingRule")?o.CSSGroupingRule=n.CSSGroupingRule:(fr("CSSMediaRule")&&(o.CSSMediaRule=n.CSSMediaRule),fr("CSSConditionRule")&&(o.CSSConditionRule=n.CSSConditionRule),fr("CSSSupportsRule")&&(o.CSSSupportsRule=n.CSSSupportsRule));let h={};return Object.entries(o).forEach(([a,f])=>{h[a]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(h[a].insertRule,{apply:Z((d,c,m)=>{let[p,g]=m,{id:x,styleId:y}=Xe(c.parentStyleSheet,e,r.styleMirror);return (x&&x!==-1||y&&y!==-1)&&t({id:x,styleId:y,adds:[{rule:p,index:[...xr(c),g||0]}]}),d.apply(c,m)})}),f.prototype.deleteRule=new Proxy(h[a].deleteRule,{apply:Z((d,c,m)=>{let[p]=m,{id:g,styleId:x}=Xe(c.parentStyleSheet,e,r.styleMirror);return (g&&g!==-1||x&&x!==-1)&&t({id:g,styleId:x,removes:[{index:[...xr(c),p]}]}),d.apply(c,m)})});}),Z(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,l&&(n.CSSStyleSheet.prototype.replace=l),u&&(n.CSSStyleSheet.prototype.replaceSync=u),Object.entries(o).forEach(([a,f])=>{f.prototype.insertRule=h[a].insertRule,f.prototype.deleteRule=h[a].deleteRule;});})}function xa({mirror:t,stylesheetManager:e},r){var n,s,i;let l=null;r.nodeName==="#document"?l=t.getId(r):l=t.getId(H.host(r));let u=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(i=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:i.ShadowRoot,o=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!u||!o?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var h;return (h=o.get)==null?void 0:h.call(this)},set(h){var a;let f=(a=o.set)==null?void 0:a.call(this,h);if(l!==null&&l!==-1)try{e.adoptStyleSheets(h,l);}catch{}return f}}),Z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set});}))}function fu({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){let i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Z((u,o,h)=>{var a;let[f,d,c]=h;if(r.has(f))return i.apply(o,[f,d,c]);let{id:m,styleId:p}=Xe((a=o.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return (m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,set:{property:f,value:d,priority:c},index:xr(o.parentRule)}),u.apply(o,h)})});let l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Z((u,o,h)=>{var a;let[f]=h;if(r.has(f))return l.apply(o,[f]);let{id:d,styleId:c}=Xe((a=o.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return (d&&d!==-1||c&&c!==-1)&&t({id:d,styleId:c,remove:{property:f},index:xr(o.parentRule)}),u.apply(o,h)})}),Z(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=l;})}function pu({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:s,doc:i}){let l=Z(o=>Ht(Z(h=>{let a=Yt(h);if(!a||ve(a,e,r,!0))return;let{currentTime:f,volume:d,muted:c,playbackRate:m,loop:p}=a;t({type:o,id:n.getId(a),currentTime:f,volume:d,muted:c,playbackRate:m,loop:p});}),s.media||500)),u=[ye("play",l(_t.Play),i),ye("pause",l(_t.Pause),i),ye("seeked",l(_t.Seeked),i),ye("volumechange",l(_t.VolumeChange),i),ye("ratechange",l(_t.RateChange),i)];return Z(()=>{u.forEach(o=>o());})}function mu({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return ()=>{};let n=[],s=new WeakMap,i=r.FontFace;r.FontFace=function(o,h,a){let f=new i(o,h,a);return s.set(f,{family:o,buffer:typeof h!="string",descriptors:a,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),f};let l=ot(e.fonts,"add",function(u){return function(o){return setTimeout(Z(()=>{let h=s.get(o);h&&(t(h),s.delete(o));}),0),u.apply(this,[o])}});return n.push(()=>{r.FontFace=i;}),n.push(l),Z(()=>{n.forEach(u=>u());})}function gu(t){let{doc:e,mirror:r,blockClass:n,blockSelector:s,selectionCb:i}=t,l=true,u=Z(()=>{let o=e.getSelection();if(!o||l&&o?.isCollapsed)return;l=o.isCollapsed||!1;let h=[],a=o.rangeCount||0;for(let f=0;f<a;f++){let d=o.getRangeAt(f),{startContainer:c,startOffset:m,endContainer:p,endOffset:g}=d;ve(c,n,s,!0)||ve(p,n,s,!0)||h.push({start:r.getId(c),startOffset:m,end:r.getId(p),endOffset:g});}i({ranges:h});});return u(),ye("selectionchange",u)}function yu({doc:t,customElementCb:e}){let r=t.defaultView;return !r||!r.customElements?()=>{}:ot(r.customElements,"define",function(s){return function(i,l,u){try{e({define:{name:i}});}catch{console.warn(`Custom element callback failed for ${i}`);}return s.apply(this,[i,l,u])}})}function vu(t,e){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:i,viewportResizeCb:l,inputCb:u,mediaInteractionCb:o,styleSheetRuleCb:h,styleDeclarationCb:a,canvasMutationCb:f,fontCb:d,selectionCb:c,customElementCb:m}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),r(...p);},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p);},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),s(...p);},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),l(...p);},t.inputCb=(...p)=>{e.input&&e.input(...p),u(...p);},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),o(...p);},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),h(...p);},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),a(...p);},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},t.fontCb=(...p)=>{e.font&&e.font(...p),d(...p);},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),c(...p);},t.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function bu(t,e={}){let r=t.doc.defaultView;if(!r)return ()=>{};vu(t,e);let n,s=()=>{};t.recordDOM&&([n,s]=ba(t,t.doc));let i=au(t),l=lu(t),u=wa(t),o=cu(t,{win:r}),h=du(t),a=pu(t),f=()=>{},d=()=>{},c=()=>{},m=()=>{};t.recordDOM&&(f=hu(t,{win:r}),d=xa(t,t.doc),c=fu(t,{win:r}),t.collectFonts&&(m=mu(t)));let p=gu(t),g=yu(t),x=[];for(let y of t.plugins)x.push(y.observer(y.callback,r,y.options));return Z(()=>{rt.forEach(y=>y.reset()),n?.disconnect(),s(),i(),l(),u(),o(),h(),a(),f(),d(),c(),m(),p(),g(),x.forEach(y=>y());})}function hr(t){return typeof window[t]<"u"}function fr(t){return !!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var Sr=class{constructor(e){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,r,n,s){let i=n||this.getIdToRemoteIdMap(e),l=s||this.getRemoteIdToIdMap(e),u=i.get(r);return u||(u=this.generateIdFn(),i.set(r,u),l.set(u,r)),u}getIds(e,r){let n=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return r.map(i=>this.getId(e,i,n,s))}getRemoteId(e,r,n){let s=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let i=s.get(r);return i||-1}getRemoteIds(e,r){let n=this.getRemoteIdToIdMap(e);return r.map(s=>this.getRemoteId(e,s,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e);}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}},gn=class{constructor(e){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new Sr(Bo)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Sr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(e){this.iframes.set(e,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,r){var n,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument));}handleMessage(e){let r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;let s=this.crossOriginIframeMap.get(e.source);if(!s)return;let i=this.transformCrossOriginEvent(s,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout);}transformCrossOriginEvent(e,r){var n;switch(r.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);let s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:X.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case X.Meta:case X.Load:case X.DomContentLoaded:return false;case X.Plugin:return r;case X.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case X.IncrementalSnapshot:switch(r.data.source){case Y.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(s.node,i);}),r.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"]);}),r.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"]);}),r.data.texts.forEach(s=>{this.replaceIds(s,e,["id"]);}),r;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,e,["id"]);}),r;case Y.ViewportResize:return false;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(r.data,e,["id"]),r;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case Y.Font:return r;case Y.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"]);}),r;case Y.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,e,["styleId"]);}),r}}return false}replace(e,r,n,s){for(let i of s)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=e.getIds(n,r[i]):r[i]=e.getId(n,r[i]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r);});}patchRootIdOnNode(e,r){e.type!==ya.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r);});}},yn=class{constructor(e){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(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,r){if(!zt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let[n]=ba({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(wa({...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(H.host(e))),this.restoreHandlers.push(xa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,r){let n=this;this.restoreHandlers.push(ot(e.prototype,"attachShadow",function(s){return function(i){let l=s.call(this,i),u=H.shadowRoot(this);return u&&ga(this)&&n.addShadowRoot(u,r),l}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for($t=0;$t<Mt.length;$t++)wu[Mt.charCodeAt($t)]=$t;var $t,xu=function(t){var e=new Uint8Array(t),r,n=e.length,s="";for(r=0;r<n;r+=3)s+=Mt[e[r]>>2],s+=Mt[(e[r]&3)<<4|e[r+1]>>4],s+=Mt[(e[r+1]&15)<<2|e[r+2]>>6],s+=Mt[e[r+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var To=new Map;function Su(t,e){let r=To.get(t);return r||(r=new Map,To.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var Sa=(t,e,r)=>{if(!t||!(Ea(t,e)||typeof t=="object"))return;let n=t.constructor.name,s=Su(r,n),i=s.indexOf(t);return i===-1&&(i=s.length,s.push(t)),i};function pr(t,e,r){if(t instanceof Array)return t.map(n=>pr(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return {rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let n=t.constructor.name,s=xu(t);return {rr_type:n,base64:s}}else {if(t instanceof DataView)return {rr_type:t.constructor.name,args:[pr(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let n=t.constructor.name,{src:s}=t;return {rr_type:n,src:s}}else if(t instanceof HTMLCanvasElement){let n="HTMLImageElement",s=t.toDataURL();return {rr_type:n,src:s}}else {if(t instanceof ImageData)return {rr_type:t.constructor.name,args:[pr(t.data,e,r),t.width,t.height]};if(Ea(t,e)||typeof t=="object"){let n=t.constructor.name,s=Sa(t,e,r);return {rr_type:n,index:s}}}}return t}var Ca=(t,e,r)=>t.map(n=>pr(n,e,r)),Ea=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>t instanceof e[s]);function Cu(t,e,r,n){let s=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let l of i)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;let u=ot(e.CanvasRenderingContext2D.prototype,l,function(o){return function(...h){return ve(this.canvas,r,n,!0)||setTimeout(()=>{let a=Ca(h,e,this);t(this.canvas,{type:Tt["2D"],property:l,args:a});},0),o.apply(this,h)}});s.push(u);}catch{let u=Dr(e.CanvasRenderingContext2D.prototype,l,{set(o){t(this.canvas,{type:Tt["2D"],property:l,args:[o],setter:true});}});s.push(u);}return ()=>{s.forEach(l=>l());}}function Eu(t){return t==="experimental-webgl"?"webgl":t}function Oo(t,e,r,n){let s=[];try{let i=ot(t.HTMLCanvasElement.prototype,"getContext",function(l){return function(u,...o){if(!ve(this,e,r,!0)){let h=Eu(u);if("__context"in this||(this.__context=h),n&&["webgl","webgl2"].includes(h))if(o[0]&&typeof o[0]=="object"){let a=o[0];a.preserveDrawingBuffer||(a.preserveDrawingBuffer=!0);}else o.splice(0,1,{preserveDrawingBuffer:!0});}return l.apply(this,[u,...o])}});s.push(i);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{s.forEach(i=>i());}}function Io(t,e,r,n,s,i){let l=[],u=Object.getOwnPropertyNames(t);for(let o of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof t[o]!="function")continue;let h=ot(t,o,function(a){return function(...f){let d=a.apply(this,f);if(Sa(d,i,this),"tagName"in this.canvas&&!ve(this.canvas,n,s,!0)){let c=Ca(f,i,this),m={type:e,property:o,args:c};r(this.canvas,m);}return d}});l.push(h);}catch{let h=Dr(t,o,{set(a){r(this.canvas,{type:e,property:o,args:[a],setter:true});}});l.push(h);}return l}function _u(t,e,r,n){let s=[];return typeof e.WebGLRenderingContext<"u"&&s.push(...Io(e.WebGLRenderingContext.prototype,Tt.WebGL,t,r,n,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...Io(e.WebGL2RenderingContext.prototype,Tt.WebGL2,t,r,n,e)),()=>{s.forEach(i=>i());}}var _a=`(function() {
54
54
  "use strict";
55
55
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
56
56
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -125,9 +125,9 @@ or you can use record.mirror to access the mirror instance during recording.`,uo
125
125
  };
126
126
  })();
127
127
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
128
- `,wo=typeof self<"u"&&self.Blob&&new Blob([fa],{type:"text/javascript;charset=utf-8"});function au(t){let e;try{if(e=wo&&(self.URL||self.webkitURL).createObjectURL(wo),!e)throw "";let r=new Worker(e,{name:t?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e);}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(fa),{name:t?.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e);}}var un=class{constructor(e){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",false),O(this,"locked",false),O(this,"processMutation",(a,h)=>{(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(h);});let{sampling:r="all",win:s,blockClass:n,blockSelector:i,recordCanvas:l,dataURLOptions:c}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&r==="all"&&this.initCanvasMutationObserver(s,n,i),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,n,i,{dataURLOptions:c});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,r,s,n,i){let l=vo(r,s,n,true),c=new Map,a=new au;a.onmessage=m=>{let{id:f}=m.data;if(c.set(f,false),!("base64"in m.data))return;let{base64:g,type:x,width:v,height:w}=m.data;this.mutationCb({id:f,type:Ot["2D"],commands:[{property:"clearRect",args:[0,0,v,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:x}]},0,0]}]});};let h=1e3/e,o=0,p,d=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(f=>{ye(f,s,n,true)||m.push(f);}),m},u=m=>{if(o&&m-o<h){p=requestAnimationFrame(u);return}o=m,d().forEach(async f=>{var g;let x=this.mirror.getId(f);if(c.get(x)||f.width===0||f.height===0)return;if(c.set(x,true),["webgl","webgl2"].includes(f.__context)){let w=f.getContext(f.__context);((g=w?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===false&&w.clear(w.COLOR_BUFFER_BIT);}let v=await createImageBitmap(f);a.postMessage({id:x,bitmap:v,width:f.width,height:f.height,dataURLOptions:i.dataURLOptions},[v]);}),p=requestAnimationFrame(u);};p=requestAnimationFrame(u),this.resetObservers=()=>{l(),cancelAnimationFrame(p);};}initCanvasMutationObserver(e,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=vo(e,r,s,false),i=nu(this.processMutation.bind(this),e,r,s),l=ou(this.processMutation.bind(this),e,r,s);this.resetObservers=()=>{n(),i(),l();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let s=this.pendingCanvasMutations.get(e);if(!s||r===-1)return;let n=s.map(l=>{let{type:c,...a}=l;return a}),{type:i}=s[0];this.mutationCb({id:r,type:i,commands:n}),this.pendingCanvasMutations.delete(e);}},dn=class{constructor(e){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new sn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,r){if(e.length===0)return;let s={id:r,styleIds:[]},n=[];for(let i of e){let l;this.styleMirror.has(i)?l=this.styleMirror.getId(i):(l=this.styleMirror.add(i),n.push({styleId:l,rules:Array.from(i.rules||CSSRule,(c,a)=>({rule:Ro(c,i.href),index:a}))})),s.styleIds.push(l);}n.length>0&&(s.styles=n),this.adoptedStyleSheetCb(s);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},hn=class{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",false);}inOtherBuffer(e,r){let s=this.nodeMap.get(e);return s&&Array.from(s).some(n=>n!==r)}add(e,r){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r));}destroy(){}},ie,fr,Ks,xr=false;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Jn=t.contentWindow)==null?void 0:Jn.Array.from)||Array.from,document.body.removeChild(t);}}catch(t){console.debug("Unable to override Array.from",t);}var Ie=xl();function Le(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskTextClass:a="rr-mask",maskTextSelector:h=null,inlineStylesheet:o=true,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:u,maskInputFn:m,maskTextFn:f,hooks:g,packFn:x,sampling:v={},dataURLOptions:w={},mousemoveWait:C,recordDOM:b=true,recordCanvas:y=false,recordCrossOriginIframes:S=false,recordAfter:_=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:T=false,collectFonts:R=false,inlineImages:j=false,plugins:D,keepIframeSrcFn:E=()=>false,ignoreCSSAttributes:P=new Set([]),errorHandler:W}=t;Bc(W);let L=S?window.parent===window:true,U=false;if(!L)try{window.parent.document&&(U=!1);}catch{U=true;}if(L&&!e)throw new Error("emit function is required");if(!L&&!U)return ()=>{};C!==void 0&&v.mousemove===void 0&&(v.mousemove=C),Ie.reset();let J=p===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:d!==void 0?d:{password:true},ue=No(u);Pc();let ae,K=0,Ze=B=>{for(let le of D||[])le.eventProcessor&&(B=le.eventProcessor(B));return x&&!U&&(B=x(B)),B};ie=(B,le)=>{var Q;let ne=B;if(ne.timestamp=qt(),(Q=st[0])!=null&&Q.isFrozen()&&ne.type!==X.FullSnapshot&&!(ne.type===X.IncrementalSnapshot&&ne.data.source===Z.Mutation)&&st.forEach(Se=>Se.unfreeze()),L)e?.(Ze(ne),le);else if(U){let Se={type:"rrweb",event:Ze(ne),origin:window.location.origin,isCheckout:le};window.parent.postMessage(Se,"*");}if(ne.type===X.FullSnapshot)ae=ne,K=0;else if(ne.type===X.IncrementalSnapshot){if(ne.data.source===Z.Mutation&&ne.data.isAttachIframe)return;K++;let Se=s&&K>=s,ee=r&&ne.timestamp-ae.timestamp>r;(Se||ee)&&fr(true);}};let M=B=>{ie({type:X.IncrementalSnapshot,data:{source:Z.Mutation,...B}});},Pe=B=>ie({type:X.IncrementalSnapshot,data:{source:Z.Scroll,...B}}),Ce=B=>ie({type:X.IncrementalSnapshot,data:{source:Z.CanvasMutation,...B}}),Ut=B=>ie({type:X.IncrementalSnapshot,data:{source:Z.AdoptedStyleSheet,...B}}),me=new dn({mutationCb:M,adoptedStyleSheetCb:Ut}),Oe=new ln({mirror:Ie,mutationCb:M,stylesheetManager:me,recordCrossOriginIframes:S,wrappedEmit:ie});for(let B of D||[])B.getMirror&&B.getMirror({nodeMirror:Ie,crossOriginIframeMirror:Oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Oe.crossOriginIframeStyleMirror});let rt=new hn;Ks=new un({recordCanvas:y,mutationCb:Ce,win:window,blockClass:n,blockSelector:i,mirror:Ie,sampling:v.canvas,dataURLOptions:w});let Ye=new cn({mutationCb:M,scrollCb:Pe,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:h,inlineStylesheet:o,maskInputOptions:J,dataURLOptions:w,maskTextFn:f,maskInputFn:m,recordCanvas:y,inlineImages:j,sampling:v,slimDOMOptions:ue,iframeManager:Oe,stylesheetManager:me,canvasManager:Ks,keepIframeSrcFn:E,processedNodeManager:rt},mirror:Ie});fr=(B=false)=>{if(!b)return;ie({type:X.Meta,data:{href:window.location.href,width:Ko(),height:Jo()}},B),me.reset(),Ye.init(),st.forEach(Q=>Q.lock());let le=ql(document,{mirror:Ie,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:h,inlineStylesheet:o,maskAllInputs:J,maskTextFn:f,maskInputFn:m,slimDOM:ue,dataURLOptions:w,recordCanvas:y,inlineImages:j,onSerialize:Q=>{ta(Q,Ie)&&Oe.addIframe(Q),ra(Q,Ie)&&me.trackLinkElement(Q),rn(Q)&&Ye.addShadowRoot(H.shadowRoot(Q),document);},onIframeLoad:(Q,ne)=>{Oe.attachIframe(Q,ne),Ye.observeAttachShadow(Q);},onStylesheetLoad:(Q,ne)=>{me.attachLinkElement(Q,ne);},keepIframeSrcFn:E});if(!le)return console.warn("Failed to snapshot the document");ie({type:X.FullSnapshot,data:{node:le,initialOffset:Xo(window)}},B),st.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,Ie.getId(document));};try{let B=[],le=ne=>{var Se;return Y(eu)({mutationCb:M,mousemoveCb:(ee,Hr)=>ie({type:X.IncrementalSnapshot,data:{source:Hr,positions:ee}}),mouseInteractionCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.MouseInteraction,...ee}}),scrollCb:Pe,viewportResizeCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.ViewportResize,...ee}}),inputCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.Input,...ee}}),mediaInteractionCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.MediaInteraction,...ee}}),styleSheetRuleCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.StyleSheetRule,...ee}}),styleDeclarationCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.StyleDeclaration,...ee}}),canvasMutationCb:Ce,fontCb:ee=>ie({type:X.IncrementalSnapshot,data:{source:Z.Font,...ee}}),selectionCb:ee=>{ie({type:X.IncrementalSnapshot,data:{source:Z.Selection,...ee}});},customElementCb:ee=>{ie({type:X.IncrementalSnapshot,data:{source:Z.CustomElement,...ee}});},blockClass:n,ignoreClass:l,ignoreSelector:c,maskTextClass:a,maskTextSelector:h,maskInputOptions:J,inlineStylesheet:o,sampling:v,recordDOM:b,recordCanvas:y,inlineImages:j,userTriggeredOnInput:T,collectFonts:R,doc:ne,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:ue,dataURLOptions:w,mirror:Ie,iframeManager:Oe,stylesheetManager:me,shadowDomManager:Ye,processedNodeManager:rt,canvasManager:Ks,ignoreCSSAttributes:P,plugins:((Se=D?.filter(ee=>ee.observer))==null?void 0:Se.map(ee=>({observer:ee.observer,options:ee.options,callback:Hr=>ie({type:X.Plugin,data:{plugin:ee.name,payload:Hr}})})))||[]},g)};Oe.addLoadListener(ne=>{try{B.push(le(ne.contentDocument));}catch(Se){console.warn(Se);}});let Q=()=>{fr(),B.push(le(document)),xr=!0;};return ["interactive","complete"].includes(document.readyState)?Q():(B.push(ge("DOMContentLoaded",()=>{ie({type:X.DomContentLoaded,data:{}}),_==="DOMContentLoaded"&&Q();})),B.push(ge("load",()=>{ie({type:X.Load,data:{}}),_==="load"&&Q();},window))),()=>{B.forEach(ne=>{try{ne();}catch(Se){String(Se).toLowerCase().includes("cross-origin")||console.warn(Se);}}),rt.destroy(),xr=!1,jc();}}catch(B){console.warn(B);}}Le.addCustomEvent=(t,e)=>{if(!xr)throw new Error("please add custom event after start recording");ie({type:X.Custom,data:{tag:t,payload:e}});};Le.freezePage=()=>{st.forEach(t=>t.freeze());};Le.takeFullSnapshot=t=>{if(!xr)throw new Error("please take full snapshot after start recording");fr(t);};Le.mirror=Ie;var xo;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped";})(xo||(xo={}));var{addCustomEvent:ah}=Le,{freezePage:lh}=Le,{takeFullSnapshot:ch}=Le;var be;(function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.NativeFrame=7]="NativeFrame",t[t.NativeInteraction=8]="NativeInteraction";})(be||(be={}));var On;(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Selection=11]="Selection",t[t.StyleDeclaration=12]="StyleDeclaration",t[t.Drag=13]="Drag";})(On||(On={}));var In;(function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchEnd=9]="TouchEnd";})(In||(In={}));var fe;(function(t){t.Console="replayops/console",t.Network="replayops/network",t.Performance="replayops/performance",t.WebVitals="replayops/webvitals",t.Error="replayops/error";})(fe||(fe={}));var pa;(function(t){t[t.Tap=0]="Tap",t[t.DoubleTap=1]="DoubleTap",t[t.LongPress=2]="LongPress",t[t.Scroll=3]="Scroll",t[t.Swipe=4]="Swipe",t[t.ScreenChange=5]="ScreenChange",t[t.KeyboardInput=6]="KeyboardInput",t[t.Back=7]="Back";})(pa||(pa={}));var q={};Ya(q,{BRAND:()=>Au,DIRTY:()=>lt,EMPTY_PATH:()=>du,INVALID:()=>F,NEVER:()=>yd,OK:()=>pe,ParseStatus:()=>de,Schema:()=>V,ZodAny:()=>Qe,ZodArray:()=>Ge,ZodBigInt:()=>ut,ZodBoolean:()=>dt,ZodBranded:()=>Jt,ZodCatch:()=>St,ZodDate:()=>ht,ZodDefault:()=>xt,ZodDiscriminatedUnion:()=>Pr,ZodEffects:()=>ke,ZodEnum:()=>bt,ZodError:()=>we,ZodFirstPartyTypeKind:()=>$,ZodFunction:()=>Fr,ZodIntersection:()=>gt,ZodIssueCode:()=>k,ZodLazy:()=>yt,ZodLiteral:()=>vt,ZodMap:()=>Lt,ZodNaN:()=>$t,ZodNativeEnum:()=>wt,ZodNever:()=>De,ZodNull:()=>pt,ZodNullable:()=>Ue,ZodNumber:()=>ct,ZodObject:()=>xe,ZodOptional:()=>_e,ZodParsedType:()=>N,ZodPipeline:()=>Kt,ZodPromise:()=>et,ZodReadonly:()=>Ct,ZodRecord:()=>Lr,ZodSchema:()=>V,ZodSet:()=>Ft,ZodString:()=>Ke,ZodSymbol:()=>Dt,ZodTransformer:()=>ke,ZodTuple:()=>$e,ZodType:()=>V,ZodUndefined:()=>ft,ZodUnion:()=>mt,ZodUnknown:()=>He,ZodVoid:()=>Pt,addIssueToContext:()=>I,any:()=>zu,array:()=>Hu,bigint:()=>Fu,boolean:()=>_a,coerce:()=>gd,custom:()=>Sa,date:()=>$u,datetimeRegex:()=>wa,defaultErrorMap:()=>Ve,discriminatedUnion:()=>Xu,effect:()=>ld,enum:()=>id,function:()=>rd,getErrorMap:()=>It,getParsedType:()=>Fe,instanceof:()=>Pu,intersection:()=>Ju,isAborted:()=>Ar,isAsync:()=>Nt,isDirty:()=>Dr,isValid:()=>Je,late:()=>Du,lazy:()=>sd,literal:()=>nd,makeIssue:()=>Xt,map:()=>ed,nan:()=>Lu,nativeEnum:()=>od,never:()=>Vu,null:()=>ju,nullable:()=>ud,number:()=>Ea,object:()=>Gu,objectUtil:()=>Nn,oboolean:()=>md,onumber:()=>pd,optional:()=>cd,ostring:()=>fd,pipeline:()=>hd,preprocess:()=>dd,promise:()=>ad,quotelessJson:()=>lu,record:()=>Qu,set:()=>td,setErrorMap:()=>uu,strictObject:()=>Zu,string:()=>Ca,symbol:()=>Uu,transformer:()=>ld,tuple:()=>Ku,undefined:()=>Bu,union:()=>Yu,unknown:()=>Wu,util:()=>G,void:()=>qu});var G;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let i={};for(let l of n)i[l]=l;return i},t.getValidEnumValues=n=>{let i=t.objectKeys(n).filter(c=>typeof n[n[c]]!="number"),l={};for(let c of i)l[c]=n[c];return t.objectValues(l)},t.objectValues=n=>t.objectKeys(n).map(function(i){return n[i]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&i.push(l);return i},t.find=(n,i)=>{for(let l of n)if(i(l))return l},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,i=" | "){return n.map(l=>typeof l=="string"?`'${l}'`:l).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(G||(G={}));var Nn;(function(t){t.mergeShapes=(e,r)=>({...e,...r});})(Nn||(Nn={}));var N=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Fe=t=>{switch(typeof t){case "undefined":return N.undefined;case "string":return N.string;case "number":return Number.isNaN(t)?N.nan:N.number;case "boolean":return N.boolean;case "function":return N.function;case "bigint":return N.bigint;case "symbol":return N.symbol;case "object":return Array.isArray(t)?N.array:t===null?N.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?N.promise:typeof Map<"u"&&t instanceof Map?N.map:typeof Set<"u"&&t instanceof Set?N.set:typeof Date<"u"&&t instanceof Date?N.date:N.object;default:return N.unknown}};var k=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),lu=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),we=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s];},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}format(e){let r=e||function(i){return i.message},s={_errors:[]},n=i=>{for(let l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(n);else if(l.code==="invalid_return_type")n(l.returnTypeError);else if(l.code==="invalid_arguments")n(l.argumentsError);else if(l.path.length===0)s._errors.push(r(l));else {let c=s,a=0;for(;a<l.path.length;){let h=l.path[a];a===l.path.length-1?(c[h]=c[h]||{_errors:[]},c[h]._errors.push(r(l))):c[h]=c[h]||{_errors:[]},c=c[h],a++;}}};return n(this),s}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},s=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(e(n));}else s.push(e(n));return {formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}};we.create=t=>new we(t);var cu=(t,e)=>{let r;switch(t.code){case k.invalid_type:t.received===N.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case k.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case k.invalid_union:r="Invalid input";break;case k.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case k.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case k.invalid_arguments:r="Invalid function arguments";break;case k.invalid_return_type:r="Invalid function return type";break;case k.invalid_date:r="Invalid date";break;case k.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case k.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case k.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case k.custom:r="Invalid input";break;case k.invalid_intersection_types:r="Intersection results could not be merged";break;case k.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case k.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t);}return {message:r}},Ve=cu;var ma=Ve;function uu(t){ma=t;}function It(){return ma}var Xt=t=>{let{data:e,path:r,errorMaps:s,issueData:n}=t,i=[...r,...n.path||[]],l={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let c="",a=s.filter(h=>!!h).slice().reverse();for(let h of a)c=h(l,{data:e,defaultError:c}).message;return {...n,path:i,message:c}},du=[];function I(t,e){let r=It(),s=Xt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Ve?void 0:Ve].filter(n=>!!n)});t.common.issues.push(s);}var de=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let s=[];for(let n of r){if(n.status==="aborted")return F;n.status==="dirty"&&e.dirty(),s.push(n.value);}return {status:e.value,value:s}}static async mergeObjectAsync(e,r){let s=[];for(let n of r){let i=await n.key,l=await n.value;s.push({key:i,value:l});}return t.mergeObjectSync(e,s)}static mergeObjectSync(e,r){let s={};for(let n of r){let{key:i,value:l}=n;if(i.status==="aborted"||l.status==="aborted")return F;i.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||n.alwaysSet)&&(s[i.value]=l.value);}return {status:e.value,value:s}}},F=Object.freeze({status:"aborted"}),lt=t=>({status:"dirty",value:t}),pe=t=>({status:"valid",value:t}),Ar=t=>t.status==="aborted",Dr=t=>t.status==="dirty",Je=t=>t.status==="valid",Nt=t=>typeof Promise<"u"&&t instanceof Promise;var A;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message;})(A||(A={}));var Re=class{constructor(e,r,s,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=s,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ga=(t,e)=>{if(Je(e))return {success:true,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new we(t.common.issues);return this._error=r,this._error}}};function z(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:s,description:n}=t;if(e&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(l,c)=>{let{message:a}=t;return l.code==="invalid_enum_value"?{message:a??c.defaultError}:typeof c.data>"u"?{message:a??s??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:a??r??c.defaultError}},description:n}}var V=class{get description(){return this._def.description}_getType(e){return Fe(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new de,ctx:{common:e.parent.common,data:e.data,parsedType:Fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Nt(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let s=this.safeParse(e,r);if(s.success)return s.data;throw s.error}safeParse(e,r){let s={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Fe(e)},n=this._parseSync({data:e,path:s.path,parent:s});return ga(s,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Fe(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return Je(s)?{value:s.value}:{issues:r.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:e,path:[],parent:r}).then(s=>Je(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let s=await this.safeParseAsync(e,r);if(s.success)return s.data;throw s.error}async safeParseAsync(e,r){let s={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Fe(e)},n=this._parse({data:e,path:s.path,parent:s}),i=await(Nt(n)?n:Promise.resolve(n));return ga(s,i)}refine(e,r){let s=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let l=e(n),c=()=>i.addIssue({code:k.custom,...s(n)});return typeof Promise<"u"&&l instanceof Promise?l.then(a=>a?true:(c(),false)):l?true:(c(),false)})}refinement(e,r){return this._refinement((s,n)=>e(s)?true:(n.addIssue(typeof r=="function"?r(s,n):r),false))}_refinement(e){return new ke({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return _e.create(this,this._def)}nullable(){return Ue.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ge.create(this)}promise(){return et.create(this,this._def)}or(e){return mt.create([this,e],this._def)}and(e){return gt.create(this,e,this._def)}transform(e){return new ke({...z(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new xt({...z(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new Jt({typeName:$.ZodBranded,type:this,...z(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new St({...z(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Kt.create(this,e)}readonly(){return Ct.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},hu=/^c[^\s-]{8,}$/i,fu=/^[0-9a-z]+$/,pu=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mu=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gu=/^[a-z0-9_-]{21}$/i,yu=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vu=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bu=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",An,xu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Su=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Cu=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Eu=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_u=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ru=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,va="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ku=new RegExp(`^${va}$`);function ba(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Mu(t){return new RegExp(`^${ba(t)}$`)}function wa(t){let e=`${va}T${ba(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Tu(t,e){return !!((e==="v4"||!e)&&xu.test(t)||(e==="v6"||!e)&&Cu.test(t))}function Ou(t,e){if(!yu.test(t))return false;try{let[r]=t.split(".");if(!r)return !1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(s));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return false}}function Iu(t,e){return !!((e==="v4"||!e)&&Su.test(t)||(e==="v6"||!e)&&Eu.test(t))}var Ke=class t extends V{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==N.string){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.string,received:i.parsedType}),F}let s=new de,n;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),s.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),s.dirty());else if(i.kind==="length"){let l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(n=this._getOrReturnCtx(e,n),l?I(n,{code:k.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):c&&I(n,{code:k.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),s.dirty());}else if(i.kind==="email")bu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"email",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")An||(An=new RegExp(wu,"u")),An.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"emoji",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")mu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"uuid",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")gu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"nanoid",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")hu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"cuid",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")fu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"cuid2",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")pu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"ulid",code:k.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(e.data);}catch{n=this._getOrReturnCtx(e,n),I(n,{validation:"url",code:k.invalid_string,message:i.message}),s.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"regex",code:k.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?wa(i).test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?ku.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Mu(i).test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?vu.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"duration",code:k.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?Tu(e.data,i.version)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"ip",code:k.invalid_string,message:i.message}),s.dirty()):i.kind==="jwt"?Ou(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"jwt",code:k.invalid_string,message:i.message}),s.dirty()):i.kind==="cidr"?Iu(e.data,i.version)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"cidr",code:k.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?_u.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"base64",code:k.invalid_string,message:i.message}),s.dirty()):i.kind==="base64url"?Ru.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:"base64url",code:k.invalid_string,message:i.message}),s.dirty()):G.assertNever(i);return {status:s.value,value:e.data}}_regex(e,r,s){return this.refinement(n=>e.test(n),{validation:r,code:k.invalid_string,...A.errToObj(s)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??false,local:e?.local??false,...A.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...A.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...A.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...A.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...A.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...A.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...A.errToObj(r)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return !!this._def.checks.find(e=>e.kind==="date")}get isTime(){return !!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return !!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return !!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return !!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return !!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ke.create=t=>new Ke({checks:[],typeName:$.ZodString,coerce:t?.coerce??false,...z(t)});function Nu(t,e){let r=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=r>s?r:s,i=Number.parseInt(t.toFixed(n).replace(".","")),l=Number.parseInt(e.toFixed(n).replace(".",""));return i%l/10**n}var ct=class t extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==N.number){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.number,received:i.parsedType}),F}let s,n=new de;for(let i of this._def.checks)i.kind==="int"?G.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?Nu(e.data,i.value)!==0&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.not_finite,message:i.message}),n.dirty()):G.assertNever(i);return {status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,true,A.toString(r))}gt(e,r){return this.setLimit("min",e,false,A.toString(r))}lte(e,r){return this.setLimit("max",e,true,A.toString(r))}lt(e,r){return this.setLimit("max",e,false,A.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return true;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);}return Number.isFinite(r)&&Number.isFinite(e)}};ct.create=t=>new ct({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||false,...z(t)});var ut=class t extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data);}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.bigint)return this._getInvalidInput(e);let s,n=new de;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):G.assertNever(i);return {status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return I(r,{code:k.invalid_type,expected:N.bigint,received:r.parsedType}),F}gte(e,r){return this.setLimit("min",e,true,A.toString(r))}gt(e,r){return this.setLimit("min",e,false,A.toString(r))}lte(e,r){return this.setLimit("max",e,true,A.toString(r))}lt(e,r){return this.setLimit("max",e,false,A.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ut.create=t=>new ut({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??false,...z(t)});var dt=class extends V{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==N.boolean){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.boolean,received:s.parsedType}),F}return pe(e.data)}};dt.create=t=>new dt({typeName:$.ZodBoolean,coerce:t?.coerce||false,...z(t)});var ht=class t extends V{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==N.date){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.date,received:i.parsedType}),F}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_date}),F}let s=new de,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),s.dirty()):G.assertNever(i);return {status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};ht.create=t=>new ht({checks:[],coerce:t?.coerce||false,typeName:$.ZodDate,...z(t)});var Dt=class extends V{_parse(e){if(this._getType(e)!==N.symbol){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.symbol,received:s.parsedType}),F}return pe(e.data)}};Dt.create=t=>new Dt({typeName:$.ZodSymbol,...z(t)});var ft=class extends V{_parse(e){if(this._getType(e)!==N.undefined){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.undefined,received:s.parsedType}),F}return pe(e.data)}};ft.create=t=>new ft({typeName:$.ZodUndefined,...z(t)});var pt=class extends V{_parse(e){if(this._getType(e)!==N.null){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.null,received:s.parsedType}),F}return pe(e.data)}};pt.create=t=>new pt({typeName:$.ZodNull,...z(t)});var Qe=class extends V{constructor(){super(...arguments),this._any=true;}_parse(e){return pe(e.data)}};Qe.create=t=>new Qe({typeName:$.ZodAny,...z(t)});var He=class extends V{constructor(){super(...arguments),this._unknown=true;}_parse(e){return pe(e.data)}};He.create=t=>new He({typeName:$.ZodUnknown,...z(t)});var De=class extends V{_parse(e){let r=this._getOrReturnCtx(e);return I(r,{code:k.invalid_type,expected:N.never,received:r.parsedType}),F}};De.create=t=>new De({typeName:$.ZodNever,...z(t)});var Pt=class extends V{_parse(e){if(this._getType(e)!==N.undefined){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.void,received:s.parsedType}),F}return pe(e.data)}};Pt.create=t=>new Pt({typeName:$.ZodVoid,...z(t)});var Ge=class t extends V{_parse(e){let{ctx:r,status:s}=this._processInputParams(e),n=this._def;if(r.parsedType!==N.array)return I(r,{code:k.invalid_type,expected:N.array,received:r.parsedType}),F;if(n.exactLength!==null){let l=r.data.length>n.exactLength.value,c=r.data.length<n.exactLength.value;(l||c)&&(I(r,{code:l?k.too_big:k.too_small,minimum:c?n.exactLength.value:void 0,maximum:l?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),s.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(I(r,{code:k.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(I(r,{code:k.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((l,c)=>n.type._parseAsync(new Re(r,l,r.path,c)))).then(l=>de.mergeArray(s,l));let i=[...r.data].map((l,c)=>n.type._parseSync(new Re(r,l,r.path,c)));return de.mergeArray(s,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:A.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:A.toString(r)}})}nonempty(e){return this.min(1,e)}};Ge.create=(t,e)=>new Ge({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...z(e)});function At(t){if(t instanceof xe){let e={};for(let r in t.shape){let s=t.shape[r];e[r]=_e.create(At(s));}return new xe({...t._def,shape:()=>e})}else return t instanceof Ge?new Ge({...t._def,type:At(t.element)}):t instanceof _e?_e.create(At(t.unwrap())):t instanceof Ue?Ue.create(At(t.unwrap())):t instanceof $e?$e.create(t.items.map(e=>At(e))):t}var xe=class t extends V{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==N.object){let h=this._getOrReturnCtx(e);return I(h,{code:k.invalid_type,expected:N.object,received:h.parsedType}),F}let{status:s,ctx:n}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof De&&this._def.unknownKeys==="strip"))for(let h in n.data)l.includes(h)||c.push(h);let a=[];for(let h of l){let o=i[h],p=n.data[h];a.push({key:{status:"valid",value:h},value:o._parse(new Re(n,p,n.path,h)),alwaysSet:h in n.data});}if(this._def.catchall instanceof De){let h=this._def.unknownKeys;if(h==="passthrough")for(let o of c)a.push({key:{status:"valid",value:o},value:{status:"valid",value:n.data[o]}});else if(h==="strict")c.length>0&&(I(n,{code:k.unrecognized_keys,keys:c}),s.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let h=this._def.catchall;for(let o of c){let p=n.data[o];a.push({key:{status:"valid",value:o},value:h._parse(new Re(n,p,n.path,o)),alwaysSet:o in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let o of a){let p=await o.key,d=await o.value;h.push({key:p,value:d,alwaysSet:o.alwaysSet});}return h}).then(h=>de.mergeObjectSync(s,h)):de.mergeObjectSync(s,a)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,s)=>{let n=this._def.errorMap?.(r,s).message??s.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let s of G.objectKeys(e))e[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let s of G.objectKeys(this.shape))e[s]||(r[s]=this.shape[s]);return new t({...this._def,shape:()=>r})}deepPartial(){return At(this)}partial(e){let r={};for(let s of G.objectKeys(this.shape)){let n=this.shape[s];e&&!e[s]?r[s]=n:r[s]=n.optional();}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let s of G.objectKeys(this.shape))if(e&&!e[s])r[s]=this.shape[s];else {let i=this.shape[s];for(;i instanceof _e;)i=i._def.innerType;r[s]=i;}return new t({...this._def,shape:()=>r})}keyof(){return xa(G.objectKeys(this.shape))}};xe.create=(t,e)=>new xe({shape:()=>t,unknownKeys:"strip",catchall:De.create(),typeName:$.ZodObject,...z(e)});xe.strictCreate=(t,e)=>new xe({shape:()=>t,unknownKeys:"strict",catchall:De.create(),typeName:$.ZodObject,...z(e)});xe.lazycreate=(t,e)=>new xe({shape:t,unknownKeys:"strip",catchall:De.create(),typeName:$.ZodObject,...z(e)});var mt=class extends V{_parse(e){let{ctx:r}=this._processInputParams(e),s=this._def.options;function n(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;let l=i.map(c=>new we(c.ctx.common.issues));return I(r,{code:k.invalid_union,unionErrors:l}),F}if(r.common.async)return Promise.all(s.map(async i=>{let l={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(n);{let i,l=[];for(let a of s){let h={...r,common:{...r.common,issues:[]},parent:null},o=a._parseSync({data:r.data,path:r.path,parent:h});if(o.status==="valid")return o;o.status==="dirty"&&!i&&(i={result:o,ctx:h}),h.common.issues.length&&l.push(h.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let c=l.map(a=>new we(a));return I(r,{code:k.invalid_union,unionErrors:c}),F}}get options(){return this._def.options}};mt.create=(t,e)=>new mt({options:t,typeName:$.ZodUnion,...z(e)});var qe=t=>t instanceof yt?qe(t.schema):t instanceof ke?qe(t.innerType()):t instanceof vt?[t.value]:t instanceof bt?t.options:t instanceof wt?G.objectValues(t.enum):t instanceof xt?qe(t._def.innerType):t instanceof ft?[void 0]:t instanceof pt?[null]:t instanceof _e?[void 0,...qe(t.unwrap())]:t instanceof Ue?[null,...qe(t.unwrap())]:t instanceof Jt||t instanceof Ct?qe(t.unwrap()):t instanceof St?qe(t._def.innerType):[],Pr=class t extends V{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.object)return I(r,{code:k.invalid_type,expected:N.object,received:r.parsedType}),F;let s=this.discriminator,n=r.data[s],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(I(r,{code:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,s){let n=new Map;for(let i of r){let l=qe(i.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of l){if(n.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);n.set(c,i);}}return new t({typeName:$.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...z(s)})}};function Dn(t,e){let r=Fe(t),s=Fe(e);if(t===e)return {valid:true,data:t};if(r===N.object&&s===N.object){let n=G.objectKeys(e),i=G.objectKeys(t).filter(c=>n.indexOf(c)!==-1),l={...t,...e};for(let c of i){let a=Dn(t[c],e[c]);if(!a.valid)return {valid:false};l[c]=a.data;}return {valid:true,data:l}}else if(r===N.array&&s===N.array){if(t.length!==e.length)return {valid:false};let n=[];for(let i=0;i<t.length;i++){let l=t[i],c=e[i],a=Dn(l,c);if(!a.valid)return {valid:false};n.push(a.data);}return {valid:true,data:n}}else return r===N.date&&s===N.date&&+t==+e?{valid:true,data:t}:{valid:false}}var gt=class extends V{_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=(i,l)=>{if(Ar(i)||Ar(l))return F;let c=Dn(i.value,l.value);return c.valid?((Dr(i)||Dr(l))&&r.dirty(),{status:r.value,value:c.data}):(I(s,{code:k.invalid_intersection_types}),F)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,l])=>n(i,l)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};gt.create=(t,e,r)=>new gt({left:t,right:e,typeName:$.ZodIntersection,...z(r)});var $e=class t extends V{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.array)return I(s,{code:k.invalid_type,expected:N.array,received:s.parsedType}),F;if(s.data.length<this._def.items.length)return I(s,{code:k.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),F;!this._def.rest&&s.data.length>this._def.items.length&&(I(s,{code:k.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...s.data].map((l,c)=>{let a=this._def.items[c]||this._def.rest;return a?a._parse(new Re(s,l,s.path,c)):null}).filter(l=>!!l);return s.common.async?Promise.all(i).then(l=>de.mergeArray(r,l)):de.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};$e.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $e({items:t,typeName:$.ZodTuple,rest:null,...z(e)})};var Lr=class t extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.object)return I(s,{code:k.invalid_type,expected:N.object,received:s.parsedType}),F;let n=[],i=this._def.keyType,l=this._def.valueType;for(let c in s.data)n.push({key:i._parse(new Re(s,c,s.path,c)),value:l._parse(new Re(s,s.data[c],s.path,c)),alwaysSet:c in s.data});return s.common.async?de.mergeObjectAsync(r,n):de.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,s){return r instanceof V?new t({keyType:e,valueType:r,typeName:$.ZodRecord,...z(s)}):new t({keyType:Ke.create(),valueType:e,typeName:$.ZodRecord,...z(r)})}},Lt=class extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.map)return I(s,{code:k.invalid_type,expected:N.map,received:s.parsedType}),F;let n=this._def.keyType,i=this._def.valueType,l=[...s.data.entries()].map(([c,a],h)=>({key:n._parse(new Re(s,c,s.path,[h,"key"])),value:i._parse(new Re(s,a,s.path,[h,"value"]))}));if(s.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let a of l){let h=await a.key,o=await a.value;if(h.status==="aborted"||o.status==="aborted")return F;(h.status==="dirty"||o.status==="dirty")&&r.dirty(),c.set(h.value,o.value);}return {status:r.value,value:c}})}else {let c=new Map;for(let a of l){let h=a.key,o=a.value;if(h.status==="aborted"||o.status==="aborted")return F;(h.status==="dirty"||o.status==="dirty")&&r.dirty(),c.set(h.value,o.value);}return {status:r.value,value:c}}}};Lt.create=(t,e,r)=>new Lt({valueType:e,keyType:t,typeName:$.ZodMap,...z(r)});var Ft=class t extends V{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.set)return I(s,{code:k.invalid_type,expected:N.set,received:s.parsedType}),F;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(I(s,{code:k.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(I(s,{code:k.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function l(a){let h=new Set;for(let o of a){if(o.status==="aborted")return F;o.status==="dirty"&&r.dirty(),h.add(o.value);}return {status:r.value,value:h}}let c=[...s.data.values()].map((a,h)=>i._parse(new Re(s,a,s.path,h)));return s.common.async?Promise.all(c).then(a=>l(a)):l(c)}min(e,r){return new t({...this._def,minSize:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:A.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ft.create=(t,e)=>new Ft({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...z(e)});var Fr=class t extends V{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.function)return I(r,{code:k.invalid_type,expected:N.function,received:r.parsedType}),F;function s(c,a){return Xt({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,It(),Ve].filter(h=>!!h),issueData:{code:k.invalid_arguments,argumentsError:a}})}function n(c,a){return Xt({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,It(),Ve].filter(h=>!!h),issueData:{code:k.invalid_return_type,returnTypeError:a}})}let i={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof et){let c=this;return pe(async function(...a){let h=new we([]),o=await c._def.args.parseAsync(a,i).catch(u=>{throw h.addIssue(s(a,u)),h}),p=await Reflect.apply(l,this,o);return await c._def.returns._def.type.parseAsync(p,i).catch(u=>{throw h.addIssue(n(p,u)),h})})}else {let c=this;return pe(function(...a){let h=c._def.args.safeParse(a,i);if(!h.success)throw new we([s(a,h.error)]);let o=Reflect.apply(l,this,h.data),p=c._def.returns.safeParse(o,i);if(!p.success)throw new we([n(o,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:$e.create(e).rest(He.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,s){return new t({args:e||$e.create([]).rest(He.create()),returns:r||He.create(),typeName:$.ZodFunction,...z(s)})}},yt=class extends V{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};yt.create=(t,e)=>new yt({getter:t,typeName:$.ZodLazy,...z(e)});var vt=class extends V{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return I(r,{received:r.data,code:k.invalid_literal,expected:this._def.value}),F}return {status:"valid",value:e.data}}get value(){return this._def.value}};vt.create=(t,e)=>new vt({value:t,typeName:$.ZodLiteral,...z(e)});function xa(t,e){return new bt({values:t,typeName:$.ZodEnum,...z(e)})}var bt=class t extends V{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),s=this._def.values;return I(r,{expected:G.joinValues(s),received:r.parsedType,code:k.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),s=this._def.values;return I(r,{received:r.data,code:k.invalid_enum_value,options:s}),F}return pe(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(s=>!e.includes(s)),{...this._def,...r})}};bt.create=xa;var wt=class extends V{_parse(e){let r=G.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==N.string&&s.parsedType!==N.number){let n=G.objectValues(r);return I(s,{expected:G.joinValues(n),received:s.parsedType,code:k.invalid_type}),F}if(this._cache||(this._cache=new Set(G.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=G.objectValues(r);return I(s,{received:s.data,code:k.invalid_enum_value,options:n}),F}return pe(e.data)}get enum(){return this._def.values}};wt.create=(t,e)=>new wt({values:t,typeName:$.ZodNativeEnum,...z(e)});var et=class extends V{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.promise&&r.common.async===false)return I(r,{code:k.invalid_type,expected:N.promise,received:r.parsedType}),F;let s=r.parsedType===N.promise?r.data:Promise.resolve(r.data);return pe(s.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};et.create=(t,e)=>new et({type:t,typeName:$.ZodPromise,...z(e)});var ke=class extends V{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:l=>{I(s,l),l.fatal?r.abort():r.dirty();},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let l=n.transform(s.data,i);if(s.common.async)return Promise.resolve(l).then(async c=>{if(r.value==="aborted")return F;let a=await this._def.schema._parseAsync({data:c,path:s.path,parent:s});return a.status==="aborted"?F:a.status==="dirty"?lt(a.value):r.value==="dirty"?lt(a.value):a});{if(r.value==="aborted")return F;let c=this._def.schema._parseSync({data:l,path:s.path,parent:s});return c.status==="aborted"?F:c.status==="dirty"?lt(c.value):r.value==="dirty"?lt(c.value):c}}if(n.type==="refinement"){let l=c=>{let a=n.refinement(c,i);if(s.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(s.common.async===false){let c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?F:(c.status==="dirty"&&r.dirty(),l(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>c.status==="aborted"?F:(c.status==="dirty"&&r.dirty(),l(c.value).then(()=>({status:r.value,value:c.value}))))}if(n.type==="transform")if(s.common.async===false){let l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Je(l))return F;let c=n.transform(l.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:c}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>Je(l)?Promise.resolve(n.transform(l.value,i)).then(c=>({status:r.value,value:c})):F);G.assertNever(n);}};ke.create=(t,e,r)=>new ke({schema:t,typeName:$.ZodEffects,effect:e,...z(r)});ke.createWithPreprocess=(t,e,r)=>new ke({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...z(r)});var _e=class extends V{_parse(e){return this._getType(e)===N.undefined?pe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_e.create=(t,e)=>new _e({innerType:t,typeName:$.ZodOptional,...z(e)});var Ue=class extends V{_parse(e){return this._getType(e)===N.null?pe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ue.create=(t,e)=>new Ue({innerType:t,typeName:$.ZodNullable,...z(e)});var xt=class extends V{_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return r.parsedType===N.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};xt.create=(t,e)=>new xt({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...z(e)});var St=class extends V{_parse(e){let{ctx:r}=this._processInputParams(e),s={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Nt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new we(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new we(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};St.create=(t,e)=>new St({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...z(e)});var $t=class extends V{_parse(e){if(this._getType(e)!==N.nan){let s=this._getOrReturnCtx(e);return I(s,{code:k.invalid_type,expected:N.nan,received:s.parsedType}),F}return {status:"valid",value:e.data}}};$t.create=t=>new $t({typeName:$.ZodNaN,...z(t)});var Au=Symbol("zod_brand"),Jt=class extends V{_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}},Kt=class t extends V{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?F:i.status==="dirty"?(r.dirty(),lt(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?F:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,r){return new t({in:e,out:r,typeName:$.ZodPipeline})}},Ct=class extends V{_parse(e){let r=this._def.innerType._parse(e),s=n=>(Je(n)&&(n.value=Object.freeze(n.value)),n);return Nt(r)?r.then(n=>s(n)):s(r)}unwrap(){return this._def.innerType}};Ct.create=(t,e)=>new Ct({innerType:t,typeName:$.ZodReadonly,...z(e)});function ya(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Sa(t,e={},r){return t?Qe.create().superRefine((s,n)=>{let i=t(s);if(i instanceof Promise)return i.then(l=>{if(!l){let c=ya(e,s),a=c.fatal??r??true;n.addIssue({code:"custom",...c,fatal:a});}});if(!i){let l=ya(e,s),c=l.fatal??r??true;n.addIssue({code:"custom",...l,fatal:c});}}):Qe.create()}var Du={object:xe.lazycreate},$;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})($||($={}));var Pu=(t,e={message:`Input not instance of ${t.name}`})=>Sa(r=>r instanceof t,e),Ca=Ke.create,Ea=ct.create,Lu=$t.create,Fu=ut.create,_a=dt.create,$u=ht.create,Uu=Dt.create,Bu=ft.create,ju=pt.create,zu=Qe.create,Wu=He.create,Vu=De.create,qu=Pt.create,Hu=Ge.create,Gu=xe.create,Zu=xe.strictCreate,Yu=mt.create,Xu=Pr.create,Ju=gt.create,Ku=$e.create,Qu=Lr.create,ed=Lt.create,td=Ft.create,rd=Fr.create,sd=yt.create,nd=vt.create,id=bt.create,od=wt.create,ad=et.create,ld=ke.create,cd=_e.create,ud=Ue.create,dd=ke.createWithPreprocess,hd=Kt.create,fd=()=>Ca().optional(),pd=()=>Ea().optional(),md=()=>_a().optional(),gd={string:(t=>Ke.create({...t,coerce:true})),number:(t=>ct.create({...t,coerce:true})),boolean:(t=>dt.create({...t,coerce:true})),bigint:(t=>ut.create({...t,coerce:true})),date:(t=>ht.create({...t,coerce:true}))};var yd=F;var vd=q.object({type:q.nativeEnum(be),timestamp:q.number().int().nonnegative(),data:q.unknown()}),bd=q.object({browser:q.string(),browserVersion:q.string(),os:q.string(),osVersion:q.string(),deviceType:q.enum(["desktop","mobile","tablet","unknown"]),userAgent:q.string().max(1024),platform:q.enum(["web","ios","android"]).optional()}),wd=q.object({entryUrl:q.string().url().max(2048),currentUrl:q.string().url().max(2048),referrer:q.string().max(2048),device:bd,screen:q.object({width:q.number().int().nonnegative(),height:q.number().int().nonnegative(),dpr:q.number().nonnegative()}),language:q.string().max(35),timezone:q.string().max(64),environment:q.enum(["production","staging","development"]),releaseVersion:q.string().max(128).optional(),sdkVersion:q.string().max(32)});q.object({v:q.literal(1),projectId:q.string().min(1).max(64),sessionId:q.string().uuid(),seq:q.number().int().nonnegative(),anonymousId:q.string().min(1).max(64),userId:q.string().max(256).optional(),userTraits:q.record(q.unknown()).optional(),events:q.array(vd).min(1).max(5e3),meta:wd,sentAt:q.number().int().nonnegative()});function Ln(t){let e=/Edg\/|EdgiOS\//.test(t)?"Edge":/OPR\/|OPiOS\//.test(t)?"Opera":/Chrome\/|CriOS\//.test(t)?"Chrome":/Firefox\/|FxiOS\//.test(t)?"Firefox":/Safari\//.test(t)?"Safari":"Unknown",r=t.match(/(?:EdgiOS|Edg|OPiOS|OPR|CriOS|Chrome|FxiOS|Firefox|Version)\/(\d+)/)?.[1]??"0",s=/Windows/.test(t)?"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/Mac OS X|Macintosh/.test(t)?"macOS":/Linux/.test(t)?"Linux":"Unknown",n=/iPad|Tablet/.test(t)||/Android/.test(t)&&!/Mobi/.test(t)?"tablet":/Mobi|Android|iPhone|iPod/.test(t)?"mobile":"desktop",i=(t.match(/(?:iPhone OS|CPU OS) ([\d_]+)/)?.[1]??t.match(/(?:Windows NT|Mac OS X|Android) ([\d._]+)/)?.[1]??"").replace(/_/g,".");return {browser:e,browserVersion:r,os:s,osVersion:i,deviceType:n,userAgent:t.slice(0,1024)}}var Sd=new Set(["password","email","tel","number","hidden"]),Cd=["cc-number","cc-csc","cc-exp","cc-name","current-password","new-password","one-time-code"],Ed=/(pass(word)?|card|cvv|cvc|ccv|iban|ssn|tckn|national|secret|token|pin)/i;function Ra(t){if(t instanceof HTMLInputElement&&Sd.has(t.type))return true;let e=t.getAttribute("autocomplete")?.toLowerCase()??"";if(Cd.some(s=>e.includes(s)))return true;let r=`${t.getAttribute("name")??""} ${t.id??""} ${t.getAttribute("aria-label")??""}`;return Ed.test(r)}var ka="0123456789abcdef";function Ma(t){let e=new Uint8Array(t),r=globalThis.crypto;if(r?.getRandomValues)r.getRandomValues(e);else for(let n=0;n<t;n++)e[n]=Math.floor(Math.random()*256);let s="";for(let n of e)s+=ka[n>>4&15]+ka[n&15];return s}function Ta(){let t=Ma(16);return t==="0".repeat(32)?Ta():t}function Oa(){let t=Ma(8);return t==="0".repeat(16)?Oa():t}function _d(t,e,r=true){return `00-${t}-${e}-${r?"01":"00"}`}function Fn(t,e,r){let s;try{s=new URL(t,r);}catch{return true}return s.origin===r?true:e.some(n=>typeof n=="string"?s.href.includes(n):n.test(s.href))}function $n(t){let e=Ta();return {traceId:e,traceparent:_d(e,Oa()),baggage:`replayops.session_id=${encodeURIComponent(t)}`}}function Me(t,e){return {type:be.Plugin,timestamp:Date.now(),data:{plugin:t,payload:e}}}function Na(t){let e=["log","info","warn","error","debug"],r={};for(let s of e)r[s]=console[s].bind(console),console[s]=(...n)=>{t(Me(fe.Console,{level:s,args:n.map(kd).slice(0,10)})),r[s](...n);};return ()=>{for(let s of e)console[s]=r[s];}}function Aa(t){let e=s=>{let n=s.target,i=n&&n!==s.currentTarget?n.src||n.href:void 0;if(!s.message&&i){t(Me(fe.Error,{kind:"resource",message:"Failed to load resource",source:i}));return}s.message&&t(Me(fe.Error,{kind:"error",message:s.message,source:s.filename,line:s.lineno,column:s.colno,stack:s.error?.stack?.slice(0,4e3)}));},r=s=>t(Me(fe.Error,{kind:"unhandledrejection",message:String(s.reason?.message??s.reason),stack:s.reason?.stack?.slice(0,4e3)}));return window.addEventListener("error",e,true),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",e,true),window.removeEventListener("unhandledrejection",r);}}function Da(t,e,r={}){let s=!!r.bodies,n=r.selfEndpoint?r.selfEndpoint.replace(/\/$/,""):void 0,i=f=>{if(!n)return false;try{return new URL(f,location.href).href.startsWith(n)}catch{return f.startsWith(n)}},l=window.fetch;window.fetch=async(...f)=>{let g=Date.now(),x=typeof f[0]=="string"?f[0]:f[0].url;if(i(x))return l(...f);let v=(f[1]?.method??f[0]?.method??"GET").toUpperCase(),w=e?Rd(f,x,e):void 0,C={};if(s){let b=Od(f[1]?.headers??(f[0]instanceof Request?f[0].headers:void 0)),y=typeof f[1]?.body=="string"?f[1].body:void 0;C=Ia(y,b);}try{let b=await l(...f),y={};return s&&(y=await Nd(b)),t(Me(fe.Network,{type:"fetch",url:x,method:v,status:b.status,durationMs:Date.now()-g,...w?{traceId:w}:{},...C,...y})),b}catch(b){throw t(Me(fe.Network,{type:"fetch",url:x,method:v,status:0,error:String(b),durationMs:Date.now()-g,...w?{traceId:w}:{},...C})),b}};let a=window.XMLHttpRequest.prototype,h=a.open,o=a.send,p=a.setRequestHeader;a.open=function(f,g,...x){return this.__ro={method:f,url:g,started:0,reqHeaders:{}},h.call(this,f,g,...x)},a.setRequestHeader=function(f,g){let x=this.__ro;return x&&s&&(x.reqHeaders[f]=g),p.call(this,f,g)},a.send=function(...f){let g=this.__ro,x={};if(g){if(g.started=Date.now(),s){let v=typeof f[0]=="string"?f[0]:void 0;x=Ia(v,Ur(g.reqHeaders));}if(e&&Fn(g.url,e.targets,location.origin)){let v=$n(e.sessionId);try{this.setRequestHeader("traceparent",v.traceparent),this.setRequestHeader("baggage",v.baggage),g.traceId=v.traceId;}catch{}}}return this.addEventListener("loadend",()=>{if(!g||i(g.url))return;let v={};if(s){let w=this.getResponseHeader("content-type")??void 0,C=this.responseType===""||this.responseType==="text"?this.responseText:void 0;v={...C!=null?{resBody:Un(Bn(C,w))}:{},resHeaders:Id(this.getAllResponseHeaders())};}t(Me(fe.Network,{type:"xhr",url:g.url,method:g.method,status:this.status,durationMs:Date.now()-g.started,...g.traceId?{traceId:g.traceId}:{},...x,...v}));}),o.apply(this,f)};let d=1500,u=0,m;try{m=new PerformanceObserver(f=>{for(let g of f.getEntries()){if(u>=d)return;let x=g.initiatorType;x==="fetch"||x==="xmlhttprequest"||g.name.startsWith("data:")||i(g.name)||(u++,t({type:be.Plugin,timestamp:Math.round(performance.timeOrigin+g.startTime+g.duration),data:{plugin:fe.Network,payload:{type:"resource",initiator:x,url:g.name,status:g.responseStatus??0,durationMs:Math.round(g.duration),...g.transferSize?{sizeBytes:g.transferSize}:{}}}}));}}),m.observe({type:"resource",buffered:!0});}catch{}return ()=>{window.fetch=l,a.open=h,a.send=o,a.setRequestHeader=p,m?.disconnect();}}function Rd(t,e,r){if(!Fn(e,r.targets,location.origin))return;let s=$n(r.sessionId);if(t[0]instanceof Request){let l=new Headers(t[0].headers);return l.set("traceparent",s.traceparent),l.set("baggage",s.baggage),t[0]=new Request(t[0],{headers:l}),s.traceId}let n=t[1]??={},i=new Headers(n.headers);return i.set("traceparent",s.traceparent),i.set("baggage",s.baggage),n.headers=i,s.traceId}function Pa(t){let e=new PerformanceObserver(r=>{for(let s of r.getEntries())(s.entryType==="longtask"||s.entryType==="navigation")&&t(Me(fe.Performance,{entryType:s.entryType,name:s.name,startTime:Math.round(s.startTime),duration:Math.round(s.duration)}));});try{e.observe({entryTypes:["longtask","navigation"]});}catch{}return ()=>e.disconnect()}function La(t){let e=[],r=(n,i)=>{try{let l=new PerformanceObserver(c=>c.getEntries().forEach(i));l.observe({type:n,buffered:!0}),e.push(()=>l.disconnect());}catch{}};r("largest-contentful-paint",n=>t(Me(fe.WebVitals,{metric:"LCP",value:Math.round(n.startTime)}))),r("first-input",n=>{let i=n.processingStart-n.startTime;t(Me(fe.WebVitals,{metric:"FID",value:Math.round(i)}));});let s=0;return r("layout-shift",n=>{let i=n;i.hadRecentInput||(s+=i.value,t(Me(fe.WebVitals,{metric:"CLS",value:Number(s.toFixed(4))})));}),()=>e.forEach(n=>n())}function kd(t){try{return typeof t=="string"?t:JSON.stringify(t)}catch{return String(t)}}var $r=8192,Md=/^(authorization|cookie|set-cookie|proxy-authorization|x-api-key|x-auth-token|x-csrf-token)$/i,Td=/(pass|secret|token|auth|credit|card|cvv|ssn|api[-_]?key)/i;function Un(t){return t.length>$r?`${t.slice(0,$r)}\u2026[truncated]`:t}function Bn(t,e){if(!(e&&/json/i.test(e)||/^\s*[[{]/.test(t)))return t;try{let s=n=>{if(Array.isArray(n))return n.map(s);if(n&&typeof n=="object"){let i={};for(let l of Object.keys(n))i[l]=Td.test(l)?"***":s(n[l]);return i}return n};return JSON.stringify(s(JSON.parse(t)))}catch{return t}}function Od(t){let e={};return t?(new Headers(t).forEach((r,s)=>e[s]=r),Ur(e)):e}function Ur(t){let e={};for(let r of Object.keys(t))e[r]=Md.test(r)?"***":t[r];return e}function Id(t){let e={};for(let r of t.trim().split(/\r?\n/)){let s=r.indexOf(":");s>0&&(e[r.slice(0,s).trim()]=r.slice(s+1).trim());}return Ur(e)}function Ia(t,e,r){let s={reqHeaders:e};if(t!=null){s.reqBody=Un(Bn(t,e["content-type"]));let n=Dd(t);n&&Object.assign(s,n);}return s}async function Nd(t){let e={resHeaders:Ad(t.headers)},r=t.headers.get("content-type")??"",s=Number(t.headers.get("content-length")??0);if((/json|text|xml|javascript|graphql/i.test(r)||!r&&s>0&&s<$r*8)&&s<$r*8)try{let i=await t.clone().text();e.resBody=Un(Bn(i,r));}catch{}return e}function Ad(t){let e={};return t.forEach((r,s)=>e[s]=r),Ur(e)}function Dd(t){try{let e=JSON.parse(t),r=Array.isArray(e)?e[0]:e,s=r?.query;if(typeof s!="string")return;let n=s.match(/\b(query|mutation|subscription)\b\s+([A-Za-z0-9_]+)?/),i=typeof r.operationName=="string"?r.operationName:n?.[2];return {operationType:n?.[1]??"query",...i?{operationName:i}:{}}}catch{return}}function Fa(t){let e=0,r=0,s=()=>{e++,r=requestAnimationFrame(s);};r=requestAnimationFrame(s);let n=setInterval(()=>{let i=performance.memory;t(Me(fe.Performance,{sample:true,fps:e/2,domNodes:document.getElementsByTagName("*").length,...i?{memoryMB:Math.round(i.usedJSHeapSize/1048576*10)/10}:{}})),e=0;},2e3);return ()=>{clearInterval(n),cancelAnimationFrame(r);}}var Br=class{constructor(e,r,s=""){this.config=e;this.emit=r;this.sessionId=s;}config;emit;sessionId;stopFns=[];rrwebStop;start(){this.beginRecording();}beginRecording(){if(this.rrwebStop)return;let e=["[data-mask]","[data-private]",...this.config.maskSelectors].filter(Boolean).join(","),r=["[data-ignore]",...this.config.ignoreSelectors].filter(Boolean).join(",");if(this.rrwebStop=Le({emit:s=>this.emit(s),checkoutEveryNms:6e4,maskAllInputs:this.config.maskInputs,maskTextSelector:e||void 0,blockSelector:r||void 0,maskInputFn:(s,n)=>this.config.maskInputs||Ra(n)?"\u2022".repeat(s.length):s,recordCanvas:false,sampling:{mousemove:true,scroll:150,input:"last"}}),this.config.recordConsole&&this.stopFns.push(Na(this.emit)),this.config.recordErrors&&this.stopFns.push(Aa(this.emit)),this.config.recordNetwork){let s=this.config.tracePropagation&&this.sessionId?{sessionId:this.sessionId,targets:this.config.tracePropagationTargets}:void 0;this.stopFns.push(Da(this.emit,s,{bodies:this.config.recordNetworkBodies,selfEndpoint:this.config.endpoint}));}this.config.capturePerformance&&this.stopFns.push(Pa(this.emit)),this.config.captureMemory&&this.stopFns.push(Fa(this.emit)),this.config.captureWebVitals&&this.stopFns.push(La(this.emit));}emitCustom(e,r){this.emit({type:be.Custom,timestamp:Date.now(),data:{tag:e,payload:r}});}takeFullSnapshot(){try{Le.takeFullSnapshot(!0);}catch{}}stop(){this.rrwebStop?.(),this.rrwebStop=void 0;for(let e of this.stopFns)e();this.stopFns=[];}};var jr=class t{constructor(e,r){this.sessionId=e;this.opts=r;this.url=`${r.endpoint.replace(/\/$/,"")}/v1/collect`;}sessionId;opts;buffer=[];seq=0;timer;url;start(){this.timer=setInterval(()=>this.flush(),this.opts.flushIntervalMs),window.addEventListener("pagehide",this.flushBeacon),document.addEventListener("visibilitychange",this.onVisibility);}enqueue(e){this.buffer.push(e),(e.type===be.FullSnapshot||this.buffer.length>=this.opts.batchSize)&&this.flush();}stop(){this.timer&&clearInterval(this.timer),window.removeEventListener("pagehide",this.flushBeacon),document.removeEventListener("visibilitychange",this.onVisibility),this.flushBeacon();}onVisibility=()=>{document.visibilityState==="hidden"&&this.flushBeacon();};drain(){if(this.buffer.length===0)return null;let e=this.buffer;this.buffer=[];let r=this.opts.getIdentity();return {v:1,projectId:this.opts.projectId,sessionId:this.sessionId,seq:this.seq++,anonymousId:r.anonymousId,userId:r.userId,userTraits:r.userTraits,events:e,meta:this.opts.getMeta(),sentAt:Date.now()}}static GZIP_THRESHOLD_BYTES=64*1024;preferPlain=false;static GZIP_DEADLINE_MS=2e3;async encodeBody(e){if(this.preferPlain||e.length<t.GZIP_THRESHOLD_BYTES||typeof CompressionStream>"u")return {body:e};try{let r=await new Promise(s=>{let n=setTimeout(()=>s(null),t.GZIP_DEADLINE_MS);try{let i=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));new Response(i).blob().then(l=>{clearTimeout(n),s(l);}).catch(()=>{clearTimeout(n),s(null);});}catch{clearTimeout(n),s(null);}});return r?{body:r,encoding:"gzip"}:(this.preferPlain=!0,{body:e})}catch{return {body:e}}}async flush(){let e=this.drain();if(!e)return;let{body:r,encoding:s}=await this.encodeBody(JSON.stringify(e));try{let n=await fetch(this.url,{method:"POST",headers:{"content-type":"application/json",...s?{"content-encoding":s}:{},"x-api-key":this.opts.apiKey},body:r,credentials:"omit",mode:"cors",signal:typeof AbortSignal<"u"&&"timeout"in AbortSignal?AbortSignal.timeout(6e4):void 0});n.ok||(s?(this.preferPlain=!0,this.buffer.unshift(...e.events),this.seq--):n.status===429||n.status>=500?(this.buffer.unshift(...e.events),this.seq--):console.warn(`[replayops] collector rejected batch seq=${e.seq} with ${n.status}`+(n.status===413?" \u2014 payload too large; this session may not be replayable. Raise the ingest body limit.":"")));}catch{s&&(this.preferPlain=true),this.buffer.unshift(...e.events),this.seq--;}}flushBeacon=()=>{let e=this.drain();e&&fetch(this.url,{method:"POST",headers:{"content-type":"application/json","x-api-key":this.opts.apiKey},body:JSON.stringify(e),keepalive:true,credentials:"omit",mode:"cors"}).catch(()=>{});}};var $a=["#ef4444","#f59e0b","#22c55e","#3b82f6"],zr=null;function Pd(t){let e=window;return e.html2canvas?Promise.resolve(e.html2canvas):zr||(zr=new Promise((r,s)=>{let n=document.createElement("script");n.src=`${t}/sdk/v1/html2canvas.min.js`,n.async=true,n.onload=()=>e.html2canvas?r(e.html2canvas):s(new Error("html2canvas missing")),n.onerror=()=>s(new Error("html2canvas failed to load")),document.head.appendChild(n);}),zr)}var jn=null;async function Ua(t){if(jn)return;let e=t.endpoint.replace(/\/$/,""),r=await $d();if(!r){let n=Te("","position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:2147483646;background:#111827;color:#fff;font:600 13px system-ui,sans-serif;padding:8px 14px;border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.3)");n.textContent="\u{1F41E} Capturing the screen\u2026",n.setAttribute("data-ignore",""),document.body.appendChild(n);try{r=await(await Pd(e))(document.documentElement,{backgroundColor:"#ffffff",useCORS:!0,logging:!1,scale:Math.min(2,window.devicePixelRatio||1),ignoreElements:l=>l instanceof HTMLElement&&l.hasAttribute("data-ignore"),x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,windowWidth:document.documentElement.scrollWidth,windowHeight:document.documentElement.scrollHeight});}catch{n.remove(),ja(e,t,null);return}n.remove();}let s=Wd(r,1600);Ud(e,t,s);}var tt=null;function Ld(t){return !!t&&t.getVideoTracks().some(e=>e.readyState==="live")}async function Fd(t){if(Ld(tt))return tt;tt=null;try{let e=await t.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"});return e.getVideoTracks().forEach(r=>r.onended=()=>{tt===e&&(tt=null);}),tt=e,e}catch{return null}}async function $d(){let t=navigator.mediaDevices;if(!t?.getDisplayMedia)return null;let e=await Fd(t);if(!e)return null;let r=document.createElement("style");r.setAttribute("data-ignore",""),r.textContent="[data-ignore]{visibility:hidden !important}",document.head.appendChild(r);try{let s=document.createElement("video");s.srcObject=e,s.muted=!0,await s.play(),await new Promise(c=>setTimeout(c,200));let n=s.videoWidth||window.innerWidth,i=s.videoHeight||window.innerHeight,l=document.createElement("canvas");return l.width=n,l.height=i,l.getContext("2d").drawImage(s,0,0,n,i),s.srcObject=null,l}catch{return null}finally{r.remove();}}function Ba(){tt?.getTracks().forEach(t=>t.stop()),tt=null;}function Ud(t,e,r){let s=document.createElement("style");s.setAttribute("data-ignore",""),s.textContent="@media (max-width:760px){.ro-tester-root{flex-direction:column !important}.ro-tester-stage{flex:1 1 45% !important;min-height:0;padding:8px !important}.ro-tester-panel{width:100% !important;flex:1 1 55% !important;min-height:0}}",document.head.appendChild(s);let n=Te("ro-tester-root","position:fixed;inset:0;z-index:2147483646;background:rgba(15,23,42,.82);display:flex;font-family:system-ui,-apple-system,sans-serif");n.setAttribute("data-ignore","");let i=Te("ro-tester-stage","flex:1;min-width:0;display:grid;place-items:center;padding:16px;overflow:auto"),l=document.createElement("canvas");l.width=r.width,l.height=r.height,l.style.cssText="max-width:100%;max-height:100%;box-shadow:0 8px 40px rgba(0,0,0,.5);cursor:crosshair;touch-action:none;background:#fff",i.appendChild(l);let c=l.getContext("2d"),a=[],h="rect",o=$a[0],p=null,d=()=>Math.max(2,Math.round(l.width/320)),u=()=>Math.max(16,Math.round(l.width/40)),m=P=>{if(c.strokeStyle=P.color,c.fillStyle=P.color,c.lineWidth=d(),c.lineJoin=c.lineCap="round",P.tool==="text"){let U=P.points[0];U&&P.text&&(c.font=`700 ${u()}px system-ui,sans-serif`,c.textBaseline="top",P.text.split(`
129
- `).forEach((J,ue)=>c.fillText(J,U.x,U.y+ue*u()*1.25)));return}if(P.tool==="pen"){c.beginPath(),P.points.forEach((U,J)=>J?c.lineTo(U.x,U.y):c.moveTo(U.x,U.y)),c.stroke();return}if(P.points.length<2)return;let W=P.points[0],L=P.points[P.points.length-1];if(P.tool==="rect")c.strokeRect(W.x,W.y,L.x-W.x,L.y-W.y);else {c.beginPath(),c.moveTo(W.x,W.y),c.lineTo(L.x,L.y),c.stroke();let U=Math.atan2(L.y-W.y,L.x-W.x),J=d()*4;c.beginPath(),c.moveTo(L.x,L.y),c.lineTo(L.x-J*Math.cos(U-Math.PI/6),L.y-J*Math.sin(U-Math.PI/6)),c.lineTo(L.x-J*Math.cos(U+Math.PI/6),L.y-J*Math.sin(U+Math.PI/6)),c.closePath(),c.fill();}},f=()=>{c.clearRect(0,0,l.width,l.height),c.drawImage(r,0,0),a.forEach(m),p&&m(p);};f();let g=P=>{let W=l.getBoundingClientRect();return {x:(P.clientX-W.left)/W.width*l.width,y:(P.clientY-W.top)/W.height*l.height}};l.addEventListener("pointerdown",P=>{if(h==="text"){P.preventDefault();let W=g(P);zd(P.clientX,P.clientY,o,L=>{L.trim()&&(a.push({tool:"text",color:o,points:[W],text:L}),f());});return}l.setPointerCapture(P.pointerId),p={tool:h,color:o,points:[g(P)]};}),l.addEventListener("pointermove",P=>{if(!p)return;let W=g(P);p.tool==="pen"?p.points.push(W):p.points[1]=W,f();}),l.addEventListener("pointerup",()=>{if(!p)return;let P=p;p=null,(P.tool==="pen"?P.points.length>1:P.points.length>=2)&&a.push(P),f();});let x=Te("ro-tester-panel","width:320px;flex-shrink:0;background:#fff;display:flex;flex-direction:column;color:#0f172a;min-height:0");x.innerHTML='<div style="padding:14px 16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #e2e8f0"><span style="font-size:18px">\u{1F41E}</span><b style="font-size:16px">Tester mode</b></div>';let v=Te("","padding:14px 16px;overflow-y:auto;flex:1");x.appendChild(v);let w=Te("","display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px"),C={};[["rect","\u25AD"],["arrow","\u2197"],["pen","\u270E"],["text","T"]].forEach(([P,W])=>{let L=Qt(W,"width:34px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font-size:15px;cursor:pointer");L.onclick=()=>{h=P,Object.values(C).forEach(U=>U.style.background="#fff"),L.style.background="#e0e7ff";},C[P]=L,w.appendChild(L);}),C.rect.style.background="#e0e7ff",$a.forEach(P=>{let W=Te("",`width:22px;height:22px;border-radius:50%;background:${P};cursor:pointer;border:2px solid ${P===o?"#fff":"transparent"};outline:2px solid ${P===o?P:"transparent"}`);W.onclick=()=>{o=P,[...w.querySelectorAll("[data-swatch]")].forEach(L=>{L.style.border="2px solid transparent",L.style.outline="2px solid transparent";}),W.style.border="2px solid #fff",W.style.outline=`2px solid ${P}`;},W.setAttribute("data-swatch",""),w.appendChild(W);});let b=Qt("\u21B6","margin-left:auto;width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");b.onclick=()=>{a.pop(),f();};let y=Qt("\u{1F5D1}","width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");y.onclick=()=>{a.length=0,f();},w.append(b,y),v.appendChild(w);let S=document.createElement("textarea");S.placeholder="What's wrong on this page? (optional \u2014 AI will draft it)",S.style.cssText="width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;min-height:90px;resize:vertical";let _=Te("","font-size:12px;color:#64748b;margin-top:10px;word-break:break-all"),T=document.createElement("b");T.style.color="#334155",T.textContent="URL ",_.append(T,document.createTextNode(location.href)),v.append(jd("What's wrong?",S),_);let R=Te("","display:flex;gap:8px;padding:14px 16px;border-top:1px solid #e2e8f0"),j=Qt("Cancel","flex:1;padding:10px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font:inherit;cursor:pointer"),D=Qt("Open ticket","flex:1;padding:10px;border:0;background:#0d9488;color:#fff;border-radius:8px;font:600 14px system-ui;cursor:pointer");R.append(j,D),x.appendChild(R),n.append(i,x),document.body.appendChild(n);let E=()=>{n.remove(),s.remove(),jn=null;};jn=E,j.onclick=E,D.onclick=()=>{D.disabled=true,D.textContent="Opening\u2026";let P=l.toDataURL("image/jpeg",.85);ja(t,e,{title:"",note:S.value.trim(),screenshot:P}),E();};}function ja(t,e,r){let s=new URLSearchParams({key:e.apiKey,url:location.href,sid:e.sessionId}),n=`${t}/tester-report.html?${s.toString()}`,i=window.open(n,"replayops-tester","width=480,height=680");if(!i){Bd(n);return}if(!r)return;let l=c=>{c.origin!==t||!c.data||c.data.type!=="ro-tester:popup-ready"||(window.removeEventListener("message",l),i.postMessage({type:"ro-tester:payload",...r},t));};window.addEventListener("message",l);}function Bd(t){let e=Te("","position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483647;max-width:min(420px,calc(100vw - 32px));background:#0f172a;color:#fff;padding:14px 16px;border-radius:12px;font:14px system-ui;box-shadow:0 12px 40px rgba(0,0,0,.35)");e.setAttribute("data-ignore","");let r=document.createElement("div");r.textContent="ReplayOps could not open the report window \u2014 your browser or app blocked it.";let s=document.createElement("a");s.href=t,s.target="_blank",s.rel="noopener",s.textContent="Open the report form",s.style.cssText="color:#5eead4;display:inline-block;margin-top:8px",e.append(r,s),document.body.appendChild(e),setTimeout(()=>e.remove(),12e3);}function Te(t,e){let r=document.createElement("div");return t&&(r.className=t),r.style.cssText=e,r}function Qt(t,e){let r=document.createElement("button");return r.type="button",r.textContent=t,r.style.cssText=e,r}function jd(t,e){let r=Te("","margin-bottom:4px"),s=Te("","font-size:12px;font-weight:700;color:#475569;margin:8px 0 4px");return s.textContent=t,r.append(s,e),r}function zd(t,e,r,s){let n=document.createElement("input");n.setAttribute("data-ignore",""),n.placeholder="Type, then Enter";let i=Math.min(t,window.innerWidth-180),l=Math.min(e,window.innerHeight-40);n.style.cssText=`position:fixed;left:${i}px;top:${l}px;z-index:2147483647;font:700 15px system-ui;color:${r};background:rgba(255,255,255,.98);border:2px solid ${r};border-radius:4px;padding:4px 8px;outline:none;min-width:140px;box-shadow:0 4px 16px rgba(0,0,0,.25)`;let c=false,a=()=>{if(c)return;c=true;let h=n.value;n.remove(),s(h);};n.addEventListener("keydown",h=>{h.stopPropagation(),h.key==="Enter"&&(h.preventDefault(),a()),h.key==="Escape"&&(n.value="",a());}),document.body.appendChild(n),setTimeout(()=>{n.focus(),setTimeout(()=>n.addEventListener("blur",a),60);},0);}function Wd(t,e){if(t.width<=e)return t;let r=e/t.width,s=document.createElement("canvas");return s.width=e,s.height=Math.round(t.height*r),s.getContext("2d").drawImage(t,0,0,s.width,s.height),s}var Vd=1e4,qd=3e3;function Hd(){let t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}var Wr=class{constructor(e){this.opts=e;}opts;ws;heartbeat;watching=false;closed=false;claim=Hd();lifecycleOff=[];widget;control;start(){this.opts.chat&&(this.widget=new zn(e=>this.sendChat(e),()=>this.openTesterMode())),this.connect(),this.patchHistory(),this.watchLifecycle();}watchLifecycle(){let e=()=>{if(this.closed)return;let i=this.ws?.readyState;i===WebSocket.OPEN||i===WebSocket.CONNECTING||this.connect();},r=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close();},s=()=>document.visibilityState==="visible"?e():void 0,n=(i,l,c)=>{i.addEventListener(l,c),this.lifecycleOff.push(()=>i.removeEventListener(l,c));};n(window,"pagehide",r),n(window,"pageshow",e),n(window,"online",e),n(document,"visibilitychange",s);}openTesterMode(){Ua({endpoint:this.opts.endpoint,apiKey:this.opts.apiKey,sessionId:this.opts.sessionId});}feedEvent(e){this.watching&&this.send({t:"evt",e});}stop(){this.closed=true;for(let e of this.lifecycleOff)e();this.lifecycleOff=[],this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close(),this.widget?.destroy(),Ba(),this.endControl();}wsUrl(){return `${this.opts.endpoint.replace(/^http/,"ws").replace(/\/$/,"")}/ws/live?key=${encodeURIComponent(this.opts.apiKey)}`}connect(){if(this.closed)return;let e=this.ws?.readyState;if(e===WebSocket.OPEN||e===WebSocket.CONNECTING)return;let r;try{r=new WebSocket(this.wsUrl());}catch{return}this.ws=r,r.onopen=()=>{this.send({t:"hello",sessionId:this.opts.sessionId,claim:this.claim,url:location.href,identity:this.opts.getIdentity(),meta:this.opts.getMeta()}),this.heartbeat=setInterval(()=>this.send({t:"ping"}),Vd);},r.onmessage=s=>{let n;try{n=JSON.parse(String(s.data));}catch{return}n.t==="watch"?(this.watching=!!n.on,n.on?(this.send({t:"evt",e:{type:4,timestamp:Date.now(),data:{href:location.href,width:window.innerWidth,height:window.innerHeight}}}),this.opts.onWatchStart()):this.endControl()):n.t==="chat"&&typeof n.text=="string"?this.widget?.receive(n.text):n.t==="control-request"?this.onControlRequest():n.t==="control-cmd"&&n.cmd?this.control?.apply(n.cmd):n.t==="control-end"&&this.endControl();},r.onclose=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.watching=false,this.closed||setTimeout(()=>this.connect(),qd);},r.onerror=()=>r.close();}sendChat(e){this.send({t:"chat",text:e});}onControlRequest(){this.opts.remoteControl===false||this.control||Gd(()=>this.grantControl(),()=>this.send({t:"control",on:false}));}grantControl(){this.control||(this.send({t:"control",on:true}),this.control=new Wn(()=>{this.send({t:"control",on:false}),this.endControl();}));}endControl(){this.control?.destroy(),this.control=void 0;}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e));}patchHistory(){let e=()=>this.send({t:"nav",url:location.href}),r=s=>{let n=history[s];history[s]=function(...i){let l=n.apply(this,i);return e(),l};};r("pushState"),r("replaceState"),window.addEventListener("popstate",e);}},zn=class{constructor(e,r){this.onSend=e;Vn(),this.root=oe("div","ro-live-root"),this.root.setAttribute("data-ignore","");let s=oe("button","ro-live-launcher");s.setAttribute("aria-label","Chat"),s.innerHTML="\u{1F4AC}",this.badge=oe("span","ro-live-badge"),this.badge.style.display="none",s.appendChild(this.badge),s.onclick=()=>this.toggle(),this.panel=oe("div","ro-live-panel");let n=oe("div","ro-live-header");n.textContent="Chat with us",this.log=oe("div","ro-live-log");let i=oe("form","ro-live-form"),l=oe("input","ro-live-input");l.placeholder="Type a message\u2026";let c=oe("button","ro-live-send");if(c.type="submit",c.textContent="Send",i.append(l,c),i.onsubmit=a=>{a.preventDefault();let h=l.value.trim();h&&(l.value="",this.append(h,"me"),this.onSend(h));},this.panel.append(n,this.log,i),this.panel.style.display="none",this.root.append(this.panel,s),r){let a=oe("button","ro-live-tester-launcher");a.type="button",a.setAttribute("aria-label","Report a bug (tester)"),a.title="Tester tools",a.textContent="\u{1F41E}",a.onclick=()=>r(),this.root.append(a);}document.body.appendChild(this.root);}onSend;root;panel;log;badge;open=false;toggle(){this.open=!this.open,this.panel.style.display=this.open?"flex":"none",this.open&&(this.badge.style.display="none",this.badge.textContent="");}receive(e){if(this.append(e,"agent"),!this.open){let r=(parseInt(this.badge.textContent||"0",10)||0)+1;this.badge.textContent=String(r),this.badge.style.display="grid";}}append(e,r){let s=oe("div",`ro-live-msg ro-live-${r}`);s.textContent=e,this.log.appendChild(s),this.log.scrollTop=this.log.scrollHeight;}destroy(){this.root.remove();}};function Gd(t,e){Vn();let r=oe("div","ro-ctl-consent");r.setAttribute("data-ignore","");let s=oe("div","ro-ctl-card");s.innerHTML='<div class="ro-ctl-title">Allow support to control your screen?</div><div class="ro-ctl-body">A support agent is asking to take control of this page to help you. They can move your cursor, click, scroll and type. You can stop this at any time.</div>';let n=oe("div","ro-ctl-actions"),i=oe("button","ro-ctl-btn ro-ctl-decline");i.textContent="Not now";let l=oe("button","ro-ctl-btn ro-ctl-allow");l.textContent="Allow control",n.append(i,l),s.appendChild(n),r.appendChild(s),document.body.appendChild(r);let c=()=>r.remove();i.onclick=()=>{c(),e();},l.onclick=()=>{c(),t();};}var Wn=class{constructor(e){this.onStop=e;Vn(),this.banner=oe("div","ro-ctl-banner"),this.banner.setAttribute("data-ignore","");let r=oe("span","ro-ctl-banner-text");r.textContent="A support agent is controlling your screen";let s=oe("button","ro-ctl-stop");s.textContent="Stop",s.onclick=()=>this.onStop(),this.banner.append(r,s),this.cursor=oe("div","ro-ctl-cursor"),this.cursor.setAttribute("data-ignore",""),this.cursor.innerHTML='<span class="ro-ctl-cursor-label">Agent</span>',document.body.append(this.banner,this.cursor);}onStop;banner;cursor;apply(e){switch(e.c){case "cursor":this.moveCursor(e.x,e.y);break;case "click":this.moveCursor(e.x,e.y),this.clickAt(e.x*window.innerWidth,e.y*window.innerHeight);break;case "scroll":window.scrollBy({left:e.x,top:e.y,behavior:"auto"});break;case "key":this.typeKey(e.key);break;case "nav":e.url&&e.url!==location.href&&/^https?:\/\//i.test(e.url)&&(location.href=e.url);break}}moveCursor(e,r){this.cursor.style.left=`${e*window.innerWidth}px`,this.cursor.style.top=`${r*window.innerHeight}px`;}clickAt(e,r){let s=document.elementFromPoint(e,r);if(!s||this.isOurs(s))return;let n={bubbles:true,cancelable:true,clientX:e,clientY:r,view:window};s.dispatchEvent(new MouseEvent("mousedown",n)),s.dispatchEvent(new MouseEvent("mouseup",n)),s.dispatchEvent(new MouseEvent("click",n));let i=s.tagName;(i==="INPUT"||i==="TEXTAREA"||i==="SELECT"||s.isContentEditable)&&s.focus(),this.pulse(e,r);}typeKey(e){let r=document.activeElement;if(!(!r||this.isOurs(r)||!(r.tagName==="INPUT"||r.tagName==="TEXTAREA"))&&!(r.tagName==="INPUT"&&r.type==="password")){if(e==="Enter"){r.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:true})),r.form?.requestSubmit?.();return}if(e==="Backspace")r.value=r.value.slice(0,-1);else if(e.length===1)r.value+=e;else return;r.dispatchEvent(new Event("input",{bubbles:true})),r.dispatchEvent(new Event("change",{bubbles:true}));}}pulse(e,r){let s=oe("div","ro-ctl-pulse");s.setAttribute("data-ignore",""),s.style.left=`${e}px`,s.style.top=`${r}px`,document.body.appendChild(s),setTimeout(()=>s.remove(),600);}isOurs(e){return !!e.closest("[data-ignore]")}destroy(){this.banner.remove(),this.cursor.remove();}};function oe(t,e){let r=document.createElement(t);return r.className=e,r}var za=false;function Vn(){if(za)return;za=true;let t=document.createElement("style");t.setAttribute("data-ignore",""),t.textContent=`
130
- .ro-live-root{position:fixed;right:20px;bottom:20px;max-width:calc(100vw - 24px);z-index:2147483000;font-family:system-ui,-apple-system,sans-serif;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
128
+ `,No=typeof self<"u"&&self.Blob&&new Blob([_a],{type:"text/javascript;charset=utf-8"});function Ru(t){let e;try{if(e=No&&(self.URL||self.webkitURL).createObjectURL(No),!e)throw "";let r=new Worker(e,{name:t?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e);}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_a),{name:t?.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e);}}var vn=class{constructor(e){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",false),O(this,"locked",false),O(this,"processMutation",(o,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(h);});let{sampling:r="all",win:n,blockClass:s,blockSelector:i,recordCanvas:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&r==="all"&&this.initCanvasMutationObserver(n,s,i),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,s,i,{dataURLOptions:u});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,r,n,s,i){let l=Oo(r,n,s,true),u=new Map,o=new Ru;o.onmessage=m=>{let{id:p}=m.data;if(u.set(p,false),!("base64"in m.data))return;let{base64:g,type:x,width:y,height:b}=m.data;this.mutationCb({id:p,type:Tt["2D"],commands:[{property:"clearRect",args:[0,0,y,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:x}]},0,0]}]});};let h=1e3/e,a=0,f,d=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(p=>{ve(p,n,s,true)||m.push(p);}),m},c=m=>{if(a&&m-a<h){f=requestAnimationFrame(c);return}a=m,d().forEach(async p=>{var g;let x=this.mirror.getId(p);if(u.get(x)||p.width===0||p.height===0)return;if(u.set(x,true),["webgl","webgl2"].includes(p.__context)){let b=p.getContext(p.__context);((g=b?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let y=await createImageBitmap(p);o.postMessage({id:x,bitmap:y,width:p.width,height:p.height,dataURLOptions:i.dataURLOptions},[y]);}),f=requestAnimationFrame(c);};f=requestAnimationFrame(c),this.resetObservers=()=>{l(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=Oo(e,r,n,false),i=Cu(this.processMutation.bind(this),e,r,n),l=_u(this.processMutation.bind(this),e,r,n);this.resetObservers=()=>{s(),i(),l();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;let s=n.map(l=>{let{type:u,...o}=l;return o}),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:s}),this.pendingCanvasMutations.delete(e);}},bn=class{constructor(e){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new hn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,r){if(e.length===0)return;let n={id:r,styleIds:[]},s=[];for(let i of e){let l;this.styleMirror.has(i)?l=this.styleMirror.getId(i):(l=this.styleMirror.add(i),s.push({styleId:l,rules:Array.from(i.rules||CSSRule,(u,o)=>({rule:Uo(u,i.href),index:o}))})),n.styleIds.push(l);}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},wn=class{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",false);}inOtherBuffer(e,r){let n=this.nodeMap.get(e);return n&&Array.from(n).some(s=>s!==r)}add(e,r){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r));}destroy(){}},oe,mr,an,Cr=false;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((ci=t.contentWindow)==null?void 0:ci.Array.from)||Array.from,document.body.removeChild(t);}}catch(t){console.debug("Unable to override Array.from",t);}var Ie=Bl();function Fe(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,ignoreClass:l="rr-ignore",ignoreSelector:u=null,maskTextClass:o="rr-mask",maskTextSelector:h=null,inlineStylesheet:a=true,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:c,maskInputFn:m,maskTextFn:p,hooks:g,packFn:x,sampling:y={},dataURLOptions:b={},mousemoveWait:S,recordDOM:w=true,recordCanvas:v=false,recordCrossOriginIframes:C=false,recordAfter:_=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:T=false,collectFonts:R=false,inlineImages:z=false,plugins:D,keepIframeSrcFn:E=()=>false,ignoreCSSAttributes:me=new Set([]),errorHandler:L}=t;iu(L);let P=C?window.parent===window:true,F=false;if(!P)try{window.parent.document&&(F=!1);}catch{F=true;}if(P&&!e)throw new Error("emit function is required");if(!P&&!F)return ()=>{};S!==void 0&&y.mousemove===void 0&&(y.mousemove=S),Ie.reset();let q=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:d!==void 0?d:{password:true},te=Vo(c);eu();let ne,J=0,Ye=B=>{for(let ce of D||[])ce.eventProcessor&&(B=ce.eventProcessor(B));return x&&!F&&(B=x(B)),B};oe=(B,ce)=>{var K;let ie=B;if(ie.timestamp=Vt(),(K=rt[0])!=null&&K.isFrozen()&&ie.type!==X.FullSnapshot&&!(ie.type===X.IncrementalSnapshot&&ie.data.source===Y.Mutation)&&rt.forEach(Se=>Se.unfreeze()),P)e?.(Ye(ie),ce);else if(F){let Se={type:"rrweb",event:Ye(ie),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(Se,"*");}if(ie.type===X.FullSnapshot)ne=ie,J=0;else if(ie.type===X.IncrementalSnapshot){if(ie.data.source===Y.Mutation&&ie.data.isAttachIframe)return;J++;let Se=n&&J>=n,Q=r&&ie.timestamp-ne.timestamp>r;(Se||Q)&&mr(true);}};let M=B=>{oe({type:X.IncrementalSnapshot,data:{source:Y.Mutation,...B}});},Le=B=>oe({type:X.IncrementalSnapshot,data:{source:Y.Scroll,...B}}),Ce=B=>oe({type:X.IncrementalSnapshot,data:{source:Y.CanvasMutation,...B}}),Ut=B=>oe({type:X.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...B}}),ge=new bn({mutationCb:M,adoptedStyleSheetCb:Ut}),Oe=new gn({mirror:Ie,mutationCb:M,stylesheetManager:ge,recordCrossOriginIframes:C,wrappedEmit:oe});for(let B of D||[])B.getMirror&&B.getMirror({nodeMirror:Ie,crossOriginIframeMirror:Oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Oe.crossOriginIframeStyleMirror});let tt=new wn;an=new vn({recordCanvas:v,mutationCb:Ce,win:window,blockClass:s,blockSelector:i,mirror:Ie,sampling:y.canvas,dataURLOptions:b});let Ze=new yn({mutationCb:M,scrollCb:Le,bypassOptions:{blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:h,inlineStylesheet:a,maskInputOptions:q,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:v,inlineImages:z,sampling:y,slimDOMOptions:te,iframeManager:Oe,stylesheetManager:ge,canvasManager:an,keepIframeSrcFn:E,processedNodeManager:tt},mirror:Ie});mr=(B=false)=>{if(!w)return;oe({type:X.Meta,data:{href:window.location.href,width:ua(),height:ca()}},B),ge.reset(),Ze.init(),rt.forEach(K=>K.lock());let ce=uc(document,{mirror:Ie,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:h,inlineStylesheet:a,maskAllInputs:q,maskTextFn:p,maskInputFn:m,slimDOM:te,dataURLOptions:b,recordCanvas:v,inlineImages:z,onSerialize:K=>{fa(K,Ie)&&Oe.addIframe(K),pa(K,Ie)&&ge.trackLinkElement(K),dn(K)&&Ze.addShadowRoot(H.shadowRoot(K),document);},onIframeLoad:(K,ie)=>{Oe.attachIframe(K,ie),Ze.observeAttachShadow(K);},onStylesheetLoad:(K,ie)=>{ge.attachLinkElement(K,ie);},keepIframeSrcFn:E});if(!ce)return console.warn("Failed to snapshot the document");oe({type:X.FullSnapshot,data:{node:ce,initialOffset:la(window)}},B),rt.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ge.adoptStyleSheets(document.adoptedStyleSheets,Ie.getId(document));};try{let B=[],ce=ie=>{var Se;return Z(bu)({mutationCb:M,mousemoveCb:(Q,Kr)=>oe({type:X.IncrementalSnapshot,data:{source:Kr,positions:Q}}),mouseInteractionCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.MouseInteraction,...Q}}),scrollCb:Le,viewportResizeCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.ViewportResize,...Q}}),inputCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.Input,...Q}}),mediaInteractionCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.MediaInteraction,...Q}}),styleSheetRuleCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...Q}}),styleDeclarationCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...Q}}),canvasMutationCb:Ce,fontCb:Q=>oe({type:X.IncrementalSnapshot,data:{source:Y.Font,...Q}}),selectionCb:Q=>{oe({type:X.IncrementalSnapshot,data:{source:Y.Selection,...Q}});},customElementCb:Q=>{oe({type:X.IncrementalSnapshot,data:{source:Y.CustomElement,...Q}});},blockClass:s,ignoreClass:l,ignoreSelector:u,maskTextClass:o,maskTextSelector:h,maskInputOptions:q,inlineStylesheet:a,sampling:y,recordDOM:w,recordCanvas:v,inlineImages:z,userTriggeredOnInput:T,collectFonts:R,doc:ie,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:te,dataURLOptions:b,mirror:Ie,iframeManager:Oe,stylesheetManager:ge,shadowDomManager:Ze,processedNodeManager:tt,canvasManager:an,ignoreCSSAttributes:me,plugins:((Se=D?.filter(Q=>Q.observer))==null?void 0:Se.map(Q=>({observer:Q.observer,options:Q.options,callback:Kr=>oe({type:X.Plugin,data:{plugin:Q.name,payload:Kr}})})))||[]},g)};Oe.addLoadListener(ie=>{try{B.push(ce(ie.contentDocument));}catch(Se){console.warn(Se);}});let K=()=>{mr(),B.push(ce(document)),Cr=!0;};return ["interactive","complete"].includes(document.readyState)?K():(B.push(ye("DOMContentLoaded",()=>{oe({type:X.DomContentLoaded,data:{}}),_==="DOMContentLoaded"&&K();})),B.push(ye("load",()=>{oe({type:X.Load,data:{}}),_==="load"&&K();},window))),()=>{B.forEach(ie=>{try{ie();}catch(Se){String(Se).toLowerCase().includes("cross-origin")||console.warn(Se);}}),tt.destroy(),Cr=!1,ou();}}catch(B){console.warn(B);}}Fe.addCustomEvent=(t,e)=>{if(!Cr)throw new Error("please add custom event after start recording");oe({type:X.Custom,data:{tag:t,payload:e}});};Fe.freezePage=()=>{rt.forEach(t=>t.freeze());};Fe.takeFullSnapshot=t=>{if(!Cr)throw new Error("please take full snapshot after start recording");mr(t);};Fe.mirror=Ie;var Ao;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped";})(Ao||(Ao={}));var{addCustomEvent:zh}=Fe,{freezePage:jh}=Fe,{takeFullSnapshot:Wh}=Fe;var ae;(function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.NativeFrame=7]="NativeFrame",t[t.NativeInteraction=8]="NativeInteraction";})(ae||(ae={}));var Zt;(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Selection=11]="Selection",t[t.StyleDeclaration=12]="StyleDeclaration",t[t.Drag=13]="Drag";})(Zt||(Zt={}));var Pr;(function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchEnd=9]="TouchEnd";})(Pr||(Pr={}));var fe;(function(t){t.Console="replayops/console",t.Network="replayops/network",t.Performance="replayops/performance",t.WebVitals="replayops/webvitals",t.Error="replayops/error";})(fe||(fe={}));var Ra;(function(t){t[t.Tap=0]="Tap",t[t.DoubleTap=1]="DoubleTap",t[t.LongPress=2]="LongPress",t[t.Scroll=3]="Scroll",t[t.Swipe=4]="Swipe",t[t.ScreenChange=5]="ScreenChange",t[t.KeyboardInput=6]="KeyboardInput",t[t.Back=7]="Back";})(Ra||(Ra={}));var V={};dl(V,{BRAND:()=>Ku,DIRTY:()=>at,EMPTY_PATH:()=>Ou,INVALID:()=>U,NEVER:()=>Ld,OK:()=>pe,ParseStatus:()=>de,Schema:()=>W,ZodAny:()=>Qe,ZodArray:()=>Ge,ZodBigInt:()=>ct,ZodBoolean:()=>ut,ZodBranded:()=>Jt,ZodCatch:()=>xt,ZodDate:()=>dt,ZodDefault:()=>wt,ZodDiscriminatedUnion:()=>Ur,ZodEffects:()=>ke,ZodEnum:()=>vt,ZodError:()=>we,ZodFirstPartyTypeKind:()=>$,ZodFunction:()=>Br,ZodIntersection:()=>mt,ZodIssueCode:()=>k,ZodLazy:()=>gt,ZodLiteral:()=>yt,ZodMap:()=>Pt,ZodNaN:()=>Ft,ZodNativeEnum:()=>bt,ZodNever:()=>De,ZodNull:()=>ft,ZodNullable:()=>Be,ZodNumber:()=>lt,ZodObject:()=>xe,ZodOptional:()=>_e,ZodParsedType:()=>N,ZodPipeline:()=>Kt,ZodPromise:()=>et,ZodReadonly:()=>St,ZodRecord:()=>$r,ZodSchema:()=>W,ZodSet:()=>Lt,ZodString:()=>Ke,ZodSymbol:()=>At,ZodTransformer:()=>ke,ZodTuple:()=>$e,ZodType:()=>W,ZodUndefined:()=>ht,ZodUnion:()=>pt,ZodUnknown:()=>qe,ZodVoid:()=>Dt,addIssueToContext:()=>I,any:()=>ad,array:()=>dd,bigint:()=>rd,boolean:()=>Fa,coerce:()=>Pd,custom:()=>Da,date:()=>sd,datetimeRegex:()=>Na,defaultErrorMap:()=>Ve,discriminatedUnion:()=>md,effect:()=>kd,enum:()=>Ed,function:()=>xd,getErrorMap:()=>Ot,getParsedType:()=>Ue,instanceof:()=>ed,intersection:()=>gd,isAborted:()=>Lr,isAsync:()=>It,isDirty:()=>Fr,isValid:()=>Je,late:()=>Qu,lazy:()=>Sd,literal:()=>Cd,makeIssue:()=>Xt,map:()=>bd,nan:()=>td,nativeEnum:()=>_d,never:()=>cd,null:()=>od,nullable:()=>Td,number:()=>La,object:()=>hd,objectUtil:()=>Un,oboolean:()=>Dd,onumber:()=>Ad,optional:()=>Md,ostring:()=>Nd,pipeline:()=>Id,preprocess:()=>Od,promise:()=>Rd,quotelessJson:()=>ku,record:()=>vd,set:()=>wd,setErrorMap:()=>Tu,strictObject:()=>fd,string:()=>Pa,symbol:()=>nd,transformer:()=>kd,tuple:()=>yd,undefined:()=>id,union:()=>pd,unknown:()=>ld,util:()=>G,void:()=>ud});var G;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let i={};for(let l of s)i[l]=l;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),l={};for(let u of i)l[u]=s[u];return t.objectValues(l)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let l in s)Object.prototype.hasOwnProperty.call(s,l)&&i.push(l);return i},t.find=(s,i)=>{for(let l of s)if(i(l))return l},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(l=>typeof l=="string"?`'${l}'`:l).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i;})(G||(G={}));var Un;(function(t){t.mergeShapes=(e,r)=>({...e,...r});})(Un||(Un={}));var N=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ue=t=>{switch(typeof t){case "undefined":return N.undefined;case "string":return N.string;case "number":return Number.isNaN(t)?N.nan:N.number;case "boolean":return N.boolean;case "function":return N.function;case "bigint":return N.bigint;case "symbol":return N.symbol;case "object":return Array.isArray(t)?N.array:t===null?N.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?N.promise:typeof Map<"u"&&t instanceof Map?N.map:typeof Set<"u"&&t instanceof Set?N.set:typeof Date<"u"&&t instanceof Date?N.date:N.object;default:return N.unknown}};var k=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ku=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),we=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n];},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}format(e){let r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(let l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(s);else if(l.code==="invalid_return_type")s(l.returnTypeError);else if(l.code==="invalid_arguments")s(l.argumentsError);else if(l.path.length===0)n._errors.push(r(l));else {let u=n,o=0;for(;o<l.path.length;){let h=l.path[o];o===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(r(l))):u[h]=u[h]||{_errors:[]},u=u[h],o++;}}};return s(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(e(s));}else n.push(e(s));return {formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};we.create=t=>new we(t);var Mu=(t,e)=>{let r;switch(t.code){case k.invalid_type:t.received===N.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case k.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case k.invalid_union:r="Invalid input";break;case k.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case k.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case k.invalid_arguments:r="Invalid function arguments";break;case k.invalid_return_type:r="Invalid function return type";break;case k.invalid_date:r="Invalid date";break;case k.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case k.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case k.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case k.custom:r="Invalid input";break;case k.invalid_intersection_types:r="Intersection results could not be merged";break;case k.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case k.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t);}return {message:r}},Ve=Mu;var ka=Ve;function Tu(t){ka=t;}function Ot(){return ka}var Xt=t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],l={...s,path:i};if(s.message!==void 0)return {...s,path:i,message:s.message};let u="",o=n.filter(h=>!!h).slice().reverse();for(let h of o)u=h(l,{data:e,defaultError:u}).message;return {...s,path:i,message:u}},Ou=[];function I(t,e){let r=Ot(),n=Xt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Ve?void 0:Ve].filter(s=>!!s)});t.common.issues.push(n);}var de=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return U;s.status==="dirty"&&e.dirty(),n.push(s.value);}return {status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let i=await s.key,l=await s.value;n.push({key:i,value:l});}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:i,value:l}=s;if(i.status==="aborted"||l.status==="aborted")return U;i.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||s.alwaysSet)&&(n[i.value]=l.value);}return {status:e.value,value:n}}},U=Object.freeze({status:"aborted"}),at=t=>({status:"dirty",value:t}),pe=t=>({status:"valid",value:t}),Lr=t=>t.status==="aborted",Fr=t=>t.status==="dirty",Je=t=>t.status==="valid",It=t=>typeof Promise<"u"&&t instanceof Promise;var A;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message;})(A||(A={}));var Re=class{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ma=(t,e)=>{if(Je(e))return {success:true,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new we(t.common.issues);return this._error=r,this._error}}};function j(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(l,u)=>{let{message:o}=t;return l.code==="invalid_enum_value"?{message:o??u.defaultError}:typeof u.data>"u"?{message:o??n??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:o??r??u.defaultError}},description:s}}var W=class{get description(){return this._def.description}_getType(e){return Ue(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ue(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new de,ctx:{common:e.parent.common,data:e.data,parsedType:Ue(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(It(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ue(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Ma(n,s)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ue(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return Je(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:e,path:[],parent:r}).then(n=>Je(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ue(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(It(s)?s:Promise.resolve(s));return Ma(n,i)}refine(e,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let l=e(s),u=()=>i.addIssue({code:k.custom,...n(s)});return typeof Promise<"u"&&l instanceof Promise?l.then(o=>o?true:(u(),false)):l?true:(u(),false)})}refinement(e,r){return this._refinement((n,s)=>e(n)?true:(s.addIssue(typeof r=="function"?r(n,s):r),false))}_refinement(e){return new ke({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return _e.create(this,this._def)}nullable(){return Be.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ge.create(this)}promise(){return et.create(this,this._def)}or(e){return pt.create([this,e],this._def)}and(e){return mt.create(this,e,this._def)}transform(e){return new ke({...j(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new wt({...j(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new Jt({typeName:$.ZodBranded,type:this,...j(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new xt({...j(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Kt.create(this,e)}readonly(){return St.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Iu=/^c[^\s-]{8,}$/i,Nu=/^[0-9a-z]+$/,Au=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Du=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Pu=/^[a-z0-9_-]{21}$/i,Lu=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Fu=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Uu=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$u="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",$n,Bu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ju=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Wu=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vu=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Hu=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Oa="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qu=new RegExp(`^${Oa}$`);function Ia(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Gu(t){return new RegExp(`^${Ia(t)}$`)}function Na(t){let e=`${Oa}T${Ia(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Yu(t,e){return !!((e==="v4"||!e)&&Bu.test(t)||(e==="v6"||!e)&&ju.test(t))}function Zu(t,e){if(!Lu.test(t))return false;try{let[r]=t.split(".");if(!r)return !1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return !(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return false}}function Xu(t,e){return !!((e==="v4"||!e)&&zu.test(t)||(e==="v6"||!e)&&Wu.test(t))}var Ke=class t extends W{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==N.string){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.string,received:i.parsedType}),U}let n=new de,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),n.dirty());else if(i.kind==="length"){let l=e.data.length>i.value,u=e.data.length<i.value;(l||u)&&(s=this._getOrReturnCtx(e,s),l?I(s,{code:k.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):u&&I(s,{code:k.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),n.dirty());}else if(i.kind==="email")Uu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"email",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")$n||($n=new RegExp($u,"u")),$n.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"emoji",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Du.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"uuid",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Pu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"nanoid",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Iu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"cuid",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Nu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"cuid2",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Au.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"ulid",code:k.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data);}catch{s=this._getOrReturnCtx(e,s),I(s,{validation:"url",code:k.invalid_string,message:i.message}),n.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"regex",code:k.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Na(i).test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?qu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Gu(i).test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{code:k.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Fu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"duration",code:k.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Yu(e.data,i.version)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"ip",code:k.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?Zu(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"jwt",code:k.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Xu(e.data,i.version)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"cidr",code:k.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Vu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"base64",code:k.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?Hu.test(e.data)||(s=this._getOrReturnCtx(e,s),I(s,{validation:"base64url",code:k.invalid_string,message:i.message}),n.dirty()):G.assertNever(i);return {status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:k.invalid_string,...A.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??false,local:e?.local??false,...A.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...A.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...A.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...A.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...A.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...A.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...A.errToObj(r)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return !!this._def.checks.find(e=>e.kind==="date")}get isTime(){return !!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return !!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return !!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return !!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return !!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ke.create=t=>new Ke({checks:[],typeName:$.ZodString,coerce:t?.coerce??false,...j(t)});function Ju(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),l=Number.parseInt(e.toFixed(s).replace(".",""));return i%l/10**s}var lt=class t extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==N.number){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.number,received:i.parsedType}),U}let n,s=new de;for(let i of this._def.checks)i.kind==="int"?G.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),s.dirty()):i.kind==="multipleOf"?Ju(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:k.not_finite,message:i.message}),s.dirty()):G.assertNever(i);return {status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,true,A.toString(r))}gt(e,r){return this.setLimit("min",e,false,A.toString(r))}lte(e,r){return this.setLimit("max",e,true,A.toString(r))}lt(e,r){return this.setLimit("max",e,false,A.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:A.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return true;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);}return Number.isFinite(r)&&Number.isFinite(e)}};lt.create=t=>new lt({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||false,...j(t)});var ct=class t extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data);}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.bigint)return this._getInvalidInput(e);let n,s=new de;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),I(n,{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):G.assertNever(i);return {status:s.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return I(r,{code:k.invalid_type,expected:N.bigint,received:r.parsedType}),U}gte(e,r){return this.setLimit("min",e,true,A.toString(r))}gt(e,r){return this.setLimit("min",e,false,A.toString(r))}lte(e,r){return this.setLimit("max",e,true,A.toString(r))}lt(e,r){return this.setLimit("max",e,false,A.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:A.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ct.create=t=>new ct({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??false,...j(t)});var ut=class extends W{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==N.boolean){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.boolean,received:n.parsedType}),U}return pe(e.data)}};ut.create=t=>new ut({typeName:$.ZodBoolean,coerce:t?.coerce||false,...j(t)});var dt=class t extends W{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==N.date){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_type,expected:N.date,received:i.parsedType}),U}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return I(i,{code:k.invalid_date}),U}let n=new de,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),I(s,{code:k.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),n.dirty()):G.assertNever(i);return {status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};dt.create=t=>new dt({checks:[],coerce:t?.coerce||false,typeName:$.ZodDate,...j(t)});var At=class extends W{_parse(e){if(this._getType(e)!==N.symbol){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.symbol,received:n.parsedType}),U}return pe(e.data)}};At.create=t=>new At({typeName:$.ZodSymbol,...j(t)});var ht=class extends W{_parse(e){if(this._getType(e)!==N.undefined){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.undefined,received:n.parsedType}),U}return pe(e.data)}};ht.create=t=>new ht({typeName:$.ZodUndefined,...j(t)});var ft=class extends W{_parse(e){if(this._getType(e)!==N.null){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.null,received:n.parsedType}),U}return pe(e.data)}};ft.create=t=>new ft({typeName:$.ZodNull,...j(t)});var Qe=class extends W{constructor(){super(...arguments),this._any=true;}_parse(e){return pe(e.data)}};Qe.create=t=>new Qe({typeName:$.ZodAny,...j(t)});var qe=class extends W{constructor(){super(...arguments),this._unknown=true;}_parse(e){return pe(e.data)}};qe.create=t=>new qe({typeName:$.ZodUnknown,...j(t)});var De=class extends W{_parse(e){let r=this._getOrReturnCtx(e);return I(r,{code:k.invalid_type,expected:N.never,received:r.parsedType}),U}};De.create=t=>new De({typeName:$.ZodNever,...j(t)});var Dt=class extends W{_parse(e){if(this._getType(e)!==N.undefined){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.void,received:n.parsedType}),U}return pe(e.data)}};Dt.create=t=>new Dt({typeName:$.ZodVoid,...j(t)});var Ge=class t extends W{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==N.array)return I(r,{code:k.invalid_type,expected:N.array,received:r.parsedType}),U;if(s.exactLength!==null){let l=r.data.length>s.exactLength.value,u=r.data.length<s.exactLength.value;(l||u)&&(I(r,{code:l?k.too_big:k.too_small,minimum:u?s.exactLength.value:void 0,maximum:l?s.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:s.exactLength.message}),n.dirty());}if(s.minLength!==null&&r.data.length<s.minLength.value&&(I(r,{code:k.too_small,minimum:s.minLength.value,type:"array",inclusive:true,exact:false,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(I(r,{code:k.too_big,maximum:s.maxLength.value,type:"array",inclusive:true,exact:false,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((l,u)=>s.type._parseAsync(new Re(r,l,r.path,u)))).then(l=>de.mergeArray(n,l));let i=[...r.data].map((l,u)=>s.type._parseSync(new Re(r,l,r.path,u)));return de.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:A.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:A.toString(r)}})}nonempty(e){return this.min(1,e)}};Ge.create=(t,e)=>new Ge({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...j(e)});function Nt(t){if(t instanceof xe){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=_e.create(Nt(n));}return new xe({...t._def,shape:()=>e})}else return t instanceof Ge?new Ge({...t._def,type:Nt(t.element)}):t instanceof _e?_e.create(Nt(t.unwrap())):t instanceof Be?Be.create(Nt(t.unwrap())):t instanceof $e?$e.create(t.items.map(e=>Nt(e))):t}var xe=class t extends W{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==N.object){let h=this._getOrReturnCtx(e);return I(h,{code:k.invalid_type,expected:N.object,received:h.parsedType}),U}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof De&&this._def.unknownKeys==="strip"))for(let h in s.data)l.includes(h)||u.push(h);let o=[];for(let h of l){let a=i[h],f=s.data[h];o.push({key:{status:"valid",value:h},value:a._parse(new Re(s,f,s.path,h)),alwaysSet:h in s.data});}if(this._def.catchall instanceof De){let h=this._def.unknownKeys;if(h==="passthrough")for(let a of u)o.push({key:{status:"valid",value:a},value:{status:"valid",value:s.data[a]}});else if(h==="strict")u.length>0&&(I(s,{code:k.unrecognized_keys,keys:u}),n.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let h=this._def.catchall;for(let a of u){let f=s.data[a];o.push({key:{status:"valid",value:a},value:h._parse(new Re(s,f,s.path,a)),alwaysSet:a in s.data});}}return s.common.async?Promise.resolve().then(async()=>{let h=[];for(let a of o){let f=await a.key,d=await a.value;h.push({key:f,value:d,alwaysSet:a.alwaysSet});}return h}).then(h=>de.mergeObjectSync(n,h)):de.mergeObjectSync(n,o)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of G.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of G.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Nt(this)}partial(e){let r={};for(let n of G.objectKeys(this.shape)){let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional();}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of G.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else {let i=this.shape[n];for(;i instanceof _e;)i=i._def.innerType;r[n]=i;}return new t({...this._def,shape:()=>r})}keyof(){return Aa(G.objectKeys(this.shape))}};xe.create=(t,e)=>new xe({shape:()=>t,unknownKeys:"strip",catchall:De.create(),typeName:$.ZodObject,...j(e)});xe.strictCreate=(t,e)=>new xe({shape:()=>t,unknownKeys:"strict",catchall:De.create(),typeName:$.ZodObject,...j(e)});xe.lazycreate=(t,e)=>new xe({shape:t,unknownKeys:"strip",catchall:De.create(),typeName:$.ZodObject,...j(e)});var pt=class extends W{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(let u of i)if(u.result.status==="valid")return u.result;for(let u of i)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let l=i.map(u=>new we(u.ctx.common.issues));return I(r,{code:k.invalid_union,unionErrors:l}),U}if(r.common.async)return Promise.all(n.map(async i=>{let l={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(s);{let i,l=[];for(let o of n){let h={...r,common:{...r.common,issues:[]},parent:null},a=o._parseSync({data:r.data,path:r.path,parent:h});if(a.status==="valid")return a;a.status==="dirty"&&!i&&(i={result:a,ctx:h}),h.common.issues.length&&l.push(h.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let u=l.map(o=>new we(o));return I(r,{code:k.invalid_union,unionErrors:u}),U}}get options(){return this._def.options}};pt.create=(t,e)=>new pt({options:t,typeName:$.ZodUnion,...j(e)});var He=t=>t instanceof gt?He(t.schema):t instanceof ke?He(t.innerType()):t instanceof yt?[t.value]:t instanceof vt?t.options:t instanceof bt?G.objectValues(t.enum):t instanceof wt?He(t._def.innerType):t instanceof ht?[void 0]:t instanceof ft?[null]:t instanceof _e?[void 0,...He(t.unwrap())]:t instanceof Be?[null,...He(t.unwrap())]:t instanceof Jt||t instanceof St?He(t.unwrap()):t instanceof xt?He(t._def.innerType):[],Ur=class t extends W{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.object)return I(r,{code:k.invalid_type,expected:N.object,received:r.parsedType}),U;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(I(r,{code:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),U)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let i of r){let l=He(i.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of l){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,i);}}return new t({typeName:$.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...j(n)})}};function Bn(t,e){let r=Ue(t),n=Ue(e);if(t===e)return {valid:true,data:t};if(r===N.object&&n===N.object){let s=G.objectKeys(e),i=G.objectKeys(t).filter(u=>s.indexOf(u)!==-1),l={...t,...e};for(let u of i){let o=Bn(t[u],e[u]);if(!o.valid)return {valid:false};l[u]=o.data;}return {valid:true,data:l}}else if(r===N.array&&n===N.array){if(t.length!==e.length)return {valid:false};let s=[];for(let i=0;i<t.length;i++){let l=t[i],u=e[i],o=Bn(l,u);if(!o.valid)return {valid:false};s.push(o.data);}return {valid:true,data:s}}else return r===N.date&&n===N.date&&+t==+e?{valid:true,data:t}:{valid:false}}var mt=class extends W{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=(i,l)=>{if(Lr(i)||Lr(l))return U;let u=Bn(i.value,l.value);return u.valid?((Fr(i)||Fr(l))&&r.dirty(),{status:r.value,value:u.data}):(I(n,{code:k.invalid_intersection_types}),U)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,l])=>s(i,l)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};mt.create=(t,e,r)=>new mt({left:t,right:e,typeName:$.ZodIntersection,...j(r)});var $e=class t extends W{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.array)return I(n,{code:k.invalid_type,expected:N.array,received:n.parsedType}),U;if(n.data.length<this._def.items.length)return I(n,{code:k.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),U;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:k.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...n.data].map((l,u)=>{let o=this._def.items[u]||this._def.rest;return o?o._parse(new Re(n,l,n.path,u)):null}).filter(l=>!!l);return n.common.async?Promise.all(i).then(l=>de.mergeArray(r,l)):de.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};$e.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $e({items:t,typeName:$.ZodTuple,rest:null,...j(e)})};var $r=class t extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.object)return I(n,{code:k.invalid_type,expected:N.object,received:n.parsedType}),U;let s=[],i=this._def.keyType,l=this._def.valueType;for(let u in n.data)s.push({key:i._parse(new Re(n,u,n.path,u)),value:l._parse(new Re(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?de.mergeObjectAsync(r,s):de.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof W?new t({keyType:e,valueType:r,typeName:$.ZodRecord,...j(n)}):new t({keyType:Ke.create(),valueType:e,typeName:$.ZodRecord,...j(r)})}},Pt=class extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.map)return I(n,{code:k.invalid_type,expected:N.map,received:n.parsedType}),U;let s=this._def.keyType,i=this._def.valueType,l=[...n.data.entries()].map(([u,o],h)=>({key:s._parse(new Re(n,u,n.path,[h,"key"])),value:i._parse(new Re(n,o,n.path,[h,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let o of l){let h=await o.key,a=await o.value;if(h.status==="aborted"||a.status==="aborted")return U;(h.status==="dirty"||a.status==="dirty")&&r.dirty(),u.set(h.value,a.value);}return {status:r.value,value:u}})}else {let u=new Map;for(let o of l){let h=o.key,a=o.value;if(h.status==="aborted"||a.status==="aborted")return U;(h.status==="dirty"||a.status==="dirty")&&r.dirty(),u.set(h.value,a.value);}return {status:r.value,value:u}}}};Pt.create=(t,e,r)=>new Pt({valueType:e,keyType:t,typeName:$.ZodMap,...j(r)});var Lt=class t extends W{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.set)return I(n,{code:k.invalid_type,expected:N.set,received:n.parsedType}),U;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(I(n,{code:k.too_small,minimum:s.minSize.value,type:"set",inclusive:true,exact:false,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(I(n,{code:k.too_big,maximum:s.maxSize.value,type:"set",inclusive:true,exact:false,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function l(o){let h=new Set;for(let a of o){if(a.status==="aborted")return U;a.status==="dirty"&&r.dirty(),h.add(a.value);}return {status:r.value,value:h}}let u=[...n.data.values()].map((o,h)=>i._parse(new Re(n,o,n.path,h)));return n.common.async?Promise.all(u).then(o=>l(o)):l(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:A.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Lt.create=(t,e)=>new Lt({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...j(e)});var Br=class t extends W{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.function)return I(r,{code:k.invalid_type,expected:N.function,received:r.parsedType}),U;function n(u,o){return Xt({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ot(),Ve].filter(h=>!!h),issueData:{code:k.invalid_arguments,argumentsError:o}})}function s(u,o){return Xt({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ot(),Ve].filter(h=>!!h),issueData:{code:k.invalid_return_type,returnTypeError:o}})}let i={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof et){let u=this;return pe(async function(...o){let h=new we([]),a=await u._def.args.parseAsync(o,i).catch(c=>{throw h.addIssue(n(o,c)),h}),f=await Reflect.apply(l,this,a);return await u._def.returns._def.type.parseAsync(f,i).catch(c=>{throw h.addIssue(s(f,c)),h})})}else {let u=this;return pe(function(...o){let h=u._def.args.safeParse(o,i);if(!h.success)throw new we([n(o,h.error)]);let a=Reflect.apply(l,this,h.data),f=u._def.returns.safeParse(a,i);if(!f.success)throw new we([s(a,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:$e.create(e).rest(qe.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||$e.create([]).rest(qe.create()),returns:r||qe.create(),typeName:$.ZodFunction,...j(n)})}},gt=class extends W{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};gt.create=(t,e)=>new gt({getter:t,typeName:$.ZodLazy,...j(e)});var yt=class extends W{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return I(r,{received:r.data,code:k.invalid_literal,expected:this._def.value}),U}return {status:"valid",value:e.data}}get value(){return this._def.value}};yt.create=(t,e)=>new yt({value:t,typeName:$.ZodLiteral,...j(e)});function Aa(t,e){return new vt({values:t,typeName:$.ZodEnum,...j(e)})}var vt=class t extends W{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return I(r,{expected:G.joinValues(n),received:r.parsedType,code:k.invalid_type}),U}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return I(r,{received:r.data,code:k.invalid_enum_value,options:n}),U}return pe(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};vt.create=Aa;var bt=class extends W{_parse(e){let r=G.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==N.string&&n.parsedType!==N.number){let s=G.objectValues(r);return I(n,{expected:G.joinValues(s),received:n.parsedType,code:k.invalid_type}),U}if(this._cache||(this._cache=new Set(G.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=G.objectValues(r);return I(n,{received:n.data,code:k.invalid_enum_value,options:s}),U}return pe(e.data)}get enum(){return this._def.values}};bt.create=(t,e)=>new bt({values:t,typeName:$.ZodNativeEnum,...j(e)});var et=class extends W{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.promise&&r.common.async===false)return I(r,{code:k.invalid_type,expected:N.promise,received:r.parsedType}),U;let n=r.parsedType===N.promise?r.data:Promise.resolve(r.data);return pe(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};et.create=(t,e)=>new et({type:t,typeName:$.ZodPromise,...j(e)});var ke=class extends W{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:l=>{I(n,l),l.fatal?r.abort():r.dirty();},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let l=s.transform(n.data,i);if(n.common.async)return Promise.resolve(l).then(async u=>{if(r.value==="aborted")return U;let o=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return o.status==="aborted"?U:o.status==="dirty"?at(o.value):r.value==="dirty"?at(o.value):o});{if(r.value==="aborted")return U;let u=this._def.schema._parseSync({data:l,path:n.path,parent:n});return u.status==="aborted"?U:u.status==="dirty"?at(u.value):r.value==="dirty"?at(u.value):u}}if(s.type==="refinement"){let l=u=>{let o=s.refinement(u,i);if(n.common.async)return Promise.resolve(o);if(o instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===false){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?U:(u.status==="dirty"&&r.dirty(),l(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?U:(u.status==="dirty"&&r.dirty(),l(u.value).then(()=>({status:r.value,value:u.value}))))}if(s.type==="transform")if(n.common.async===false){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Je(l))return U;let u=s.transform(l.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>Je(l)?Promise.resolve(s.transform(l.value,i)).then(u=>({status:r.value,value:u})):U);G.assertNever(s);}};ke.create=(t,e,r)=>new ke({schema:t,typeName:$.ZodEffects,effect:e,...j(r)});ke.createWithPreprocess=(t,e,r)=>new ke({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...j(r)});var _e=class extends W{_parse(e){return this._getType(e)===N.undefined?pe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_e.create=(t,e)=>new _e({innerType:t,typeName:$.ZodOptional,...j(e)});var Be=class extends W{_parse(e){return this._getType(e)===N.null?pe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Be.create=(t,e)=>new Be({innerType:t,typeName:$.ZodNullable,...j(e)});var wt=class extends W{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===N.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};wt.create=(t,e)=>new wt({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var xt=class extends W{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return It(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xt.create=(t,e)=>new xt({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var Ft=class extends W{_parse(e){if(this._getType(e)!==N.nan){let n=this._getOrReturnCtx(e);return I(n,{code:k.invalid_type,expected:N.nan,received:n.parsedType}),U}return {status:"valid",value:e.data}}};Ft.create=t=>new Ft({typeName:$.ZodNaN,...j(t)});var Ku=Symbol("zod_brand"),Jt=class extends W{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Kt=class t extends W{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?U:i.status==="dirty"?(r.dirty(),at(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?U:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:$.ZodPipeline})}},St=class extends W{_parse(e){let r=this._def.innerType._parse(e),n=s=>(Je(s)&&(s.value=Object.freeze(s.value)),s);return It(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};St.create=(t,e)=>new St({innerType:t,typeName:$.ZodReadonly,...j(e)});function Ta(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Da(t,e={},r){return t?Qe.create().superRefine((n,s)=>{let i=t(n);if(i instanceof Promise)return i.then(l=>{if(!l){let u=Ta(e,n),o=u.fatal??r??true;s.addIssue({code:"custom",...u,fatal:o});}});if(!i){let l=Ta(e,n),u=l.fatal??r??true;s.addIssue({code:"custom",...l,fatal:u});}}):Qe.create()}var Qu={object:xe.lazycreate},$;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})($||($={}));var ed=(t,e={message:`Input not instance of ${t.name}`})=>Da(r=>r instanceof t,e),Pa=Ke.create,La=lt.create,td=Ft.create,rd=ct.create,Fa=ut.create,sd=dt.create,nd=At.create,id=ht.create,od=ft.create,ad=Qe.create,ld=qe.create,cd=De.create,ud=Dt.create,dd=Ge.create,hd=xe.create,fd=xe.strictCreate,pd=pt.create,md=Ur.create,gd=mt.create,yd=$e.create,vd=$r.create,bd=Pt.create,wd=Lt.create,xd=Br.create,Sd=gt.create,Cd=yt.create,Ed=vt.create,_d=bt.create,Rd=et.create,kd=ke.create,Md=_e.create,Td=Be.create,Od=ke.createWithPreprocess,Id=Kt.create,Nd=()=>Pa().optional(),Ad=()=>La().optional(),Dd=()=>Fa().optional(),Pd={string:(t=>Ke.create({...t,coerce:true})),number:(t=>lt.create({...t,coerce:true})),boolean:(t=>ut.create({...t,coerce:true})),bigint:(t=>ct.create({...t,coerce:true})),date:(t=>dt.create({...t,coerce:true}))};var Ld=U;var Fd=V.object({type:V.nativeEnum(ae),timestamp:V.number().int().nonnegative(),data:V.unknown()}),Ud=V.object({browser:V.string(),browserVersion:V.string(),os:V.string(),osVersion:V.string(),deviceType:V.enum(["desktop","mobile","tablet","unknown"]),userAgent:V.string().max(1024),platform:V.enum(["web","ios","android"]).optional()}),$d=V.object({entryUrl:V.string().url().max(2048),currentUrl:V.string().url().max(2048),referrer:V.string().max(2048),device:Ud,screen:V.object({width:V.number().int().nonnegative(),height:V.number().int().nonnegative(),dpr:V.number().nonnegative()}),language:V.string().max(35),timezone:V.string().max(64),environment:V.enum(["production","staging","development"]),releaseVersion:V.string().max(128).optional(),sdkVersion:V.string().max(32)});V.object({v:V.literal(1),projectId:V.string().min(1).max(64),sessionId:V.string().uuid(),seq:V.number().int().nonnegative(),anonymousId:V.string().min(1).max(64),userId:V.string().max(256).optional(),userTraits:V.record(V.unknown()).optional(),events:V.array(Fd).min(1).max(5e3),meta:$d,sentAt:V.number().int().nonnegative()});function jn(t){let e=/Edg\/|EdgiOS\//.test(t)?"Edge":/OPR\/|OPiOS\//.test(t)?"Opera":/Chrome\/|CriOS\//.test(t)?"Chrome":/Firefox\/|FxiOS\//.test(t)?"Firefox":/Safari\//.test(t)?"Safari":"Unknown",r=t.match(/(?:EdgiOS|Edg|OPiOS|OPR|CriOS|Chrome|FxiOS|Firefox|Version)\/(\d+)/)?.[1]??"0",n=/Windows/.test(t)?"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/Mac OS X|Macintosh/.test(t)?"macOS":/Linux/.test(t)?"Linux":"Unknown",s=/iPad|Tablet/.test(t)||/Android/.test(t)&&!/Mobi/.test(t)?"tablet":/Mobi|Android|iPhone|iPod/.test(t)?"mobile":"desktop",i=(t.match(/(?:iPhone OS|CPU OS) ([\d_]+)/)?.[1]??t.match(/(?:Windows NT|Mac OS X|Android) ([\d._]+)/)?.[1]??"").replace(/_/g,".");return {browser:e,browserVersion:r,os:n,osVersion:i,deviceType:s,userAgent:t.slice(0,1024)}}var jd=new Set(["password","email","tel","number","hidden"]),Wd=["cc-number","cc-csc","cc-exp","cc-name","current-password","new-password","one-time-code"],Vd=/(pass(word)?|card|cvv|cvc|ccv|iban|ssn|tckn|national|secret|token|pin)/i;function Ua(t){if(t instanceof HTMLInputElement&&jd.has(t.type))return true;let e=t.getAttribute("autocomplete")?.toLowerCase()??"";if(Wd.some(n=>e.includes(n)))return true;let r=`${t.getAttribute("name")??""} ${t.id??""} ${t.getAttribute("aria-label")??""}`;return Vd.test(r)}var Vn=new Set,$a=false;function Wn(t){for(let e of [...Vn])try{e(t);}catch{}}function Hd(){if(!($a||typeof history>"u")){$a=true;for(let[t,e]of [["pushState","push"],["replaceState","replace"]]){let r=history[t];history[t]=function(...n){let s=r.apply(this,n);return Wn(e),s};}window.addEventListener("popstate",()=>Wn("pop")),window.addEventListener("hashchange",()=>Wn("hash"));}}function zr(t){return Hd(),Vn.add(t),()=>Vn.delete(t)}function jr(t){let e=t.indexOf("#");if(e===-1)return t;let r=t.slice(e);return r.startsWith("#/")||r.startsWith("#!/")?t:t.slice(0,e)}function Hn(t){let e=jr(t),r=e.indexOf("?");if(r===-1)return e;let n=e.indexOf("#",r);return e.slice(0,r)+(n===-1?"":e.slice(n))}var Ba="0123456789abcdef";function za(t){let e=new Uint8Array(t),r=globalThis.crypto;if(r?.getRandomValues)r.getRandomValues(e);else for(let s=0;s<t;s++)e[s]=Math.floor(Math.random()*256);let n="";for(let s of e)n+=Ba[s>>4&15]+Ba[s&15];return n}function ja(){let t=za(16);return t==="0".repeat(32)?ja():t}function Wa(){let t=za(8);return t==="0".repeat(16)?Wa():t}function qd(t,e,r=true){return `00-${t}-${e}-${r?"01":"00"}`}function qn(t,e,r){let n;try{n=new URL(t,r);}catch{return true}return n.origin===r?true:e.some(s=>typeof s=="string"?n.href.includes(s):s.test(n.href))}function Gn(t){let e=ja();return {traceId:e,traceparent:qd(e,Wa()),baggage:`replayops.session_id=${encodeURIComponent(t)}`}}function Me(t,e){return {type:ae.Plugin,timestamp:Date.now(),data:{plugin:t,payload:e}}}function Ha(t){let e=["log","info","warn","error","debug"],r={};for(let n of e)r[n]=console[n].bind(console),console[n]=(...s)=>{t(Me(fe.Console,{level:n,args:s.map(Yd).slice(0,10)})),r[n](...s);};return ()=>{for(let n of e)console[n]=r[n];}}function qa(t){let e=n=>{let s=n.target,i=s&&s!==n.currentTarget?s.src||s.href:void 0;if(!n.message&&i){t(Me(fe.Error,{kind:"resource",message:"Failed to load resource",source:i}));return}n.message&&t(Me(fe.Error,{kind:"error",message:n.message,source:n.filename,line:n.lineno,column:n.colno,stack:n.error?.stack?.slice(0,4e3)}));},r=n=>t(Me(fe.Error,{kind:"unhandledrejection",message:String(n.reason?.message??n.reason),stack:n.reason?.stack?.slice(0,4e3)}));return window.addEventListener("error",e,true),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",e,true),window.removeEventListener("unhandledrejection",r);}}function Ga(t,e,r={}){let n=!!r.bodies,s=r.selfEndpoint?r.selfEndpoint.replace(/\/$/,""):void 0,i=x=>{if(!s)return false;try{return new URL(x,location.href).href.startsWith(s)}catch{return x.startsWith(s)}},l=window.fetch;window.fetch=async(...x)=>{let y=Date.now(),b=typeof x[0]=="string"?x[0]:x[0].url;if(i(b))return l(...x);let S=(x[1]?.method??x[0]?.method??"GET").toUpperCase(),w=e?Gd(x,b,e):void 0,v={};if(n){let C=Jd(x[1]?.headers??(x[0]instanceof Request?x[0].headers:void 0)),_=typeof x[1]?.body=="string"?x[1].body:void 0;v=Va(_,C);}try{let C=await l(...x),_={};return n&&(_=await Qd(C)),t(Me(fe.Network,{type:"fetch",url:b,method:S,status:C.status,durationMs:Date.now()-y,...w?{traceId:w}:{},...v,..._})),C}catch(C){throw t(Me(fe.Network,{type:"fetch",url:b,method:S,status:0,error:String(C),durationMs:Date.now()-y,...w?{traceId:w}:{},...v})),C}};let o=window.XMLHttpRequest.prototype,h=o.open,a=o.send,f=o.setRequestHeader;o.open=function(x,y,...b){return this.__ro={method:x,url:y,started:0,reqHeaders:{}},h.call(this,x,y,...b)},o.setRequestHeader=function(x,y){let b=this.__ro;return b&&n&&(b.reqHeaders[x]=y),f.call(this,x,y)},o.send=function(...x){let y=this.__ro,b={};if(y){if(y.started=Date.now(),n){let S=typeof x[0]=="string"?x[0]:void 0;b=Va(S,Vr(y.reqHeaders));}if(e&&qn(y.url,e.targets,location.origin)){let S=Gn(e.sessionId);try{this.setRequestHeader("traceparent",S.traceparent),this.setRequestHeader("baggage",S.baggage),y.traceId=S.traceId;}catch{}}}return this.addEventListener("loadend",()=>{if(!y||i(y.url))return;let S={};if(n){let w=this.getResponseHeader("content-type")??void 0,v=this.responseType===""||this.responseType==="text"?this.responseText:void 0;S={...v!=null?{resBody:Yn(Zn(v,w))}:{},resHeaders:Kd(this.getAllResponseHeaders())};}t(Me(fe.Network,{type:"xhr",url:y.url,method:y.method,status:this.status,durationMs:Date.now()-y.started,...y.traceId?{traceId:y.traceId}:{},...b,...S}));}),a.apply(this,x)};let d=1500,c=0,m=performance.now(),p=m<12e4?0:m-6e4,g;try{g=new PerformanceObserver(x=>{for(let y of x.getEntries()){if(c>=d)return;let b=y.initiatorType;if(b==="fetch"||b==="xmlhttprequest"||y.name.startsWith("data:")||i(y.name))continue;let S=y.startTime+y.duration;S<p||(c++,t({type:ae.Plugin,timestamp:Math.round(Date.now()-(performance.now()-S)),data:{plugin:fe.Network,payload:{type:"resource",initiator:b,url:y.name,status:y.responseStatus??0,durationMs:Math.round(y.duration),...y.transferSize?{sizeBytes:y.transferSize}:{}}}}));}}),g.observe({type:"resource",buffered:!0});}catch{}return ()=>{window.fetch=l,o.open=h,o.send=a,o.setRequestHeader=f,g?.disconnect();}}function Gd(t,e,r){if(!qn(e,r.targets,location.origin))return;let n=Gn(r.sessionId);if(t[0]instanceof Request){let l=new Headers(t[0].headers);return l.set("traceparent",n.traceparent),l.set("baggage",n.baggage),t[0]=new Request(t[0],{headers:l}),n.traceId}let s=t[1]??={},i=new Headers(s.headers);return i.set("traceparent",n.traceparent),i.set("baggage",n.baggage),s.headers=i,n.traceId}function Ya(t){let e=new PerformanceObserver(r=>{for(let n of r.getEntries())(n.entryType==="longtask"||n.entryType==="navigation")&&t(Me(fe.Performance,{entryType:n.entryType,name:n.name,startTime:Math.round(n.startTime),duration:Math.round(n.duration)}));});try{e.observe({entryTypes:["longtask","navigation"]});}catch{}return ()=>e.disconnect()}function Za(t){let e=[],r=(s,i)=>{try{let l=new PerformanceObserver(u=>u.getEntries().forEach(i));l.observe({type:s,buffered:!0}),e.push(()=>l.disconnect());}catch{}};r("largest-contentful-paint",s=>t(Me(fe.WebVitals,{metric:"LCP",value:Math.round(s.startTime)}))),r("first-input",s=>{let i=s.processingStart-s.startTime;t(Me(fe.WebVitals,{metric:"FID",value:Math.round(i)}));});let n=0;return r("layout-shift",s=>{let i=s;i.hadRecentInput||(n+=i.value,t(Me(fe.WebVitals,{metric:"CLS",value:Number(n.toFixed(4))})));}),()=>e.forEach(s=>s())}function Yd(t){try{return typeof t=="string"?t:JSON.stringify(t)}catch{return String(t)}}var Wr=8192,Zd=/^(authorization|cookie|set-cookie|proxy-authorization|x-api-key|x-auth-token|x-csrf-token)$/i,Xd=/(pass|secret|token|auth|credit|card|cvv|ssn|api[-_]?key)/i;function Yn(t){return t.length>Wr?`${t.slice(0,Wr)}\u2026[truncated]`:t}function Zn(t,e){if(!(e&&/json/i.test(e)||/^\s*[[{]/.test(t)))return t;try{let n=s=>{if(Array.isArray(s))return s.map(n);if(s&&typeof s=="object"){let i={};for(let l of Object.keys(s))i[l]=Xd.test(l)?"***":n(s[l]);return i}return s};return JSON.stringify(n(JSON.parse(t)))}catch{return t}}function Jd(t){let e={};return t?(new Headers(t).forEach((r,n)=>e[n]=r),Vr(e)):e}function Vr(t){let e={};for(let r of Object.keys(t))e[r]=Zd.test(r)?"***":t[r];return e}function Kd(t){let e={};for(let r of t.trim().split(/\r?\n/)){let n=r.indexOf(":");n>0&&(e[r.slice(0,n).trim()]=r.slice(n+1).trim());}return Vr(e)}function Va(t,e,r){let n={reqHeaders:e};if(t!=null){n.reqBody=Yn(Zn(t,e["content-type"]));let s=th(t);s&&Object.assign(n,s);}return n}async function Qd(t){let e={resHeaders:eh(t.headers)},r=t.headers.get("content-type")??"",n=Number(t.headers.get("content-length")??0);if((/json|text|xml|javascript|graphql/i.test(r)||!r&&n>0&&n<Wr*8)&&n<Wr*8)try{let i=await t.clone().text();e.resBody=Yn(Zn(i,r));}catch{}return e}function eh(t){let e={};return t.forEach((r,n)=>e[n]=r),Vr(e)}function th(t){try{let e=JSON.parse(t),r=Array.isArray(e)?e[0]:e,n=r?.query;if(typeof n!="string")return;let s=n.match(/\b(query|mutation|subscription)\b\s+([A-Za-z0-9_]+)?/),i=typeof r.operationName=="string"?r.operationName:s?.[2];return {operationType:s?.[1]??"query",...i?{operationName:i}:{}}}catch{return}}function Xa(t){let e=0,r=0,n=()=>{e++,r=requestAnimationFrame(n);};r=requestAnimationFrame(n);let s=setInterval(()=>{let i=performance.memory;t(Me(fe.Performance,{sample:true,fps:e/2,domNodes:document.getElementsByTagName("*").length,...i?{memoryMB:Math.round(i.usedJSHeapSize/1048576*10)/10}:{}})),e=0;},2e3);return ()=>{clearInterval(s),cancelAnimationFrame(r);}}var rh=100,sh=6e4,nh=new Set([0,5,8,13,15]),Hr=class{constructor(e,r,n=""){this.config=e;this.emit=r;this.sessionId=n;}config;emit;sessionId;stopFns=[];rrwebStop;lastPage="";changedSinceSnapshot=false;checkoutTimer;start(){this.beginRecording();}beginRecording(){if(this.rrwebStop)return;let e=["[data-mask]","[data-private]",...this.config.maskSelectors].filter(Boolean).join(","),r=["[data-ignore]",...this.config.ignoreSelectors].filter(Boolean).join(",");if(this.rrwebStop=Fe({emit:n=>{let s=n;s.type===ae.Meta&&(this.lastPage=jr(s.data.href??"")),s.type===ae.FullSnapshot?this.changedSinceSnapshot=false:s.type===ae.IncrementalSnapshot&&nh.has(s.data.source??-1)&&(this.changedSinceSnapshot=true),this.emit(s);},maskAllInputs:this.config.maskInputs,maskTextSelector:e||void 0,blockSelector:r||void 0,maskInputFn:(n,s)=>this.config.maskInputs||Ua(s)?"\u2022".repeat(n.length):n,recordCanvas:false,sampling:{mousemove:true,scroll:150,input:"last"}}),this.checkoutTimer=setInterval(()=>{this.changedSinceSnapshot&&this.takeFullSnapshot();},sh),this.stopFns.push(this.recordNavigations()),this.config.recordConsole&&this.stopFns.push(Ha(this.emit)),this.config.recordErrors&&this.stopFns.push(qa(this.emit)),this.config.recordNetwork){let n=this.config.tracePropagation&&this.sessionId?{sessionId:this.sessionId,targets:this.config.tracePropagationTargets}:void 0;this.stopFns.push(Ga(this.emit,n,{bodies:this.config.recordNetworkBodies,selfEndpoint:this.config.endpoint}));}this.config.capturePerformance&&this.stopFns.push(Ya(this.emit)),this.config.captureMemory&&this.stopFns.push(Xa(this.emit)),this.config.captureWebVitals&&this.stopFns.push(Za(this.emit));}recordNavigations(){let e,r=false,n=()=>{e=void 0;let i=jr(location.href),l=Hn(location.href)!==Hn(this.lastPage),u=i!==this.lastPage&&r;r=false,!(!l&&!u)&&(this.lastPage=i,this.emit({type:ae.Meta,timestamp:Date.now(),data:{href:location.href,width:window.innerWidth,height:window.innerHeight}}));},s=zr(i=>{i!=="replace"&&(r=true),e===void 0&&(e=setTimeout(n,rh));});return ()=>{s(),e!==void 0&&clearTimeout(e);}}emitCustom(e,r){this.emit({type:ae.Custom,timestamp:Date.now(),data:{tag:e,payload:r}});}takeFullSnapshot(){try{Fe.takeFullSnapshot(!0);}catch{}}stop(){this.checkoutTimer&&clearInterval(this.checkoutTimer),this.checkoutTimer=void 0,this.rrwebStop?.(),this.rrwebStop=void 0;for(let e of this.stopFns)e();this.stopFns=[];}};var ih=1024*1024,oh=64,ah=60*1024,lh=1e3,Ja=6e4,qr=class t{constructor(e,r){this.sessionId=e;this.opts=r;this.url=`${r.endpoint.replace(/\/$/,"")}/v1/collect`,this.maxBatchBytes=r.maxBatchBytes??ih;}sessionId;opts;buffer=[];seq=0;timer;url;maxBatchBytes;flushing;flushAgain=false;notBefore=0;backoffMs=0;start(){this.timer=setInterval(()=>this.flush(),this.opts.flushIntervalMs),window.addEventListener("pagehide",this.flushBeacon),document.addEventListener("visibilitychange",this.onVisibility);}enqueue(e){this.buffer.push(e),(e.type===ae.FullSnapshot||this.buffer.length>=this.opts.batchSize)&&this.flush();}stop(){this.timer&&clearInterval(this.timer),window.removeEventListener("pagehide",this.flushBeacon),document.removeEventListener("visibilitychange",this.onVisibility),this.flushBeacon();}discard(){this.timer&&clearInterval(this.timer),window.removeEventListener("pagehide",this.flushBeacon),document.removeEventListener("visibilitychange",this.onVisibility),this.buffer=[];}onVisibility=()=>{document.visibilityState==="hidden"&&this.flushBeacon();};drain(e=this.maxBatchBytes){if(this.buffer.length===0)return null;let r=[],n=0;for(;this.buffer.length>0;){let i=JSON.stringify(this.buffer[0]).length,l=r.length>0&&r[r.length-1].type===ae.Meta;if(r.length>0&&!l&&n+i>e)break;r.push(this.buffer.shift()),n+=i;}let s=this.opts.getIdentity();return {v:1,projectId:this.opts.projectId,sessionId:this.sessionId,seq:this.seq++,anonymousId:s.anonymousId,userId:s.userId,userTraits:s.userTraits,events:r,meta:this.opts.getMeta(),sentAt:Date.now()}}requeue(e){this.buffer.unshift(...e.events),this.seq--;}static GZIP_THRESHOLD_BYTES=64*1024;preferPlain=false;plainRetrySeq=null;static gzipDeadlineMs(e){return Math.min(15e3,2e3+Math.ceil(e/1e6)*1e3)}async encodeBody(e,r=false){if(r||this.preferPlain||e.length<t.GZIP_THRESHOLD_BYTES||typeof CompressionStream>"u")return {body:e};try{let n=await new Promise(s=>{let i=setTimeout(()=>s(null),t.gzipDeadlineMs(e.length));try{let l=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));new Response(l).blob().then(u=>{clearTimeout(i),s(u);}).catch(()=>{clearTimeout(i),s(null);});}catch{clearTimeout(i),s(null);}});return n?{body:n,encoding:"gzip"}:(this.preferPlain=!0,{body:e})}catch{return {body:e}}}flush(){return this.flushing?(this.flushAgain=true,this.flushing):(this.flushing=this.drainAll().finally(()=>{this.flushing=void 0;}),this.flushing)}async drainAll(){do{if(this.flushAgain=false,Date.now()<this.notBefore)return;for(let e=0;e<oh;e++){let r=this.drain();if(!r)break;if(!await this.send(r))return}}while(this.flushAgain)}async send(e){let r=this.plainRetrySeq===e.seq,{body:n,encoding:s}=await this.encodeBody(JSON.stringify(e),r);try{let i=await fetch(this.url,{method:"POST",headers:{"content-type":"application/json",...s?{"content-encoding":s}:{},"x-api-key":this.opts.apiKey},body:n,credentials:"omit",mode:"cors",signal:typeof AbortSignal<"u"&&"timeout"in AbortSignal?AbortSignal.timeout(6e4):void 0});return i.ok?(this.backoffMs=0,r&&(this.preferPlain=!0,this.plainRetrySeq=null),!0):s&&(i.status===400||i.status===415)?(this.plainRetrySeq=e.seq,this.requeue(e),!1):i.status===402?(this.opts.onQuotaExceeded?.(),!0):i.status===429||i.status>=500?(this.backOff(i.headers?.get?.("retry-after")),this.requeue(e),!1):(console.warn(`[replayops] collector rejected batch seq=${e.seq} with ${i.status}`+(i.status===413?": payload too large, so this session may not be replayable. Raise the ingest body limit.":"")),!0)}catch{return s?this.plainRetrySeq=e.seq:(r&&(this.plainRetrySeq=null),this.backOff(null)),this.requeue(e),false}}backOff(e){this.backoffMs=Math.min(Ja,this.backoffMs?this.backoffMs*2:lh);let r=Number(e)*1e3,n=Number.isFinite(r)&&r>0?Math.min(Ja,Math.max(r,this.backoffMs)):this.backoffMs;this.notBefore=Date.now()+n+Math.floor(Math.random()*n*.25);}flushBeacon=()=>{let e=this.drain(ah);e&&fetch(this.url,{method:"POST",headers:{"content-type":"application/json","x-api-key":this.opts.apiKey},body:JSON.stringify(e),keepalive:true,credentials:"omit",mode:"cors"}).catch(()=>{});}};function Gr(t,e){let r=i=>{let l=i.target;return !!l&&t.contains(l)},n=i=>{r(i)&&(i.stopImmediatePropagation(),i.type==="click"&&ch(t,i));};for(let i of e.atWindow)window.addEventListener(i,n,true);let s=i=>{i.stopPropagation();};for(let i of e.atRoot)t.addEventListener(i,s);return ()=>{for(let i of e.atWindow)window.removeEventListener(i,n,true);for(let i of e.atRoot)t.removeEventListener(i,s);}}function ch(t,e){let r=e.target;for(;r&&r!==t;){if(typeof r.onclick=="function"){r.onclick(e);return}r=r.parentElement;}}var Ka={atWindow:["pointerdown","pointerup","mousedown","mouseup","touchstart","touchend","click","focusin","focusout"],atRoot:[]},Qa={atWindow:["click","focusin","focusout"],atRoot:["pointerdown","pointerup","pointermove","mousedown","mouseup","touchstart","touchend"]};var el=["#ef4444","#f59e0b","#22c55e","#3b82f6"],Yr=null;function uh(t){let e=window;return e.html2canvas?Promise.resolve(e.html2canvas):Yr||(Yr=new Promise((r,n)=>{let s=document.createElement("script");s.src=`${t}/sdk/v1/html2canvas.min.js`,s.async=true,s.onload=()=>e.html2canvas?r(e.html2canvas):n(new Error("html2canvas missing")),s.onerror=()=>n(new Error("html2canvas failed to load")),document.head.appendChild(s);}),Yr)}var Xn=null;async function tl(t){if(Xn)return;let e=t.endpoint.replace(/\/$/,""),r=await hh();if(!r){let s=Te("","position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:2147483646;background:#111827;color:#fff;font:600 13px system-ui,sans-serif;padding:8px 14px;border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.3)");s.textContent="\u{1F41E} Capturing the screen\u2026",s.setAttribute("data-ignore",""),document.body.appendChild(s);try{r=await(await uh(e))(document.documentElement,{backgroundColor:"#ffffff",useCORS:!0,logging:!1,scale:Math.min(2,window.devicePixelRatio||1),ignoreElements:l=>l instanceof HTMLElement&&l.hasAttribute("data-ignore"),x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,windowWidth:document.documentElement.scrollWidth,windowHeight:document.documentElement.scrollHeight});}catch{s.remove(),rl(e,t,null);return}s.remove();}let n=yh(r,1600);fh(e,t,n);}var er=null;async function dh(t){Zr();try{let e=await t.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"});return e.getVideoTracks().forEach(r=>r.onended=()=>{er===e&&(er=null);}),er=e,e}catch{return null}}async function hh(){let t=navigator.mediaDevices;if(!t?.getDisplayMedia)return null;let e=await dh(t);if(!e)return null;let r=document.createElement("style");r.setAttribute("data-ignore",""),r.textContent="[data-ignore]{visibility:hidden !important}",document.head.appendChild(r);try{let n=document.createElement("video");n.srcObject=e,n.muted=!0,await n.play(),await new Promise(u=>setTimeout(u,200));let s=n.videoWidth||window.innerWidth,i=n.videoHeight||window.innerHeight,l=document.createElement("canvas");return l.width=s,l.height=i,l.getContext("2d").drawImage(n,0,0,s,i),n.srcObject=null,l}catch{return null}finally{r.remove(),Zr();}}function Zr(){er?.getTracks().forEach(t=>t.stop()),er=null;}function fh(t,e,r){let n=document.createElement("style");n.setAttribute("data-ignore",""),n.textContent="@media (max-width:760px){.ro-tester-root{flex-direction:column !important}.ro-tester-stage{flex:1 1 45% !important;min-height:0;padding:8px !important}.ro-tester-panel{width:100% !important;flex:1 1 55% !important;min-height:0}}",document.head.appendChild(n);let s=Te("ro-tester-root","position:fixed;inset:0;z-index:2147483646;pointer-events:auto;background:rgba(15,23,42,.82);display:flex;font-family:system-ui,-apple-system,sans-serif"),i=Gr(s,Qa);s.setAttribute("data-ignore","");let l=Te("ro-tester-stage","flex:1;min-width:0;display:grid;place-items:center;padding:16px;overflow:auto"),u=document.createElement("canvas");u.width=r.width,u.height=r.height,u.style.cssText="max-width:100%;max-height:100%;box-shadow:0 8px 40px rgba(0,0,0,.5);cursor:crosshair;touch-action:none;background:#fff",l.appendChild(u);let o=u.getContext("2d"),h=[],a="rect",f=el[0],d=null,c=()=>Math.max(2,Math.round(u.width/320)),m=()=>Math.max(16,Math.round(u.width/40)),p=L=>{if(o.strokeStyle=L.color,o.fillStyle=L.color,o.lineWidth=c(),o.lineJoin=o.lineCap="round",L.tool==="text"){let q=L.points[0];q&&L.text&&(o.font=`700 ${m()}px system-ui,sans-serif`,o.textBaseline="top",L.text.split(`
129
+ `).forEach((te,ne)=>o.fillText(te,q.x,q.y+ne*m()*1.25)));return}if(L.tool==="pen"){o.beginPath(),L.points.forEach((q,te)=>te?o.lineTo(q.x,q.y):o.moveTo(q.x,q.y)),o.stroke();return}if(L.points.length<2)return;let P=L.points[0],F=L.points[L.points.length-1];if(L.tool==="rect")o.strokeRect(P.x,P.y,F.x-P.x,F.y-P.y);else {o.beginPath(),o.moveTo(P.x,P.y),o.lineTo(F.x,F.y),o.stroke();let q=Math.atan2(F.y-P.y,F.x-P.x),te=c()*4;o.beginPath(),o.moveTo(F.x,F.y),o.lineTo(F.x-te*Math.cos(q-Math.PI/6),F.y-te*Math.sin(q-Math.PI/6)),o.lineTo(F.x-te*Math.cos(q+Math.PI/6),F.y-te*Math.sin(q+Math.PI/6)),o.closePath(),o.fill();}},g=()=>{o.clearRect(0,0,u.width,u.height),o.drawImage(r,0,0),h.forEach(p),d&&p(d);};g();let x=L=>{let P=u.getBoundingClientRect();return {x:(L.clientX-P.left)/P.width*u.width,y:(L.clientY-P.top)/P.height*u.height}};u.addEventListener("pointerdown",L=>{if(a==="text"){L.preventDefault();let P=x(L);gh(L.clientX,L.clientY,f,F=>{F.trim()&&(h.push({tool:"text",color:f,points:[P],text:F}),g());});return}u.setPointerCapture(L.pointerId),d={tool:a,color:f,points:[x(L)]};}),u.addEventListener("pointermove",L=>{if(!d)return;let P=x(L);d.tool==="pen"?d.points.push(P):d.points[1]=P,g();}),u.addEventListener("pointerup",()=>{if(!d)return;let L=d;d=null,(L.tool==="pen"?L.points.length>1:L.points.length>=2)&&h.push(L),g();});let y=Te("ro-tester-panel","width:320px;flex-shrink:0;background:#fff;display:flex;flex-direction:column;color:#0f172a;min-height:0");y.innerHTML='<div style="padding:14px 16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #e2e8f0"><span style="font-size:18px">\u{1F41E}</span><b style="font-size:16px">Tester mode</b></div>';let b=Te("","padding:14px 16px;overflow-y:auto;flex:1");y.appendChild(b);let S=Te("","display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px"),w={};[["rect","\u25AD"],["arrow","\u2197"],["pen","\u270E"],["text","T"]].forEach(([L,P])=>{let F=Qt(P,"width:34px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font-size:15px;cursor:pointer");F.onclick=()=>{a=L,Object.values(w).forEach(q=>q.style.background="#fff"),F.style.background="#e0e7ff";},w[L]=F,S.appendChild(F);}),w.rect.style.background="#e0e7ff",el.forEach(L=>{let P=Te("",`width:22px;height:22px;border-radius:50%;background:${L};cursor:pointer;border:2px solid ${L===f?"#fff":"transparent"};outline:2px solid ${L===f?L:"transparent"}`);P.onclick=()=>{f=L,[...S.querySelectorAll("[data-swatch]")].forEach(F=>{F.style.border="2px solid transparent",F.style.outline="2px solid transparent";}),P.style.border="2px solid #fff",P.style.outline=`2px solid ${L}`;},P.setAttribute("data-swatch",""),S.appendChild(P);});let v=Qt("\u21B6","margin-left:auto;width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");v.onclick=()=>{h.pop(),g();};let C=Qt("\u{1F5D1}","width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");C.onclick=()=>{h.length=0,g();},S.append(v,C),b.appendChild(S);let _=document.createElement("textarea");_.placeholder="What's wrong on this page? (optional, AI will draft it)",_.style.cssText="width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;min-height:90px;resize:vertical";let T=Te("","font-size:12px;color:#64748b;margin-top:10px;word-break:break-all"),R=document.createElement("b");R.style.color="#334155",R.textContent="URL ",T.append(R,document.createTextNode(location.href)),b.append(mh("What's wrong?",_),T);let z=Te("","display:flex;gap:8px;padding:14px 16px;border-top:1px solid #e2e8f0"),D=Qt("Cancel","flex:1;padding:10px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font:inherit;cursor:pointer"),E=Qt("Open ticket","flex:1;padding:10px;border:0;background:#0d9488;color:#fff;border-radius:8px;font:600 14px system-ui;cursor:pointer");z.append(D,E),y.appendChild(z),s.append(l,y),document.body.appendChild(s);let me=()=>{i(),s.remove(),n.remove(),Xn=null;};Xn=me,D.onclick=me,E.onclick=()=>{E.disabled=true,E.textContent="Opening\u2026";let L=u.toDataURL("image/jpeg",.85);rl(t,e,{title:"",note:_.value.trim(),screenshot:L}),me();};}function rl(t,e,r){let n=new URLSearchParams({key:e.apiKey,url:location.href,sid:e.sessionId}),s=`${t}/tester-report.html?${n.toString()}`,i=window.open(s,"replayops-tester","width=480,height=680");if(!i){ph(s);return}if(!r)return;let l=u=>{u.origin!==t||!u.data||u.data.type!=="ro-tester:popup-ready"||(window.removeEventListener("message",l),i.postMessage({type:"ro-tester:payload",...r},t));};window.addEventListener("message",l);}function ph(t){let e=Te("","position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483647;pointer-events:auto;max-width:min(420px,calc(100vw - 32px));background:#0f172a;color:#fff;padding:14px 16px;border-radius:12px;font:14px system-ui;box-shadow:0 12px 40px rgba(0,0,0,.35)");e.setAttribute("data-ignore","");let r=document.createElement("div");r.textContent="ReplayOps could not open the report window. Your browser or app blocked it.";let n=document.createElement("a");n.href=t,n.target="_blank",n.rel="noopener",n.textContent="Open the report form",n.style.cssText="color:#5eead4;display:inline-block;margin-top:8px",e.append(r,n),document.body.appendChild(e),setTimeout(()=>e.remove(),12e3);}function Te(t,e){let r=document.createElement("div");return t&&(r.className=t),r.style.cssText=e,r}function Qt(t,e){let r=document.createElement("button");return r.type="button",r.textContent=t,r.style.cssText=e,r}function mh(t,e){let r=Te("","margin-bottom:4px"),n=Te("","font-size:12px;font-weight:700;color:#475569;margin:8px 0 4px");return n.textContent=t,r.append(n,e),r}function gh(t,e,r,n){let s=document.createElement("input");s.setAttribute("data-ignore",""),s.placeholder="Type, then Enter";let i=Math.min(t,window.innerWidth-180),l=Math.min(e,window.innerHeight-40);s.style.cssText=`position:fixed;left:${i}px;top:${l}px;z-index:2147483647;font:700 15px system-ui;color:${r};background:rgba(255,255,255,.98);border:2px solid ${r};border-radius:4px;padding:4px 8px;outline:none;min-width:140px;box-shadow:0 4px 16px rgba(0,0,0,.25)`;let u=false,o=()=>{if(u)return;u=true;let h=s.value;s.remove(),n(h);};s.addEventListener("keydown",h=>{h.stopPropagation(),h.key==="Enter"&&(h.preventDefault(),o()),h.key==="Escape"&&(s.value="",o());}),document.body.appendChild(s),setTimeout(()=>{s.focus(),setTimeout(()=>s.addEventListener("blur",o),60);},0);}function yh(t,e){if(t.width<=e)return t;let r=e/t.width,n=document.createElement("canvas");return n.width=e,n.height=Math.round(t.height*r),n.getContext("2d").drawImage(t,0,0,n.width,n.height),n}var vh=1e4,bh=3e3;function wh(){let t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}var Xr=class{constructor(e){this.opts=e;}opts;ws;heartbeat;watching=false;closed=false;claim=wh();lifecycleOff=[];widget;control;start(){(this.opts.chat||this.opts.tester)&&(this.widget=new Jn({chat:!!this.opts.chat,onSend:e=>this.sendChat(e),onTester:this.opts.tester?()=>this.openTesterMode():void 0})),this.connect(),this.patchHistory(),this.watchLifecycle();}watchLifecycle(){let e=()=>{if(this.closed)return;let i=this.ws?.readyState;i===WebSocket.OPEN||i===WebSocket.CONNECTING||this.connect();},r=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close();},n=()=>document.visibilityState==="visible"?e():void 0,s=(i,l,u)=>{i.addEventListener(l,u),this.lifecycleOff.push(()=>i.removeEventListener(l,u));};s(window,"pagehide",r),s(window,"pageshow",e),s(window,"online",e),s(document,"visibilitychange",n);}openTesterMode(){tl({endpoint:this.opts.endpoint,apiKey:this.opts.apiKey,sessionId:this.opts.sessionId});}feedEvent(e){this.watching&&this.send({t:"evt",e});}stop(){this.closed=true;for(let e of this.lifecycleOff)e();this.lifecycleOff=[],this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close(),this.widget?.destroy(),Zr(),this.endControl();}wsUrl(){return `${this.opts.endpoint.replace(/^http/,"ws").replace(/\/$/,"")}/ws/live?key=${encodeURIComponent(this.opts.apiKey)}`}connect(){if(this.closed)return;let e=this.ws?.readyState;if(e===WebSocket.OPEN||e===WebSocket.CONNECTING)return;let r;try{r=new WebSocket(this.wsUrl());}catch{return}this.ws=r,r.onopen=()=>{this.send({t:"hello",sessionId:this.opts.sessionId,claim:this.claim,url:location.href,identity:this.opts.getIdentity(),meta:this.opts.getMeta()}),this.heartbeat=setInterval(()=>this.send({t:"ping"}),vh);},r.onmessage=n=>{let s;try{s=JSON.parse(String(n.data));}catch{return}s.t==="watch"?(this.watching=!!s.on,s.on?(this.send({t:"evt",e:{type:4,timestamp:Date.now(),data:{href:location.href,width:window.innerWidth,height:window.innerHeight}}}),this.opts.onWatchStart()):this.endControl()):s.t==="chat"&&typeof s.text=="string"?this.widget?.receive(s.text):s.t==="control-request"?this.onControlRequest():s.t==="control-cmd"&&s.cmd?this.control?.apply(s.cmd):s.t==="control-end"&&this.endControl();},r.onclose=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.watching=false,this.closed||setTimeout(()=>this.connect(),bh);},r.onerror=()=>r.close();}sendChat(e){this.send({t:"chat",text:e});}onControlRequest(){this.opts.remoteControl===false||this.control||xh(()=>this.grantControl(),()=>this.send({t:"control",on:false}));}grantControl(){this.control||(this.send({t:"control",on:true}),this.control=new Kn(()=>{this.send({t:"control",on:false}),this.endControl();}));}endControl(){this.control?.destroy(),this.control=void 0;}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e));}patchHistory(){zr(()=>this.send({t:"nav",url:location.href}));}},Jn=class{root;unshield;panel;log;badge;open=false;onSend;constructor(e){let{chat:r,onTester:n}=e;if(this.onSend=e.onSend,Qn(),this.root=le("div","ro-live-root"),this.root.setAttribute("data-ignore",""),r&&this.buildChat(),n){let s=le("button","ro-live-tester-launcher");s.type="button",s.setAttribute("aria-label","Report a bug (tester)"),s.title="Tester tools",s.textContent="\u{1F41E}",s.onclick=()=>n(),this.root.append(s);}this.isolateFromHost(),document.body.appendChild(this.root);}isolateFromHost(){this.unshield=Gr(this.root,Ka);}buildChat(){let e=le("button","ro-live-launcher");e.setAttribute("aria-label","Chat"),e.innerHTML="\u{1F4AC}",this.badge=le("span","ro-live-badge"),this.badge.style.display="none",e.appendChild(this.badge),e.onclick=()=>this.toggle(),this.panel=le("div","ro-live-panel");let r=le("div","ro-live-header");r.textContent="Chat with us",this.log=le("div","ro-live-log");let n=le("form","ro-live-form"),s=le("input","ro-live-input");s.placeholder="Type a message\u2026";let i=le("button","ro-live-send");i.type="submit",i.textContent="Send",n.append(s,i),n.onsubmit=l=>{l.preventDefault();let u=s.value.trim();u&&(s.value="",this.append(u,"me"),this.onSend(u));},this.panel.append(r,this.log,n),this.panel.style.display="none",this.root.append(this.panel,e);}toggle(){this.panel&&(this.open=!this.open,this.panel.style.display=this.open?"flex":"none",this.open&&this.badge&&(this.badge.style.display="none",this.badge.textContent=""));}receive(e){if(!(!this.log||!this.badge)&&(this.append(e,"agent"),!this.open)){let r=(parseInt(this.badge.textContent||"0",10)||0)+1;this.badge.textContent=String(r),this.badge.style.display="grid";}}append(e,r){if(!this.log)return;let n=le("div",`ro-live-msg ro-live-${r}`);n.textContent=e,this.log.appendChild(n),this.log.scrollTop=this.log.scrollHeight;}destroy(){this.unshield?.(),this.root.remove();}};function xh(t,e){Qn();let r=le("div","ro-ctl-consent");r.setAttribute("data-ignore","");let n=le("div","ro-ctl-card");n.innerHTML='<div class="ro-ctl-title">Allow support to control your screen?</div><div class="ro-ctl-body">A support agent is asking to take control of this page to help you. They can move your cursor, click, scroll and type. You can stop this at any time.</div>';let s=le("div","ro-ctl-actions"),i=le("button","ro-ctl-btn ro-ctl-decline");i.textContent="Not now";let l=le("button","ro-ctl-btn ro-ctl-allow");l.textContent="Allow control",s.append(i,l),n.appendChild(s),r.appendChild(n),document.body.appendChild(r);let u=()=>r.remove();i.onclick=()=>{u(),e();},l.onclick=()=>{u(),t();};}var Kn=class{constructor(e){this.onStop=e;Qn(),this.banner=le("div","ro-ctl-banner"),this.banner.setAttribute("data-ignore","");let r=le("span","ro-ctl-banner-text");r.textContent="A support agent is controlling your screen";let n=le("button","ro-ctl-stop");n.textContent="Stop",n.onclick=()=>this.onStop(),this.banner.append(r,n),this.cursor=le("div","ro-ctl-cursor"),this.cursor.setAttribute("data-ignore",""),this.cursor.innerHTML='<span class="ro-ctl-cursor-label">Agent</span>',document.body.append(this.banner,this.cursor);}onStop;banner;cursor;apply(e){switch(e.c){case "cursor":this.moveCursor(e.x,e.y);break;case "click":this.moveCursor(e.x,e.y),this.clickAt(e.x*window.innerWidth,e.y*window.innerHeight);break;case "scroll":window.scrollBy({left:e.x,top:e.y,behavior:"auto"});break;case "key":this.typeKey(e.key);break;case "nav":e.url&&e.url!==location.href&&/^https?:\/\//i.test(e.url)&&(location.href=e.url);break}}moveCursor(e,r){this.cursor.style.left=`${e*window.innerWidth}px`,this.cursor.style.top=`${r*window.innerHeight}px`;}clickAt(e,r){let n=document.elementFromPoint(e,r);if(!n||this.isOurs(n))return;let s={bubbles:true,cancelable:true,clientX:e,clientY:r,view:window};n.dispatchEvent(new MouseEvent("mousedown",s)),n.dispatchEvent(new MouseEvent("mouseup",s)),n.dispatchEvent(new MouseEvent("click",s));let i=n.tagName;(i==="INPUT"||i==="TEXTAREA"||i==="SELECT"||n.isContentEditable)&&n.focus(),this.pulse(e,r);}typeKey(e){let r=document.activeElement;if(!(!r||this.isOurs(r)||!(r.tagName==="INPUT"||r.tagName==="TEXTAREA"))&&!(r.tagName==="INPUT"&&r.type==="password")){if(e==="Enter"){r.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:true})),r.form?.requestSubmit?.();return}if(e==="Backspace")r.value=r.value.slice(0,-1);else if(e.length===1)r.value+=e;else return;r.dispatchEvent(new Event("input",{bubbles:true})),r.dispatchEvent(new Event("change",{bubbles:true}));}}pulse(e,r){let n=le("div","ro-ctl-pulse");n.setAttribute("data-ignore",""),n.style.left=`${e}px`,n.style.top=`${r}px`,document.body.appendChild(n),setTimeout(()=>n.remove(),600);}isOurs(e){return !!e.closest("[data-ignore]")}destroy(){this.banner.remove(),this.cursor.remove();}};function le(t,e){let r=document.createElement(t);return r.className=e,r}var sl=false;function Qn(){if(sl)return;sl=true;let t=document.createElement("style");t.setAttribute("data-ignore",""),t.textContent=`
130
+ .ro-live-root{position:fixed;right:20px;bottom:20px;max-width:calc(100vw - 24px);z-index:2147483000;pointer-events:auto;font-family:system-ui,-apple-system,sans-serif;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
131
131
  .ro-live-launcher{width:56px;height:56px;border-radius:50%;border:none;background:#6366f1;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);position:relative}
132
132
  .ro-live-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:#ef4444;color:#fff;font-size:12px;display:grid;place-items:center;padding:0 5px}
133
133
  /* Caps keep the panel inside a small phone viewport (a 320px panel plus
@@ -143,7 +143,7 @@ or you can use record.mirror to access the mirror instance during recording.`,uo
143
143
  .ro-live-send{border:none;background:#6366f1;color:#fff;border-radius:10px;padding:0 14px;font-size:14px;cursor:pointer}
144
144
  .ro-live-tester-launcher{width:44px;height:44px;border-radius:50%;border:none;background:#0d9488;color:#fff;font-size:20px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);display:grid;place-items:center;padding:0;line-height:1}
145
145
  .ro-live-tester-launcher:hover{background:#0f766e}
146
- .ro-ctl-consent{position:fixed;inset:0;z-index:2147483600;background:rgba(10,14,22,.55);display:grid;place-items:center;font-family:system-ui,-apple-system,sans-serif}
146
+ .ro-ctl-consent{position:fixed;inset:0;z-index:2147483600;pointer-events:auto;background:rgba(10,14,22,.55);display:grid;place-items:center;font-family:system-ui,-apple-system,sans-serif}
147
147
  .ro-ctl-card{width:min(420px,92vw);background:#fff;color:#111;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:22px}
148
148
  .ro-ctl-title{font-size:17px;font-weight:700;margin-bottom:8px}
149
149
  .ro-ctl-body{font-size:14px;line-height:1.5;color:#444}
@@ -151,7 +151,7 @@ or you can use record.mirror to access the mirror instance during recording.`,uo
151
151
  .ro-ctl-btn{border:none;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:600;cursor:pointer}
152
152
  .ro-ctl-decline{background:#eceef4;color:#333}
153
153
  .ro-ctl-allow{background:#6366f1;color:#fff}
154
- .ro-ctl-banner{position:fixed;top:0;left:0;right:0;z-index:2147483500;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;gap:14px;padding:9px 16px;font-family:system-ui,-apple-system,sans-serif;font-size:13px;box-shadow:0 2px 12px rgba(0,0,0,.3)}
154
+ .ro-ctl-banner{position:fixed;top:0;left:0;right:0;z-index:2147483500;pointer-events:auto;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;gap:14px;padding:9px 16px;font-family:system-ui,-apple-system,sans-serif;font-size:13px;box-shadow:0 2px 12px rgba(0,0,0,.3)}
155
155
  .ro-ctl-banner-text::before{content:'\u25CF';color:#f87171;margin-right:7px}
156
156
  .ro-ctl-stop{border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;border-radius:8px;padding:4px 12px;font-size:13px;font-weight:600;cursor:pointer}
157
157
  .ro-ctl-cursor{position:fixed;z-index:2147483400;width:14px;height:14px;pointer-events:none;transform:translate(-2px,-2px);transition:left .06s linear,top .06s linear}
@@ -159,7 +159,7 @@ or you can use record.mirror to access the mirror instance during recording.`,uo
159
159
  .ro-ctl-cursor-label{position:absolute;left:14px;top:12px;background:#6366f1;color:#fff;font:600 11px system-ui,sans-serif;padding:1px 6px;border-radius:6px;white-space:nowrap}
160
160
  .ro-ctl-pulse{position:fixed;z-index:2147483400;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:rgba(99,102,241,.5);pointer-events:none;animation:ro-ctl-pulse .6s ease-out forwards}
161
161
  @keyframes ro-ctl-pulse{from{transform:scale(.4);opacity:.9}to{transform:scale(2.6);opacity:0}}
162
- `,document.head.appendChild(t);}function Wa(){let t=document.cookie.match(/(?:^|;\s*)_ga=([^;]+)/);if(!t)return;let e=decodeURIComponent(t[1]).split(".");if(!(e.length<4))return `${e[e.length-2]}.${e[e.length-1]}`}function Va(t){let e=window.gtag;if(typeof e=="function")try{e("event","replayops_session",{replayops_session_id:t});}catch{}}function qn(t,e,r,s){return {entryUrl:s,currentUrl:location.href,referrer:document.referrer,device:Ln(navigator.userAgent),screen:{width:window.innerWidth||document.documentElement?.clientWidth||window.screen?.width||1,height:window.innerHeight||document.documentElement?.clientHeight||window.screen?.height||1,dpr:window.devicePixelRatio||1},language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,environment:t,releaseVersion:e,sdkVersion:r}}function Zd(t){switch((t.inputType??"text").toLowerCase()){case "email":return "rerun@replayops.test";case "password":return "ReRunTest!12345";case "tel":case "number":return "4242424242";default:return "ReplayOps re-run"}}function Yd(){let t=/ro_rerun=([^&]+)/.exec(location.hash);if(!t)return null;let[e,r]=t[1].split("|");if(!e||!r)return null;let s=decodeURIComponent(e).replace(/\/$/,"");try{let n=new URL(s);if(n.protocol!=="https:"&&n.protocol!=="http:")return null;let i=n.hostname==="localhost"||n.hostname==="127.0.0.1";if(location.protocol==="https:"&&n.protocol!=="https:"&&!i)return null}catch{return null}return {api:s,token:r}}function Be(t,e,r){let s=document.createElement(t);return s.setAttribute("style",e),r&&(s.textContent=r),s}var Xd="position:fixed;z-index:2147483646;bottom:16px;left:16px;max-width:340px;padding:14px 16px;background:#0f172a;color:#f1f5f9;border-radius:12px;font:13px/1.45 system-ui,sans-serif;box-shadow:0 8px 30px rgba(0,0,0,.35);",qr="margin-top:10px;margin-right:8px;padding:6px 14px;border:none;border-radius:8px;cursor:pointer;font:600 13px system-ui,sans-serif;background:#2ec2b3;color:#04211d;",Vr=qr+"background:transparent;color:#94a3b8;border:1px solid #334155;";async function Jd(t,e){let r=Date.now()+t;for(;!e.stopped&&(Date.now()<r||e.paused);)await new Promise(s=>setTimeout(s,100));}async function Kd(t,e){let r=Date.now()+5e3;for(;Date.now()<r&&!e.stopped;){if(e.paused){await new Promise(s=>setTimeout(s,150));continue}for(let s of t.selectors??[]){let n=[];try{n=[...document.querySelectorAll(s)];}catch{continue}if(!n.length)continue;return (t.text?n.find(l=>(l.textContent??"").replace(/\s+/g," ").trim().includes(t.text)):void 0)??n[0]}if(typeof t.x=="number"&&typeof t.y=="number"){let s=document.elementFromPoint(t.x,t.y);if(s)return s}await new Promise(s=>setTimeout(s,250));}return null}function Qd(t,e){let r=t instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;Object.getOwnPropertyDescriptor(r,"value")?.set?.call(t,e),t.dispatchEvent(new Event("input",{bubbles:true})),t.dispatchEvent(new Event("change",{bubbles:true}));}function eh(t){try{let e=new URL(t,location.href);return e.origin!==location.origin?!1:(location.href=e.href,!0)}catch{return false}}async function th(t,e,r){let s=0,n=0,i=0,l;for(let c=0;c<t.steps.length&&!r.stopped;c++){let a=t.steps[c];i=c+1,e.textContent=`Re-run ${c+1}/${t.steps.length} \u2014 ${a.label}`;let h=l===void 0?300:a.offsetMs-l;if(l=a.offsetMs,await Jd(Math.min(Math.max(h,300),2500),r),r.stopped)break;if(a.kind==="open"){s++;continue}if(a.kind==="navigate"&&a.url){eh(a.url)?s++:n++;continue}let o=await Kd(a,r);if(r.stopped)break;if(!o){n++;continue}o.scrollIntoView({block:"center",behavior:"instant"}),a.kind==="click"?(o.click(),s++):a.kind==="input"&&(Qd(o,a.masked?Zd(a):a.value??""),s++);}return {ok:s,failed:n,done:i}}function qa(t){let e=Yd();if(!e)return;history.replaceState(null,"",location.href.replace(/#?ro_rerun=[^&]+&?/,"").replace(/#$/,""));let r=async()=>{let s;try{let o=await fetch(`${e.api}/v1/public/rerun/${encodeURIComponent(e.token)}`);if(!o.ok)return;s=await o.json();}catch{return}if(!s.steps?.length)return;let n=Be("div",Xd),i=Be("div","font-weight:700;margin-bottom:4px;","ReplayOps scenario re-run"),l=Be("div","color:#cbd5e1;",`${s.steps.length} recorded steps from session ${s.sessionId.slice(0,8)} (via ${new URL(e.api).host}) will be replayed on this page.`),c=Be("button",qr,"Run scenario"),a=Be("button",Vr,"Dismiss");n.append(i,l,c,a),document.body.appendChild(n),a.addEventListener("click",()=>n.remove());let h=async()=>{let o={paused:false,stopped:false},p=false,d=Be("button",qr,"Pause"),u=Be("button",Vr,"Restart"),m=Be("button",Vr,"Stop");n.append(d,u,m),d.addEventListener("click",()=>{o.paused=!o.paused,d.textContent=o.paused?"Resume":"Pause";}),u.addEventListener("click",()=>{p=true,o.stopped=true;}),m.addEventListener("click",()=>{o.stopped=true;}),t("replayops_rerun",{sourceSessionId:s.sessionId,steps:s.steps.length});let f=await th(s,l,o);if(d.remove(),u.remove(),m.remove(),p)return h();l.textContent=o.stopped?`Re-run stopped at step ${f.done}/${s.steps.length}.`:`Re-run finished \u2014 ${f.ok}/${s.steps.length} steps succeeded`+(f.failed?`, ${f.failed} failed.`:".");let g=Be("button",qr,"Run again"),x=Be("button",Vr,"Dismiss");n.append(g,x),g.addEventListener("click",()=>{g.remove(),x.remove(),h();}),x.addEventListener("click",()=>n.remove());};c.addEventListener("click",()=>{c.remove(),a.remove(),h();});};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{r();},{once:true}):r();}var Ha="0.1.0",er=class{config;identity;recorder;transport;live;state="idle";sessionId="";entryUrl="";extraMask=[];extraIgnore=[];policyMaskInputs;policyLiveChat;policyLive;init(e){this.config||(this.config=Hn(e),this.identity=new tr,this.sessionId=rr(),this.entryUrl=location.href,!this.identity.isOptedOut()&&(this.config.requireConsent&&!this.identity.hasConsent()||Xn(this.config.samplingRate)&&this.bootstrap()));}async bootstrap(){await this.fetchPolicy(),this.start(),this.watchIdle(),qa((e,r)=>this.track(e,r));}lastActivityAt=Date.now();watchIdle(){let e=this.config?.idleTimeoutMs??0;if(e<=0)return;let r=0,s=()=>{let i=Date.now();(this.state==="suspended"||this.state==="recording"&&i-this.lastActivityAt>e)&&this.rotate(),i-r>1e3&&(r=i,this.lastActivityAt=i);};for(let i of ["pointerdown","keydown","mousemove","scroll","touchstart"])window.addEventListener(i,s,{capture:true,passive:true});let n=()=>{this.state==="recording"&&(Date.now()-this.lastActivityAt<=e||(this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="suspended"));};setInterval(n,6e4),document.addEventListener("visibilitychange",n);}rotate(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.sessionId=rr(),this.entryUrl=location.href,this.state="idle",this.start();}async fetchPolicy(){if(this.config)try{let e=`${this.config.endpoint.replace(/\/$/,"")}/v1/config`,r=new AbortController,s=setTimeout(()=>r.abort(),1500),n=await fetch(e,{headers:{"x-api-key":this.config.apiKey},signal:r.signal}).finally(()=>clearTimeout(s));if(n.ok){let i=await n.json();typeof i.maskInputs=="boolean"&&(this.policyMaskInputs=i.maskInputs),typeof i.liveChat=="boolean"&&(this.policyLiveChat=i.liveChat),typeof i.live=="boolean"&&(this.policyLive=i.live);}}catch{}}start(){if(!this.config||!this.identity||this.state==="recording")return;let e={...this.config,maskInputs:this.policyMaskInputs??this.config.maskInputs,live:(this.policyLive??this.config.live)&&this.config.live,liveChat:(this.policyLiveChat??this.config.liveChat)&&this.config.liveChat,maskSelectors:[...this.config.maskSelectors,...this.extraMask],ignoreSelectors:[...this.config.ignoreSelectors,...this.extraIgnore]};if(this.transport=new jr(this.sessionId,{endpoint:e.endpoint,projectId:e.projectId,apiKey:e.apiKey,batchSize:e.batchSize,flushIntervalMs:e.flushIntervalMs,getMeta:()=>qn(e.environment,e.releaseVersion,Ha,this.entryUrl),getIdentity:()=>this.identity.snapshot()}),e.live&&(this.live=new Wr({endpoint:e.endpoint,apiKey:e.apiKey,sessionId:this.sessionId,chat:e.liveChat,getIdentity:()=>{let r=this.identity.snapshot();return {anonymousId:r.anonymousId,userId:r.userId,email:r.userTraits?.email}},getMeta:()=>{let r=qn(e.environment,e.releaseVersion,Ha,this.entryUrl).device;return {browser:r.browser,os:r.os,deviceType:r.deviceType}},onWatchStart:()=>this.recorder?.takeFullSnapshot()})),this.recorder=new Br(e,r=>{this.transport.enqueue(r),this.live?.feedEvent(r);},this.sessionId),this.transport.start(),this.recorder.start(),this.live?.start(),e.googleAnalytics){let r=Wa();r&&(this.recorder.emitCustom("$ga",{clientId:r}),Va(this.sessionId));}this.state="recording";}pause(){this.state==="recording"&&(this.recorder?.stop(),this.recorder=void 0,this.live?.stop(),this.live=void 0,this.state="paused");}resume(){this.state==="paused"&&this.start();}stop(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="stopped";}identify(e,r){this.identity?.identify(e,r),this.recorder?.emitCustom("$identify",{userId:e,...r??{}});}track(e,r={}){this.recorder?.emitCustom(e,r);}setUserProperties(e){this.identity?.setUserProperties(e);}mask(e){this.extraMask.push(e);}ignore(e){this.extraIgnore.push(e);}consent(e){this.identity?.setConsent(e),e&&this.state==="idle"&&this.config&&this.start(),e||this.stop();}optOut(){this.identity?.optOut(),this.stop();}getState(){return this.state}getSessionId(){return this.sessionId}};var Ga=new er;typeof window<"u"&&(window.ReplayOps=Ga);var jf=Ga;/*! Bundled license information:
162
+ `,document.head.appendChild(t);}function nl(){let t=document.cookie.match(/(?:^|;\s*)_ga=([^;]+)/);if(!t)return;let e=decodeURIComponent(t[1]).split(".");if(!(e.length<4))return `${e[e.length-2]}.${e[e.length-1]}`}function il(t){let e=window.gtag;if(typeof e=="function")try{e("event","replayops_session",{replayops_session_id:t});}catch{}}function ei(t,e,r,n){return {entryUrl:n,currentUrl:location.href,referrer:document.referrer,device:jn(navigator.userAgent),screen:{width:window.innerWidth||document.documentElement?.clientWidth||window.screen?.width||1,height:window.innerHeight||document.documentElement?.clientHeight||window.screen?.height||1,dpr:window.devicePixelRatio||1},language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,environment:t,releaseVersion:e,sdkVersion:r}}var ti="replayops:rerun";function Sh(t){switch((t.inputType??"text").toLowerCase()){case "email":return "rerun@replayops.test";case "password":return "ReRunTest!12345";case "tel":case "number":return "4242424242";default:return "ReplayOps re-run"}}function Ch(){if(/ro_rerun=/.test(location.hash))return location.hash;try{let t=performance.getEntriesByType("navigation")[0];if(t&&/ro_rerun=/.test(t.name))return new URL(t.name).hash}catch{}return ""}function ol(t){let e=/ro_rerun=([^&]+)/.exec(t);if(!e)return null;let[r,n]=e[1].split("|");if(!r||!n)return null;let s=decodeURIComponent(r).replace(/\/$/,"");try{let i=new URL(s);if(i.protocol!=="https:"&&i.protocol!=="http:")return null;let l=i.hostname==="localhost"||i.hostname==="127.0.0.1";if(location.protocol==="https:"&&i.protocol!=="https:"&&!l)return null}catch{return null}return {api:s,token:n}}function Pe(t,e,r){let n=document.createElement(t);return n.setAttribute("style",e),r&&(n.textContent=r),n}var Eh="position:fixed;z-index:2147483646;bottom:16px;left:16px;max-width:340px;padding:14px 16px;background:#0f172a;color:#f1f5f9;border-radius:12px;font:13px/1.45 system-ui,sans-serif;box-shadow:0 8px 30px rgba(0,0,0,.35);",Jr="margin-top:10px;margin-right:8px;padding:6px 14px;border:none;border-radius:8px;cursor:pointer;font:600 13px system-ui,sans-serif;background:#2ec2b3;color:#04211d;",tr=Jr+"background:transparent;color:#94a3b8;border:1px solid #334155;";async function _h(t,e){let r=Date.now()+t;for(;!e.stopped&&(Date.now()<r||e.paused);)await new Promise(n=>setTimeout(n,100));}async function Rh(t,e){let r=Date.now()+5e3;for(;Date.now()<r&&!e.stopped;){if(e.paused){await new Promise(n=>setTimeout(n,150));continue}for(let n of t.selectors??[]){let s=[];try{s=[...document.querySelectorAll(n)];}catch{continue}if(!s.length)continue;return (t.text?s.find(l=>(l.textContent??"").replace(/\s+/g," ").trim().includes(t.text)):void 0)??s[0]}if(typeof t.x=="number"&&typeof t.y=="number"){let n=document.elementFromPoint(t.x,t.y);if(n)return n}await new Promise(n=>setTimeout(n,250));}return null}function kh(t,e){let r=t instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;Object.getOwnPropertyDescriptor(r,"value")?.set?.call(t,e),t.dispatchEvent(new Event("input",{bubbles:true})),t.dispatchEvent(new Event("change",{bubbles:true}));}function Mh(t){try{let e=new URL(t,location.href);return e.origin===location.origin?e:null}catch{return null}}function Th(t){return t.pathname===location.pathname&&t.search===location.search}async function Oh(t,e){let r=Date.now()+2e3;for(;!e.stopped;){if(Th(t))return true;if(Date.now()>=r)return false;await new Promise(n=>setTimeout(n,100));}return false}function Ih(t){try{sessionStorage.setItem(ti,JSON.stringify(t));}catch{}}function Nh(){try{let t=sessionStorage.getItem(ti);if(!t)return null;sessionStorage.removeItem(ti);let e=JSON.parse(t);return typeof e.token!="string"||typeof e.next!="number"||Date.now()-e.at>6e4?null:ol(`#ro_rerun=${encodeURIComponent(e.api)}|${e.token}`)?e:null}catch{return null}}async function Ah(t,e,r,n){let s=n.ok,i=n.failed,l=n.start,u;for(let o=n.start;o<t.steps.length&&!r.stopped;o++){let h=t.steps[o];l=o+1,e.textContent=`Re-run ${o+1}/${t.steps.length}: ${h.label}`;let a=u===void 0?300:h.offsetMs-u;if(u=h.offsetMs,await _h(Math.min(Math.max(a,300),2500),r),r.stopped)break;if(h.kind==="open"){s++;continue}if(h.kind==="navigate"&&h.url){let d=Mh(h.url);if(!d){i++;continue}if(await Oh(d,r)){s++;continue}if(r.stopped)break;return Ih({api:n.api,token:n.token,next:o+1,ok:s+1,failed:i,at:Date.now()}),location.href=d.href,{ok:s,failed:i,done:l,leftPage:true}}let f=await Rh(h,r);if(r.stopped)break;if(!f){i++;continue}f.scrollIntoView({block:"center",behavior:"instant"}),h.kind==="click"?(f.click(),s++):h.kind==="input"&&(kh(f,h.masked?Sh(h):h.value??""),s++);}return {ok:s,failed:i,done:l}}function al(t){let e=Nh(),r=e?{api:e.api,token:e.token}:ol(Ch());if(!r)return;if(!e){let s=`replayops:rerun-seen:${r.token}`;try{if(sessionStorage.getItem(s))return;sessionStorage.setItem(s,"1");}catch{}}/ro_rerun=/.test(location.hash)&&history.replaceState(null,"",location.href.replace(/#?ro_rerun=[^&]+&?/,"").replace(/#$/,""));let n=async()=>{let s=Pe("div",Eh),i=Pe("div","font-weight:700;margin-bottom:4px;","ReplayOps scenario re-run"),l=Pe("div","color:#cbd5e1;");s.append(i,l);let u=d=>{l.textContent=d;let c=Pe("button",tr,"Dismiss");c.addEventListener("click",()=>s.remove()),s.append(c),document.body.appendChild(s);},o;try{let d=await fetch(`${r.api}/v1/public/rerun/${encodeURIComponent(r.token)}`);if(!d.ok)return u(d.status===404||d.status===410?"This re-run link has expired or was revoked. Start a new re-run from the session.":`The scenario could not be loaded (HTTP ${d.status}).`);o=await d.json();}catch{return u(`The scenario could not be loaded: ${new URL(r.api).host} is unreachable from this page.`)}if(!o.steps?.length)return u("This session has no steps that can be replayed.");document.body.appendChild(s);let h=async(d={start:0,ok:0,failed:0})=>{let c={paused:false,stopped:false},m=false,p=Pe("button",Jr,"Pause"),g=Pe("button",tr,"Restart"),x=Pe("button",tr,"Stop");s.append(p,g,x),p.addEventListener("click",()=>{c.paused=!c.paused,p.textContent=c.paused?"Resume":"Pause";}),g.addEventListener("click",()=>{m=true,c.stopped=true;}),x.addEventListener("click",()=>{c.stopped=true;}),d.start===0&&t("replayops_rerun",{sourceSessionId:o.sessionId,steps:o.steps.length});let y=await Ah(o,l,c,{...r,...d});if(y.leftPage)return;if(p.remove(),g.remove(),x.remove(),m)return h();l.textContent=c.stopped?`Re-run stopped at step ${y.done}/${o.steps.length}.`:`Re-run finished: ${y.ok}/${o.steps.length} steps succeeded`+(y.failed?`, ${y.failed} failed.`:".");let b=Pe("button",Jr,"Run again"),S=Pe("button",tr,"Dismiss");s.append(b,S),b.addEventListener("click",()=>{b.remove(),S.remove(),h();}),S.addEventListener("click",()=>s.remove());};if(e){h({start:e.next,ok:e.ok,failed:e.failed});return}l.textContent=`${o.steps.length} recorded steps from session ${o.sessionId.slice(0,8)} (via ${new URL(r.api).host}) will be replayed on this page.`;let a=Pe("button",Jr,"Run scenario"),f=Pe("button",tr,"Dismiss");s.append(a,f),f.addEventListener("click",()=>s.remove()),a.addEventListener("click",()=>{a.remove(),f.remove(),h();});};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{n();},{once:true}):n();}var ll="0.1.6",rr=class{config;identity;recorder;transport;live;state="idle";sessionId="";entryUrl="";extraMask=[];extraIgnore=[];policyMaskInputs;policyLiveChat;policyTesterTools;policyLive;policySamplingRate;policySamplingMode;policyUserRules;ruledOut=false;quotaOut=false;init(e){this.config||(this.config=ri(e),this.identity=new sr,this.sessionId=nr(),this.entryUrl=location.href,this.config.marketingConsent!==void 0&&this.identity.setMarketingConsent(this.config.marketingConsent),!this.identity.isOptedOut()&&(this.config.requireConsent&&!this.identity.hasConsent()||this.bootstrap()));}async bootstrap(){await this.fetchPolicy();let e=Math.min(this.config.samplingRate,this.policySamplingRate??1),r=this.policySamplingMode??"session";if(ai(e,r,this.identity.anonymous)&&!this.quotaOut){if(await this.ruleVerdict()===false){this.ruledOut=true;return}this.start(),this.watchIdle(),al((n,s)=>this.track(n,s));}}lastActivityAt=Date.now();watchIdle(){let e=this.config?.idleTimeoutMs??0;if(e<=0)return;let r=0,n=()=>{let i=Date.now();(this.state==="suspended"||this.state==="recording"&&i-this.lastActivityAt>e)&&this.rotate(),i-r>1e3&&(r=i,this.lastActivityAt=i);};for(let i of ["pointerdown","keydown","mousemove","scroll","touchstart"])window.addEventListener(i,n,{capture:true,passive:true});let s=()=>{this.state==="recording"&&(Date.now()-this.lastActivityAt<=e||(this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="suspended"));};setInterval(s,6e4),document.addEventListener("visibilitychange",s);}rotate(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.sessionId=nr(),this.entryUrl=location.href,this.state="idle",this.start();}async fetchPolicy(){if(this.config)try{let e=`${this.config.endpoint.replace(/\/$/,"")}/v1/config`,r=new AbortController,n=setTimeout(()=>r.abort(),1500),s=await fetch(e,{headers:{"x-api-key":this.config.apiKey},signal:r.signal}).finally(()=>clearTimeout(n));if(s.ok){let i=await s.json();i.quotaExceeded===!0&&(this.quotaOut=!0),typeof i.maskInputs=="boolean"&&(this.policyMaskInputs=i.maskInputs),typeof i.samplingRate=="number"&&(this.policySamplingRate=i.samplingRate),(i.samplingMode==="user"||i.samplingMode==="session")&&(this.policySamplingMode=i.samplingMode),(i.userRuleMode==="allow"||i.userRuleMode==="deny")&&Array.isArray(i.userRuleHashes)&&(this.policyUserRules={mode:i.userRuleMode,hashes:i.userRuleHashes.filter(l=>typeof l=="string")}),typeof i.liveChat=="boolean"&&(this.policyLiveChat=i.liveChat),typeof i.testerTools=="boolean"&&(this.policyTesterTools=i.testerTools),typeof i.live=="boolean"&&(this.policyLive=i.live);}}catch{}}start(){if(!this.config||!this.identity||this.state==="recording"||this.ruledOut||this.quotaOut)return;let e={...this.config,maskInputs:this.policyMaskInputs??this.config.maskInputs,live:(this.policyLive??this.config.live)&&this.config.live,liveChat:(this.policyLiveChat??this.config.liveChat)&&this.config.liveChat,testerTools:(this.policyTesterTools??this.config.testerTools)&&this.config.testerTools,maskSelectors:[...this.config.maskSelectors,...this.extraMask],ignoreSelectors:[...this.config.ignoreSelectors,...this.extraIgnore]};if(this.transport=new qr(this.sessionId,{endpoint:e.endpoint,projectId:e.projectId,apiKey:e.apiKey,batchSize:e.batchSize,flushIntervalMs:e.flushIntervalMs,maxBatchBytes:e.maxBatchBytes,getMeta:()=>ei(e.environment,e.releaseVersion,ll,this.entryUrl),getIdentity:()=>this.identity.snapshot(),onQuotaExceeded:()=>this.haltForQuota()}),e.live&&(this.live=new Xr({endpoint:e.endpoint,apiKey:e.apiKey,sessionId:this.sessionId,chat:e.liveChat,tester:e.testerTools,getIdentity:()=>{let r=this.identity.snapshot();return {anonymousId:r.anonymousId,userId:r.userId,email:r.userTraits?.email}},getMeta:()=>{let r=ei(e.environment,e.releaseVersion,ll,this.entryUrl).device;return {browser:r.browser,os:r.os,deviceType:r.deviceType}},onWatchStart:()=>this.recorder?.takeFullSnapshot()})),this.recorder=new Hr(e,r=>{this.transport.enqueue(r),this.live?.feedEvent(r);},this.sessionId),this.transport.start(),this.recorder.start(),this.live?.start(),this.announceMarketingConsent(),e.googleAnalytics){let r=nl();r&&(this.recorder.emitCustom("$ga",{clientId:r}),il(this.sessionId));}this.state="recording";}pause(){this.state==="recording"&&(this.recorder?.stop(),this.recorder=void 0,this.live?.stop(),this.live=void 0,this.state="paused");}resume(){this.state==="paused"&&this.start();}stop(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="stopped";}identify(e,r){this.identity?.identify(e,r),this.recorder?.emitCustom("$identify",{userId:e,...r??{}}),this.enforceUserRule();}async ruleVerdict(){if(this.identity)return li(this.policyUserRules,this.identity.subjects())}haltForQuota(){this.quotaOut||(this.quotaOut=true,console.info("[replayops] Recording stopped: this organization has used its recording quota for the month."),setTimeout(()=>{this.recorder?.stop(),this.live?.stop(),this.transport?.discard(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="stopped";},0));}async enforceUserRule(){this.ruledOut||!this.policyUserRules||await this.ruleVerdict()===false&&(this.ruledOut=true,this.recorder?.stop(),this.live?.stop(),this.transport?.discard(),this.state="stopped");}track(e,r={}){this.recorder?.emitCustom(e,r);}setUserProperties(e){this.identity?.setUserProperties(e);}mask(e){this.extraMask.push(e);}ignore(e){this.extraIgnore.push(e);}consent(e,r={}){this.identity?.setConsent(e);let n=e?r.marketing:false;n!==void 0&&this.identity?.setMarketingConsent(n),e&&this.state==="idle"&&this.config?this.start():e&&n!==void 0&&this.announceMarketingConsent(),e||this.stop();}announceMarketingConsent(){let e=this.identity?.marketingConsent();e!==void 0&&this.recorder?.emitCustom("$consent",{marketing:e});}optOut(){this.identity?.optOut(),this.stop();}getState(){return this.state}getSessionId(){return this.sessionId}};var cl=new rr;typeof window<"u"&&(window.ReplayOps=cl);var Qp=cl;/*! Bundled license information:
163
163
 
164
164
  rrweb/dist/rrweb.js:
165
165
  (*! *****************************************************************************
@@ -176,4 +176,4 @@ rrweb/dist/rrweb.js:
176
176
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
177
177
  PERFORMANCE OF THIS SOFTWARE.
178
178
  ***************************************************************************** *)
179
- */exports.Session=Ga;exports.SessionController=er;exports.default=jf;Object.defineProperty(exports,'__esModule',{value:true});return exports;})({});
179
+ */exports.Session=cl;exports.SessionController=rr;exports.default=Qp;Object.defineProperty(exports,'__esModule',{value:true});return exports;})({});