const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["index-DZr6W4nm.js","hoist-non-react-statics.cjs-CqwqGJgk.js"])))=>i.map(i=>d[i]); (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes react-loading-skeleton{to{transform:translate(100%)}}.react-loading-skeleton{--base-color: #ebebeb;--highlight-color: #f5f5f5;--animation-duration: 1.5s;--animation-direction: normal;--pseudo-element-display: block;background-color:var(--base-color);width:100%;border-radius:.25rem;display:inline-flex;line-height:1;position:relative;-webkit-user-select:none;user-select:none;overflow:hidden}.react-loading-skeleton:after{content:" ";display:var(--pseudo-element-display);position:absolute;top:0;left:0;right:0;height:100%;background-repeat:no-repeat;background-image:var( --custom-highlight-background, linear-gradient( 90deg, var(--base-color) 0%, var(--highlight-color) 50%, var(--base-color) 100% ) );transform:translate(-100%);animation-name:react-loading-skeleton;animation-direction:var(--animation-direction);animation-duration:var(--animation-duration);animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media (prefers-reduced-motion){.react-loading-skeleton{--pseudo-element-display: none}}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})(); var dE=Object.defineProperty;var hE=(t,e,r)=>e in t?dE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S=(t,e,r)=>hE(t,typeof e!="symbol"?e+"":e,r);function pE(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const kw="warmly-widget",mE=kw,Lp="1.1",gE="modulepreload",yE=function(t){return"https://opps-widget.getwarmly.com/"+t},Yg={},Rw=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=yE(l),l in Yg)return;Yg[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":gE,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};var vE={NX_WARMLY_NODE_ENV:"production"};const wE=vE.NX_WARMLY_NODE_ENV,Zs="/api",SE="",zs={TRPC:`${Zs}/trpc`,SESSIONS_TRPC:`${Zs}/sessions/trpc`,BASE:Zs,SOCKET_IO:`${Zs}/socketio`,GRAPHQL:`${Zs}/graphql`,HASURA:`${SE}/v1/graphql`},bE={CLOUDINARY_SIGNATURE:"/cloudinary-signature",END_SESSION:"/sessions/end-session"},Xg={PRIVACY_POLICY:"https://warmly.ai/p/privacy-policy"};var We={NX_GIPHY_API_KEY:"o7iE2aQ7HSTtqlA0hghByg8qXGcbZSaz",NX_SENTRY_DNS_WARM_OPPS_FRONT:"https://ab5fd542dae844b3a2eb6fba0c49c5fc@o406756.ingest.sentry.io/4505053883138048",NX_API_ORIGIN:"https://opps-api.getwarmly.com",NX_HASURA_API_ORIGIN:"https://warm-opps-production.hasura.app",NX_SENTRY_DNS_WARM_OPPS_WIDGET:"https://4acd278b275645c08f8f2add71dda1b7@o406756.ingest.sentry.io/4505080759255040",NX_CLOUDINARY_API_KEY:"151853927577567"};const vu=(We==null?void 0:We.NX_CI)==="true"?"ci":wE,bc=We.NX_API_ORIGIN,_E=bc+zs.BASE,qg=bc+zs.TRPC,Qg=bc+zs.SESSIONS_TRPC,CE=bc+zs.GRAPHQL,AE=We.NX_API_ORIGIN,EE=We.NX_HASURA_API_ORIGIN+zs.HASURA;CE.replace("http://","ws://").replace("https://","wss://");EE.replace("http://","ws://").replace("https://","wss://");const JF=We.NX_CLOUDINARY_API_KEY,ZF=We.NX_GIPHY_API_KEY,OE=We==null?void 0:We.NX_SENTRY_DNS_WARM_OPPS_FRONT,xE=We==null?void 0:We.NX_SENTRY_DNS_WARM_OPPS_WIDGET,IE=(We==null?void 0:We.NX_FRONTEND_SENTRY_ENABLED)==="true",kE=(We==null?void 0:We.NX_WIDGET_SENTRY_ENABLED)==="true";class RE{constructor(e,r){S(this,"uiLogger");S(this,"logLevel");S(this,"sendToSentry");S(this,"Sentry");S(this,"initializeSentry",async e=>{if(!(["staging","production"].includes(vu)?e==="frontend"?IE:kE:!1))return;this.Sentry=await Rw(()=>import("./index-DZr6W4nm.js"),__vite__mapDeps([0,1]));const i=[/Rate Limit Reached/i,/No Session Created/i,/Client ID disabled/i],s=e==="frontend"?OE:xE;this.Sentry.init({dsn:s,environment:vu,ignoreErrors:i,beforeSend(o){var l,u;return((u=(l=o.exception)==null?void 0:l.values)==null?void 0:u.some(c=>{var f;return((f=c.mechanism)==null?void 0:f.handled)===!0}))?o:null}}),this.sendToSentry=!0});S(this,"debug",(...e)=>eo(this.logLevel,"debug")&&this.uiLogger.debug(...e));S(this,"log",(...e)=>eo(this.logLevel,"log")&&this.uiLogger.log(...e));S(this,"info",(...e)=>{eo(this.logLevel,"info")&&this.uiLogger.info(...e)});S(this,"warn",(...e)=>eo(this.logLevel,"warn")&&this.uiLogger.warn(...e));S(this,"error",(...e)=>{var r;eo(this.logLevel,"error")&&(this.uiLogger.error(...e),this.sendToSentry&&((r=this.Sentry)==null||r.captureException(e)))});this.uiLogger=e,this.logLevel=r,this.sendToSentry=!1}}const eo=(t,e)=>{if(e==="error")return!0;switch(t){case"verbose":case"debug":return!0;case"log":return e!=="debug";case"info":return e!=="debug"&&e!=="log";case"warn":return e==="warn";case"error":default:return!1}},fe=new RE(console,"verbose"),Wo={black:"#000",white:"#fff"},Li={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},$i={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Bi={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Fi={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ui={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},to={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ME={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function hi(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r{e[r]=zw(t[r])}),e}function Jr(t,e,r={clone:!0}){const n=r.clone?qe({},t):t;return Gi(t)&&Gi(e)&&Object.keys(e).forEach(i=>{Hn.isValidElement(e[i])?n[i]=e[i]:Gi(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Gi(t[i])?n[i]=Jr(t[i],e[i],r):r.clone?n[i]=Gi(e[i])?zw(e[i]):e[i]:n[i]=e[i]}),n}const tO=["values","unit","step"],rO=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>qe({},r,{[n.key]:n.val}),{})};function nO(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=t,i=js(t,tO),s=rO(e),o=Object.keys(s);function a(d){return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${r})`}function l(d){return`@media (max-width:${(typeof e[d]=="number"?e[d]:d)-n/100}${r})`}function u(d,p){const m=o.indexOf(p);return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${r}) and (max-width:${(m!==-1&&typeof e[o[m]]=="number"?e[o[m]]:p)-n/100}${r})`}function c(d){return o.indexOf(d)+1`@media (min-width:${jp[t]}px)`};function rn(t,e,r){const n=t.theme||{};if(Array.isArray(e)){const s=n.breakpoints||ry;return e.reduce((o,a,l)=>(o[s.up(s.keys[l])]=r(e[l]),o),{})}if(typeof e=="object"){const s=n.breakpoints||ry;return Object.keys(e).reduce((o,a)=>{if(Object.keys(s.values||jp).indexOf(a)!==-1){const l=s.up(a);o[l]=r(e[a],a)}else{const l=a;o[l]=e[l]}return o},{})}return r(e)}function sO(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((n,i)=>{const s=t.up(i);return n[s]={},n},{}))||{}}function oO(t,e){return t.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},e)}function jw(t){if(typeof t!="string")throw new Error(hi(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Cc(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const n=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(n!=null)return n}return e.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,t)}function wu(t,e,r,n=r){let i;return typeof t=="function"?i=t(r):Array.isArray(t)?i=t[r]||n:i=Cc(t,r)||n,e&&(i=e(i,n,t)),i}function Be(t){const{prop:e,cssProperty:r=t.prop,themeKey:n,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],l=o.theme,u=Cc(l,n)||{};return rn(o,a,f=>{let d=wu(u,i,f);return f===d&&typeof f=="string"&&(d=wu(u,i,`${e}${f==="default"?"":jw(f)}`,f)),r===!1?d:{[r]:d}})};return s.propTypes={},s.filterProps=[e],s}function aO(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const lO={m:"margin",p:"padding"},uO={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ny={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cO=aO(t=>{if(t.length>2)if(ny[t])t=ny[t];else return[t];const[e,r]=t.split(""),n=lO[e],i=uO[r]||"";return Array.isArray(i)?i.map(s=>n+s):[n+i]}),Wp=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Hp=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Wp,...Hp];function Ia(t,e,r,n){var i;const s=(i=Cc(t,e,!1))!=null?i:r;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function Ww(t){return Ia(t,"spacing",8)}function ka(t,e){if(typeof e=="string"||e==null)return e;const r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function fO(t,e){return r=>t.reduce((n,i)=>(n[i]=ka(e,r),n),{})}function dO(t,e,r,n){if(e.indexOf(r)===-1)return null;const i=cO(r),s=fO(i,n),o=t[r];return rn(t,o,s)}function Hw(t,e){const r=Ww(t.theme);return Object.keys(t).map(n=>dO(t,e,n,r)).reduce(Oo,{})}function Pe(t){return Hw(t,Wp)}Pe.propTypes={};Pe.filterProps=Wp;function Ve(t){return Hw(t,Hp)}Ve.propTypes={};Ve.filterProps=Hp;function hO(t=8){if(t.mui)return t;const e=Ww({spacing:t}),r=(...n)=>(n.length===0?[1]:n).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return r.mui=!0,r}function Ac(...t){const e=t.reduce((n,i)=>(i.filterProps.forEach(s=>{n[s]=i}),n),{}),r=n=>Object.keys(n).reduce((i,s)=>e[s]?Oo(i,e[s](n)):i,{});return r.propTypes={},r.filterProps=t.reduce((n,i)=>n.concat(i.filterProps),[]),r}function zt(t){return typeof t!="number"?t:`${t}px solid`}function nr(t,e){return Be({prop:t,themeKey:"borders",transform:e})}const pO=nr("border",zt),mO=nr("borderTop",zt),gO=nr("borderRight",zt),yO=nr("borderBottom",zt),vO=nr("borderLeft",zt),wO=nr("borderColor"),SO=nr("borderTopColor"),bO=nr("borderRightColor"),_O=nr("borderBottomColor"),CO=nr("borderLeftColor"),AO=nr("outline",zt),EO=nr("outlineColor"),Ec=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Ia(t.theme,"shape.borderRadius",4),r=n=>({borderRadius:ka(e,n)});return rn(t,t.borderRadius,r)}return null};Ec.propTypes={};Ec.filterProps=["borderRadius"];Ac(pO,mO,gO,yO,vO,wO,SO,bO,_O,CO,Ec,AO,EO);const Oc=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Ia(t.theme,"spacing",8),r=n=>({gap:ka(e,n)});return rn(t,t.gap,r)}return null};Oc.propTypes={};Oc.filterProps=["gap"];const xc=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Ia(t.theme,"spacing",8),r=n=>({columnGap:ka(e,n)});return rn(t,t.columnGap,r)}return null};xc.propTypes={};xc.filterProps=["columnGap"];const Ic=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Ia(t.theme,"spacing",8),r=n=>({rowGap:ka(e,n)});return rn(t,t.rowGap,r)}return null};Ic.propTypes={};Ic.filterProps=["rowGap"];const OO=Be({prop:"gridColumn"}),xO=Be({prop:"gridRow"}),IO=Be({prop:"gridAutoFlow"}),kO=Be({prop:"gridAutoColumns"}),RO=Be({prop:"gridAutoRows"}),MO=Be({prop:"gridTemplateColumns"}),TO=Be({prop:"gridTemplateRows"}),PO=Be({prop:"gridTemplateAreas"}),VO=Be({prop:"gridArea"});Ac(Oc,xc,Ic,OO,xO,IO,kO,RO,MO,TO,PO,VO);function ps(t,e){return e==="grey"?e:t}const NO=Be({prop:"color",themeKey:"palette",transform:ps}),DO=Be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ps}),LO=Be({prop:"backgroundColor",themeKey:"palette",transform:ps});Ac(NO,DO,LO);function It(t){return t<=1&&t!==0?`${t*100}%`:t}const $O=Be({prop:"width",transform:It}),Gp=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{var n,i;const s=((n=t.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||jp[r];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:It(r)}};return rn(t,t.maxWidth,e)}return null};Gp.filterProps=["maxWidth"];const BO=Be({prop:"minWidth",transform:It}),FO=Be({prop:"height",transform:It}),UO=Be({prop:"maxHeight",transform:It}),zO=Be({prop:"minHeight",transform:It});Be({prop:"size",cssProperty:"width",transform:It});Be({prop:"size",cssProperty:"height",transform:It});const jO=Be({prop:"boxSizing"});Ac($O,Gp,BO,FO,UO,zO,jO);const Kp={border:{themeKey:"borders",transform:zt},borderTop:{themeKey:"borders",transform:zt},borderRight:{themeKey:"borders",transform:zt},borderBottom:{themeKey:"borders",transform:zt},borderLeft:{themeKey:"borders",transform:zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ec},color:{themeKey:"palette",transform:ps},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ps},backgroundColor:{themeKey:"palette",transform:ps},p:{style:Ve},pt:{style:Ve},pr:{style:Ve},pb:{style:Ve},pl:{style:Ve},px:{style:Ve},py:{style:Ve},padding:{style:Ve},paddingTop:{style:Ve},paddingRight:{style:Ve},paddingBottom:{style:Ve},paddingLeft:{style:Ve},paddingX:{style:Ve},paddingY:{style:Ve},paddingInline:{style:Ve},paddingInlineStart:{style:Ve},paddingInlineEnd:{style:Ve},paddingBlock:{style:Ve},paddingBlockStart:{style:Ve},paddingBlockEnd:{style:Ve},m:{style:Pe},mt:{style:Pe},mr:{style:Pe},mb:{style:Pe},ml:{style:Pe},mx:{style:Pe},my:{style:Pe},margin:{style:Pe},marginTop:{style:Pe},marginRight:{style:Pe},marginBottom:{style:Pe},marginLeft:{style:Pe},marginX:{style:Pe},marginY:{style:Pe},marginInline:{style:Pe},marginInlineStart:{style:Pe},marginInlineEnd:{style:Pe},marginBlock:{style:Pe},marginBlockStart:{style:Pe},marginBlockEnd:{style:Pe},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Oc},rowGap:{style:Ic},columnGap:{style:xc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:It},maxWidth:{style:Gp},minWidth:{transform:It},height:{transform:It},maxHeight:{transform:It},minHeight:{transform:It},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function WO(...t){const e=t.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function HO(t,e){return typeof t=="function"?t(e):t}function GO(){function t(r,n,i,s){const o={[r]:n,theme:i},a=s[r];if(!a)return{[r]:n};const{cssProperty:l=r,themeKey:u,transform:c,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const d=Cc(i,u)||{};return f?f(o):rn(o,n,m=>{let h=wu(d,c,m);return m===h&&typeof m=="string"&&(h=wu(d,c,`${r}${m==="default"?"":jw(m)}`,m)),l===!1?h:{[l]:h}})}function e(r){var n;const{sx:i,theme:s={}}=r||{};if(!i)return null;const o=(n=s.unstable_sxConfig)!=null?n:Kp;function a(l){let u=l;if(typeof l=="function")u=l(s);else if(typeof l!="object")return l;if(!u)return null;const c=sO(s.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const m=HO(u[p],s);if(m!=null)if(typeof m=="object")if(o[p])d=Oo(d,t(p,m,s,o));else{const h=rn({theme:s},m,v=>({[p]:v}));WO(h,m)?d[p]=e({sx:m,theme:s}):d=Oo(d,h)}else d=Oo(d,t(p,m,s,o))}),oO(f,d)}return Array.isArray(i)?i.map(a):a(i)}return e}const Yp=GO();Yp.filterProps=["sx"];function KO(t,e){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:r.palette.mode===t?e:{}}const YO=["breakpoints","palette","spacing","shape"];function XO(t={},...e){const{breakpoints:r={},palette:n={},spacing:i,shape:s={}}=t,o=js(t,YO),a=nO(r),l=hO(i);let u=Jr({breakpoints:a,direction:"ltr",components:{},palette:qe({mode:"light"},n),spacing:l,shape:qe({},iO,s)},o);return u.applyStyles=KO,u=e.reduce((c,f)=>Jr(c,f),u),u.unstable_sxConfig=qe({},Kp,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(f){return Yp({sx:f,theme:this})},u}function Gw(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}const qO=Object.freeze(Object.defineProperty({__proto__:null,default:Gw},Symbol.toStringTag,{value:"Module"}));function Xp(t,e=0,r=1){return Gw(t,e,r)}function QO(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function kc(t){if(t.type)return t;if(t.charAt(0)==="#")return kc(QO(t));const e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(hi(9,t));let n=t.substring(e+1,t.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(hi(10,i))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:i}}function qp(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.indexOf("rgb")!==-1?n=n.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function $(t,e){return t=kc(t),e=Xp(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,qp(t)}function bt(t,e){if(t=kc(t),e=Xp(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]*=1-e;return qp(t)}function Ne(t,e){if(t=kc(t),e=Xp(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return qp(t)}function JO(t,e){return qe({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Fe={},Kw={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Kw);var ZO=Kw.exports;const ex=Mw(TE),tx=Mw(qO);var Yw=ZO;Object.defineProperty(Fe,"__esModule",{value:!0});var rU=Fe.alpha=Jw;Fe.blend=px;Fe.colorChannel=void 0;var rx=Fe.darken=Jp;Fe.decomposeColor=Zt;Fe.emphasize=Zw;var nx=Fe.getContrastRatio=ux;Fe.getLuminance=Su;Fe.hexToRgb=Xw;Fe.hslToRgb=Qw;var ix=Fe.lighten=Zp;Fe.private_safeAlpha=cx;Fe.private_safeColorChannel=void 0;Fe.private_safeDarken=fx;Fe.private_safeEmphasize=hx;Fe.private_safeLighten=dx;Fe.recomposeColor=Hs;Fe.rgbToHex=lx;var iy=Yw(ex),sx=Yw(tx);function Qp(t,e=0,r=1){return(0,sx.default)(t,e,r)}function Xw(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function ox(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Zt(t){if(t.type)return t;if(t.charAt(0)==="#")return Zt(Xw(t));const e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error((0,iy.default)(9,t));let n=t.substring(e+1,t.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,iy.default)(10,i))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:i}}const qw=t=>{const e=Zt(t);return e.values.slice(0,3).map((r,n)=>e.type.indexOf("hsl")!==-1&&n!==0?`${r}%`:r).join(" ")};Fe.colorChannel=qw;const ax=(t,e)=>{try{return qw(t)}catch{return t}};Fe.private_safeColorChannel=ax;function Hs(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.indexOf("rgb")!==-1?n=n.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function lx(t){if(t.indexOf("#")===0)return t;const{values:e}=Zt(t);return`#${e.map((r,n)=>ox(n===3?Math.round(255*r):r)).join("")}`}function Qw(t){t=Zt(t);const{values:e}=t,r=e[0],n=e[1]/100,i=e[2]/100,s=n*Math.min(i,1-i),o=(u,c=(u+r/30)%12)=>i-s*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Hs({type:a,values:l})}function Su(t){t=Zt(t);let e=t.type==="hsl"||t.type==="hsla"?Zt(Qw(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function ux(t,e){const r=Su(t),n=Su(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Jw(t,e){return t=Zt(t),e=Qp(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Hs(t)}function cx(t,e,r){try{return Jw(t,e)}catch{return t}}function Jp(t,e){if(t=Zt(t),e=Qp(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]*=1-e;return Hs(t)}function fx(t,e,r){try{return Jp(t,e)}catch{return t}}function Zp(t,e){if(t=Zt(t),e=Qp(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return Hs(t)}function dx(t,e,r){try{return Zp(t,e)}catch{return t}}function Zw(t,e=.15){return Su(t)>.5?Jp(t,e):Zp(t,e)}function hx(t,e,r){try{return Zw(t,e)}catch{return t}}function px(t,e,r,n=1){const i=(l,u)=>Math.round((l**(1/n)*(1-r)+u**(1/n)*r)**n),s=Zt(t),o=Zt(e),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return Hs({type:"rgb",values:a})}const mx=["mode","contrastThreshold","tonalOffset"],sy={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Wo.white,default:Wo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Cf={text:{primary:Wo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Wo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function oy(t,e,r,n){const i=n.light||n,s=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=ix(t.main,i):e==="dark"&&(t.dark=rx(t.main,s)))}function gx(t="light"){return t==="dark"?{main:Bi[200],light:Bi[50],dark:Bi[400]}:{main:Bi[700],light:Bi[400],dark:Bi[800]}}function yx(t="light"){return t==="dark"?{main:$i[200],light:$i[50],dark:$i[400]}:{main:$i[500],light:$i[300],dark:$i[700]}}function vx(t="light"){return t==="dark"?{main:Li[500],light:Li[300],dark:Li[700]}:{main:Li[700],light:Li[400],dark:Li[800]}}function wx(t="light"){return t==="dark"?{main:Fi[400],light:Fi[300],dark:Fi[700]}:{main:Fi[700],light:Fi[500],dark:Fi[900]}}function Sx(t="light"){return t==="dark"?{main:Ui[400],light:Ui[300],dark:Ui[700]}:{main:Ui[800],light:Ui[500],dark:Ui[900]}}function bx(t="light"){return t==="dark"?{main:to[400],light:to[300],dark:to[700]}:{main:"#ed6c02",light:to[500],dark:to[900]}}function _x(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:n=.2}=t,i=js(t,mx),s=t.primary||gx(e),o=t.secondary||yx(e),a=t.error||vx(e),l=t.info||wx(e),u=t.success||Sx(e),c=t.warning||bx(e);function f(h){return nx(h,Cf.text.primary)>=r?Cf.text.primary:sy.text.primary}const d=({color:h,name:v,mainShade:w=500,lightShade:g=300,darkShade:y=700})=>{if(h=qe({},h),!h.main&&h[w]&&(h.main=h[w]),!h.hasOwnProperty("main"))throw new Error(hi(11,v?` (${v})`:"",w));if(typeof h.main!="string")throw new Error(hi(12,v?` (${v})`:"",JSON.stringify(h.main)));return oy(h,"light",g,n),oy(h,"dark",y,n),h.contrastText||(h.contrastText=f(h.main)),h},p={dark:Cf,light:sy};return Jr(qe({common:qe({},Wo),mode:e,primary:d({color:s,name:"primary"}),secondary:d({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:a,name:"error"}),warning:d({color:c,name:"warning"}),info:d({color:l,name:"info"}),success:d({color:u,name:"success"}),grey:ME,contrastThreshold:r,getContrastText:f,augmentColor:d,tonalOffset:n},p[e]),i)}const Cx=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ax(t){return Math.round(t*1e5)/1e5}const ay={textTransform:"uppercase"},ly='"Roboto", "Helvetica", "Arial", sans-serif';function Ex(t,e){const r=typeof e=="function"?e(t):e,{fontFamily:n=ly,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:f}=r,d=js(r,Cx),p=i/14,m=f||(w=>`${w/u*p}rem`),h=(w,g,y,b,C)=>qe({fontFamily:n,fontWeight:w,fontSize:m(g),lineHeight:y},n===ly?{letterSpacing:`${Ax(b/g)}em`}:{},C,c),v={h1:h(s,96,1.167,-1.5),h2:h(s,60,1.2,-.5),h3:h(o,48,1.167,0),h4:h(o,34,1.235,.25),h5:h(o,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(o,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(o,16,1.5,.15),body2:h(o,14,1.43,.15),button:h(a,14,1.75,.4,ay),caption:h(o,12,1.66,.4),overline:h(o,12,2.66,1,ay),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Jr(qe({htmlFontSize:u,pxToRem:m,fontFamily:n,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},v),d,{clone:!1})}const Ox=.2,xx=.14,Ix=.12;function _e(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Ox})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${xx})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Ix})`].join(",")}const kx=["none",_e(0,2,1,-1,0,1,1,0,0,1,3,0),_e(0,3,1,-2,0,2,2,0,0,1,5,0),_e(0,3,3,-2,0,3,4,0,0,1,8,0),_e(0,2,4,-1,0,4,5,0,0,1,10,0),_e(0,3,5,-1,0,5,8,0,0,1,14,0),_e(0,3,5,-1,0,6,10,0,0,1,18,0),_e(0,4,5,-2,0,7,10,1,0,2,16,1),_e(0,5,5,-3,0,8,10,1,0,3,14,2),_e(0,5,6,-3,0,9,12,1,0,3,16,2),_e(0,6,6,-3,0,10,14,1,0,4,18,3),_e(0,6,7,-4,0,11,15,1,0,4,20,3),_e(0,7,8,-4,0,12,17,2,0,5,22,4),_e(0,7,8,-4,0,13,19,2,0,5,24,4),_e(0,7,9,-4,0,14,21,2,0,5,26,4),_e(0,8,9,-5,0,15,22,2,0,6,28,5),_e(0,8,10,-5,0,16,24,2,0,6,30,5),_e(0,8,11,-5,0,17,26,2,0,6,32,5),_e(0,9,11,-5,0,18,28,2,0,7,34,6),_e(0,9,12,-6,0,19,29,2,0,7,36,6),_e(0,10,13,-6,0,20,31,3,0,8,38,7),_e(0,10,13,-6,0,21,33,3,0,8,40,7),_e(0,10,14,-6,0,22,35,3,0,8,42,7),_e(0,11,14,-7,0,23,36,3,0,9,44,8),_e(0,11,15,-7,0,24,38,3,0,9,46,8)],Rx=["duration","easing","delay"],Mx={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Tx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function uy(t){return`${Math.round(t)}ms`}function Px(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Vx(t){const e=qe({},Mx,t.easing),r=qe({},Tx,t.duration);return qe({getAutoHeightDuration:Px,create:(i=["all"],s={})=>{const{duration:o=r.standard,easing:a=e.easeInOut,delay:l=0}=s;return js(s,Rx),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof o=="string"?o:uy(o)} ${a} ${typeof l=="string"?l:uy(l)}`).join(",")}},t,{easing:e,duration:r})}const Nx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Dx=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function em(t={},...e){const{mixins:r={},palette:n={},transitions:i={},typography:s={}}=t,o=js(t,Dx);if(t.vars&&t.generateCssVars===void 0)throw new Error(hi(18));const a=_x(n),l=XO(t);let u=Jr(l,{mixins:JO(l.breakpoints,r),palette:a,shadows:kx.slice(),typography:Ex(a,s),transitions:Vx(i),zIndex:qe({},Nx)});return u=Jr(u,o),u=e.reduce((c,f)=>Jr(c,f),u),u.unstable_sxConfig=qe({},Kp,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(f){return Yp({sx:f,theme:this})},u}var eS={exports:{}},$t={},tS={exports:{}},rS={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(t){function e(I,N){var F=I.length;I.push(N);e:for(;0>>1,ae=I[W];if(0>>1;Wi(xe,F))eti(Ur,xe)?(I[W]=Ur,I[et]=F,W=et):(I[W]=xe,I[Oe]=F,W=Oe);else if(eti(Ur,F))I[W]=Ur,I[et]=F,W=et;else break e}}return N}function i(I,N){var F=I.sortIndex-N.sortIndex;return F!==0?F:I.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,d=3,p=!1,m=!1,h=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(I){for(var N=r(u);N!==null;){if(N.callback===null)n(u);else if(N.startTime<=I)n(u),N.sortIndex=N.expirationTime,e(l,N);else break;N=r(u)}}function b(I){if(h=!1,y(I),!m)if(r(l)!==null)m=!0,Ue(C);else{var N=r(u);N!==null&&re(b,N.startTime-I)}}function C(I,N){m=!1,h&&(h=!1,w(E),E=-1),p=!0;var F=d;try{for(y(N),f=r(l);f!==null&&(!(f.expirationTime>N)||I&&!te());){var W=f.callback;if(typeof W=="function"){f.callback=null,d=f.priorityLevel;var ae=W(f.expirationTime<=N);N=t.unstable_now(),typeof ae=="function"?f.callback=ae:f===r(l)&&n(l),y(N)}else n(l);f=r(l)}if(f!==null)var wt=!0;else{var Oe=r(u);Oe!==null&&re(b,Oe.startTime-N),wt=!1}return wt}finally{f=null,d=F,p=!1}}var A=!1,O=null,E=-1,M=5,V=-1;function te(){return!(t.unstable_now()-VI||125W?(I.sortIndex=F,e(u,I),r(l)===null&&I===r(u)&&(h?(w(E),E=-1):h=!0,re(b,F-W))):(I.sortIndex=ae,e(l,I),m||p||(m=!0,Ue(C))),I},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(I){var N=d;return function(){var F=d;d=N;try{return I.apply(this,arguments)}finally{d=F}}}})(rS);tS.exports=rS;var Lx=tS.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var nS=Hn,Nt=Lx;function k(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Md=Object.prototype.hasOwnProperty,$x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,cy={},fy={};function Bx(t){return Md.call(fy,t)?!0:Md.call(cy,t)?!1:$x.test(t)?fy[t]=!0:(cy[t]=!0,!1)}function Fx(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Ux(t,e,r,n){if(e===null||typeof e>"u"||Fx(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function vt(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){st[t]=new vt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];st[e]=new vt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){st[t]=new vt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){st[t]=new vt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){st[t]=new vt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){st[t]=new vt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){st[t]=new vt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){st[t]=new vt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){st[t]=new vt(t,5,!1,t.toLowerCase(),null,!1,!1)});var tm=/[\-:]([a-z])/g;function rm(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(tm,rm);st[e]=new vt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(tm,rm);st[e]=new vt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(tm,rm);st[e]=new vt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){st[t]=new vt(t,1,!1,t.toLowerCase(),null,!1,!1)});st.xlinkHref=new vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){st[t]=new vt(t,1,!1,t.toLowerCase(),null,!0,!0)});function nm(t,e,r,n){var i=st.hasOwnProperty(e)?st[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ef=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?bo(t):""}function zx(t){switch(t.tag){case 5:return bo(t.type);case 16:return bo("Lazy");case 13:return bo("Suspense");case 19:return bo("SuspenseList");case 0:case 2:case 15:return t=Of(t.type,!1),t;case 11:return t=Of(t.type.render,!1),t;case 1:return t=Of(t.type,!0),t;default:return""}}function Nd(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Qi:return"Fragment";case qi:return"Portal";case Td:return"Profiler";case im:return"StrictMode";case Pd:return"Suspense";case Vd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case oS:return(t.displayName||"Context")+".Consumer";case sS:return(t._context.displayName||"Context")+".Provider";case sm:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case om:return e=t.displayName||null,e!==null?e:Nd(t.type)||"Memo";case Sn:e=t._payload,t=t._init;try{return Nd(t(e))}catch{}}return null}function jx(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nd(e);case 8:return e===im?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Un(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lS(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Wx(t){var e=lS(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Za(t){t._valueTracker||(t._valueTracker=Wx(t))}function uS(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=lS(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function bu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Dd(t,e){var r=e.checked;return Re({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function hy(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Un(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function cS(t,e){e=e.checked,e!=null&&nm(t,"checked",e,!1)}function Ld(t,e){cS(t,e);var r=Un(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?$d(t,e.type,r):e.hasOwnProperty("defaultValue")&&$d(t,e.type,Un(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function py(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function $d(t,e,r){(e!=="number"||bu(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var _o=Array.isArray;function ms(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=el.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Go(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var xo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hx=["Webkit","ms","Moz","O"];Object.keys(xo).forEach(function(t){Hx.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),xo[e]=xo[t]})});function pS(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||xo.hasOwnProperty(t)&&xo[t]?(""+e).trim():e+"px"}function mS(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=pS(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Gx=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ud(t,e){if(e){if(Gx[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(k(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(k(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(k(61))}if(e.style!=null&&typeof e.style!="object")throw Error(k(62))}}function zd(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jd=null;function am(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wd=null,gs=null,ys=null;function yy(t){if(t=Ta(t)){if(typeof Wd!="function")throw Error(k(280));var e=t.stateNode;e&&(e=Vc(e),Wd(t.stateNode,t.type,e))}}function gS(t){gs?ys?ys.push(t):ys=[t]:gs=t}function yS(){if(gs){var t=gs,e=ys;if(ys=gs=null,yy(t),e)for(t=0;t>>=0,t===0?32:31-(nI(t)/iI|0)|0}var tl=64,rl=4194304;function Co(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Eu(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=Co(a):(s&=o,s!==0&&(n=Co(s)))}else o=r&~i,o!==0?n=Co(o):s!==0&&(n=Co(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Ra(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-dr(e),t[e]=r}function lI(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=ko),Oy=" ",xy=!1;function LS(t,e){switch(t){case"keyup":return DI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $S(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ji=!1;function $I(t,e){switch(t){case"compositionend":return $S(e);case"keypress":return e.which!==32?null:(xy=!0,Oy);case"textInput":return t=e.data,t===Oy&&xy?null:t;default:return null}}function BI(t,e){if(Ji)return t==="compositionend"||!mm&&LS(t,e)?(t=NS(),Xl=dm=On=null,Ji=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=My(r)}}function zS(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zS(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function jS(){for(var t=window,e=bu();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=bu(t.document)}return e}function gm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function YI(t){var e=jS(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&zS(r.ownerDocument.documentElement,r)){if(n!==null&&gm(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Ty(r,s);var o=Ty(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Zi=null,qd=null,Mo=null,Qd=!1;function Py(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qd||Zi==null||Zi!==bu(n)||(n=Zi,"selectionStart"in n&&gm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Mo&&Jo(Mo,n)||(Mo=n,n=Iu(qd,"onSelect"),0rs||(t.current=nh[rs],nh[rs]=null,rs--)}function de(t,e){rs++,nh[rs]=t.current,t.current=e}var zn={},ut=Kn(zn),At=Kn(!1),pi=zn;function Cs(t,e){var r=t.type.contextTypes;if(!r)return zn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Et(t){return t=t.childContextTypes,t!=null}function Ru(){we(At),we(ut)}function Fy(t,e,r){if(ut.current!==zn)throw Error(k(168));de(ut,e),de(At,r)}function JS(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(k(108,jx(t)||"Unknown",i));return Re({},r,n)}function Mu(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||zn,pi=ut.current,de(ut,t),de(At,At.current),!0}function Uy(t,e,r){var n=t.stateNode;if(!n)throw Error(k(169));r?(t=JS(t,e,pi),n.__reactInternalMemoizedMergedChildContext=t,we(At),we(ut),de(ut,t)):we(At),de(At,r)}var Gr=null,Nc=!1,Ff=!1;function ZS(t){Gr===null?Gr=[t]:Gr.push(t)}function ok(t){Nc=!0,ZS(t)}function Yn(){if(!Ff&&Gr!==null){Ff=!0;var t=0,e=ie;try{var r=Gr;for(ie=1;t>=o,i-=o,qr=1<<32-dr(e)+i|r<E?(M=O,O=null):M=O.sibling;var V=d(w,O,y[E],b);if(V===null){O===null&&(O=M);break}t&&O&&V.alternate===null&&e(w,O),g=s(V,g,E),A===null?C=V:A.sibling=V,A=V,O=M}if(E===y.length)return r(w,O),Ce&&ri(w,E),C;if(O===null){for(;EE?(M=O,O=null):M=O.sibling;var te=d(w,O,V.value,b);if(te===null){O===null&&(O=M);break}t&&O&&te.alternate===null&&e(w,O),g=s(te,g,E),A===null?C=te:A.sibling=te,A=te,O=M}if(V.done)return r(w,O),Ce&&ri(w,E),C;if(O===null){for(;!V.done;E++,V=y.next())V=f(w,V.value,b),V!==null&&(g=s(V,g,E),A===null?C=V:A.sibling=V,A=V);return Ce&&ri(w,E),C}for(O=n(w,O);!V.done;E++,V=y.next())V=p(O,w,E,V.value,b),V!==null&&(t&&V.alternate!==null&&O.delete(V.key===null?E:V.key),g=s(V,g,E),A===null?C=V:A.sibling=V,A=V);return t&&O.forEach(function(ne){return e(w,ne)}),Ce&&ri(w,E),C}function v(w,g,y,b){if(typeof y=="object"&&y!==null&&y.type===Qi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ja:e:{for(var C=y.key,A=g;A!==null;){if(A.key===C){if(C=y.type,C===Qi){if(A.tag===7){r(w,A.sibling),g=i(A,y.props.children),g.return=w,w=g;break e}}else if(A.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Sn&&Yy(C)===A.type){r(w,A.sibling),g=i(A,y.props),g.ref=ao(w,A,y),g.return=w,w=g;break e}r(w,A);break}else e(w,A);A=A.sibling}y.type===Qi?(g=fi(y.props.children,w.mode,b,y.key),g.return=w,w=g):(b=nu(y.type,y.key,y.props,null,w.mode,b),b.ref=ao(w,g,y),b.return=w,w=b)}return o(w);case qi:e:{for(A=y.key;g!==null;){if(g.key===A)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(w,g.sibling),g=i(g,y.children||[]),g.return=w,w=g;break e}else{r(w,g);break}else e(w,g);g=g.sibling}g=Yf(y,w.mode,b),g.return=w,w=g}return o(w);case Sn:return A=y._init,v(w,g,A(y._payload),b)}if(_o(y))return m(w,g,y,b);if(ro(y))return h(w,g,y,b);ul(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(w,g.sibling),g=i(g,y),g.return=w,w=g):(r(w,g),g=Kf(y,w.mode,b),g.return=w,w=g),o(w)):r(w,g)}return v}var Es=a1(!0),l1=a1(!1),Pa={},Vr=Kn(Pa),ra=Kn(Pa),na=Kn(Pa);function li(t){if(t===Pa)throw Error(k(174));return t}function Em(t,e){switch(de(na,e),de(ra,t),de(Vr,Pa),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Fd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Fd(e,t)}we(Vr),de(Vr,e)}function Os(){we(Vr),we(ra),we(na)}function u1(t){li(na.current);var e=li(Vr.current),r=Fd(e,t.type);e!==r&&(de(ra,t),de(Vr,r))}function Om(t){ra.current===t&&(we(Vr),we(ra))}var Ie=Kn(0);function Lu(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Uf=[];function xm(){for(var t=0;tr?r:4,t(!0);var n=zf.transition;zf.transition={};try{t(!1),e()}finally{ie=r,zf.transition=n}}function E1(){return tr().memoizedState}function ck(t,e,r){var n=Ln(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},O1(t))x1(e,r);else if(r=n1(t,e,r,n),r!==null){var i=gt();hr(r,t,n,i),I1(r,e,n)}}function fk(t,e,r){var n=Ln(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(O1(t))x1(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,yr(a,o)){var l=e.interleaved;l===null?(i.next=i,Cm(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=n1(t,e,i,n),r!==null&&(i=gt(),hr(r,t,n,i),I1(r,e,n))}}function O1(t){var e=t.alternate;return t===ke||e!==null&&e===ke}function x1(t,e){To=$u=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function I1(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,um(t,r)}}var Bu={readContext:er,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},dk={readContext:er,useCallback:function(t,e){return kr().memoizedState=[t,e===void 0?null:e],t},useContext:er,useEffect:qy,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Zl(4194308,4,S1.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Zl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Zl(4,2,t,e)},useMemo:function(t,e){var r=kr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=kr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=ck.bind(null,ke,t),[n.memoizedState,t]},useRef:function(t){var e=kr();return t={current:t},e.memoizedState=t},useState:Xy,useDebugValue:Tm,useDeferredValue:function(t){return kr().memoizedState=t},useTransition:function(){var t=Xy(!1),e=t[0];return t=uk.bind(null,t[1]),kr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ke,i=kr();if(Ce){if(r===void 0)throw Error(k(407));r=r()}else{if(r=e(),Ze===null)throw Error(k(349));gi&30||d1(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,qy(p1.bind(null,n,s,t),[t]),n.flags|=2048,oa(9,h1.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=kr(),e=Ze.identifierPrefix;if(Ce){var r=Qr,n=qr;r=(n&~(1<<32-dr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=ia++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Rr]=e,t[ta]=n,L1(t,e,!1,!1),e.stateNode=t;e:{switch(o=zd(r,n),r){case"dialog":ge("cancel",t),ge("close",t),i=n;break;case"iframe":case"object":case"embed":ge("load",t),i=n;break;case"video":case"audio":for(i=0;iIs&&(e.flags|=128,n=!0,lo(s,!1),e.lanes=4194304)}else{if(!n)if(t=Lu(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),lo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ce)return at(e),null}else 2*Le()-s.renderingStartTime>Is&&r!==1073741824&&(e.flags|=128,n=!0,lo(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Le(),e.sibling=null,r=Ie.current,de(Ie,n?r&1|2:r&1),e):(at(e),null);case 22:case 23:return $m(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xt&1073741824&&(at(e),e.subtreeFlags&6&&(e.flags|=8192)):at(e),null;case 24:return null;case 25:return null}throw Error(k(156,e.tag))}function Sk(t,e){switch(vm(e),e.tag){case 1:return Et(e.type)&&Ru(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Os(),we(At),we(ut),xm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Om(e),null;case 13:if(we(Ie),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(k(340));As()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return we(Ie),null;case 4:return Os(),null;case 10:return _m(e.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var fl=!1,lt=!1,bk=typeof WeakSet=="function"?WeakSet:Set,P=null;function os(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){De(t,e,n)}else r.current=null}function mh(t,e,r){try{r()}catch(n){De(t,e,n)}}var sv=!1;function _k(t,e){if(Jd=Ou,t=jS(),gm(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=t,d=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===t)break t;if(d===r&&++u===i&&(a=o),d===s&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zd={focusedElem:t,selectionRange:r},Ou=!1,P=e;P!==null;)if(e=P,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,P=t;else for(;P!==null;){e=P;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,v=m.memoizedState,w=e.stateNode,g=w.getSnapshotBeforeUpdate(e.elementType===e.type?h:ar(e.type,h),v);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(b){De(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,P=t;break}P=e.return}return m=sv,sv=!1,m}function Po(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&mh(e,r,s)}i=i.next}while(i!==n)}}function $c(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function gh(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function F1(t){var e=t.alternate;e!==null&&(t.alternate=null,F1(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Rr],delete e[ta],delete e[rh],delete e[ik],delete e[sk])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function U1(t){return t.tag===5||t.tag===3||t.tag===4}function ov(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||U1(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function yh(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=ku));else if(n!==4&&(t=t.child,t!==null))for(yh(t,e,r),t=t.sibling;t!==null;)yh(t,e,r),t=t.sibling}function vh(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(vh(t,e,r),t=t.sibling;t!==null;)vh(t,e,r),t=t.sibling}var rt=null,lr=!1;function gn(t,e,r){for(r=r.child;r!==null;)z1(t,e,r),r=r.sibling}function z1(t,e,r){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(Rc,r)}catch{}switch(r.tag){case 5:lt||os(r,e);case 6:var n=rt,i=lr;rt=null,gn(t,e,r),rt=n,lr=i,rt!==null&&(lr?(t=rt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):rt.removeChild(r.stateNode));break;case 18:rt!==null&&(lr?(t=rt,r=r.stateNode,t.nodeType===8?Bf(t.parentNode,r):t.nodeType===1&&Bf(t,r),qo(t)):Bf(rt,r.stateNode));break;case 4:n=rt,i=lr,rt=r.stateNode.containerInfo,lr=!0,gn(t,e,r),rt=n,lr=i;break;case 0:case 11:case 14:case 15:if(!lt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&mh(r,e,o),i=i.next}while(i!==n)}gn(t,e,r);break;case 1:if(!lt&&(os(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){De(r,e,a)}gn(t,e,r);break;case 21:gn(t,e,r);break;case 22:r.mode&1?(lt=(n=lt)||r.memoizedState!==null,gn(t,e,r),lt=n):gn(t,e,r);break;default:gn(t,e,r)}}function av(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new bk),e.forEach(function(n){var i=Mk.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function sr(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ak(n/1960))-n,10t?16:t,xn===null)var n=!1;else{if(t=xn,xn=null,zu=0,Z&6)throw Error(k(331));var i=Z;for(Z|=4,P=t.current;P!==null;){var s=P,o=s.child;if(P.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lLe()-Dm?ci(t,0):Nm|=r),Ot(t,e)}function q1(t,e){e===0&&(t.mode&1?(e=rl,rl<<=1,!(rl&130023424)&&(rl=4194304)):e=1);var r=gt();t=on(t,e),t!==null&&(Ra(t,e,r),Ot(t,r))}function Rk(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),q1(t,r)}function Mk(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(k(314))}n!==null&&n.delete(e),q1(t,r)}var Q1;Q1=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||At.current)Ct=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Ct=!1,vk(t,e,r);Ct=!!(t.flags&131072)}else Ct=!1,Ce&&e.flags&1048576&&e1(e,Pu,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;eu(t,e),t=e.pendingProps;var i=Cs(e,ut.current);ws(e,r),i=km(null,e,n,t,i,r);var s=Rm();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Et(n)?(s=!0,Mu(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Am(e),i.updater=Dc,e.stateNode=i,i._reactInternals=e,lh(e,n,t,r),e=fh(null,e,n,!0,s,r)):(e.tag=0,Ce&&s&&ym(e),ht(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(eu(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=Pk(n),t=ar(n,t),i){case 0:e=ch(null,e,n,t,r);break e;case 1:e=rv(null,e,n,t,r);break e;case 11:e=ev(null,e,n,t,r);break e;case 14:e=tv(null,e,n,ar(n.type,t),r);break e}throw Error(k(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ar(n,i),ch(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ar(n,i),rv(t,e,n,i,r);case 3:e:{if(V1(e),t===null)throw Error(k(387));n=e.pendingProps,s=e.memoizedState,i=s.element,i1(t,e),Du(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=xs(Error(k(423)),e),e=nv(t,e,n,r,i);break e}else if(n!==i){i=xs(Error(k(424)),e),e=nv(t,e,n,r,i);break e}else for(Mt=Vn(e.stateNode.containerInfo.firstChild),Pt=e,Ce=!0,cr=null,r=l1(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(As(),n===i){e=an(t,e,r);break e}ht(t,e,n,r)}e=e.child}return e;case 5:return u1(e),t===null&&sh(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,eh(n,i)?o=null:s!==null&&eh(n,s)&&(e.flags|=32),P1(t,e),ht(t,e,o,r),e.child;case 6:return t===null&&sh(e),null;case 13:return N1(t,e,r);case 4:return Em(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Es(e,null,n,r):ht(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ar(n,i),ev(t,e,n,i,r);case 7:return ht(t,e,e.pendingProps,r),e.child;case 8:return ht(t,e,e.pendingProps.children,r),e.child;case 12:return ht(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,de(Vu,n._currentValue),n._currentValue=o,s!==null)if(yr(s.value,o)){if(s.children===i.children&&!At.current){e=an(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Zr(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),oh(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(k(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),oh(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ht(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,ws(e,r),i=er(i),n=n(i),e.flags|=1,ht(t,e,n,r),e.child;case 14:return n=e.type,i=ar(n,e.pendingProps),i=ar(n.type,i),tv(t,e,n,i,r);case 15:return M1(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ar(n,i),eu(t,e),e.tag=1,Et(n)?(t=!0,Mu(e)):t=!1,ws(e,r),o1(e,n,i),lh(e,n,i,r),fh(null,e,n,!0,t,r);case 19:return D1(t,e,r);case 22:return T1(t,e,r)}throw Error(k(156,e.tag))};function J1(t,e){return AS(t,e)}function Tk(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(t,e,r,n){return new Tk(t,e,r,n)}function Fm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Pk(t){if(typeof t=="function")return Fm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===sm)return 11;if(t===om)return 14}return 2}function $n(t,e){var r=t.alternate;return r===null?(r=Yt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function nu(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Fm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Qi:return fi(r.children,i,s,e);case im:o=8,i|=8;break;case Td:return t=Yt(12,r,e,i|2),t.elementType=Td,t.lanes=s,t;case Pd:return t=Yt(13,r,e,i),t.elementType=Pd,t.lanes=s,t;case Vd:return t=Yt(19,r,e,i),t.elementType=Vd,t.lanes=s,t;case aS:return Fc(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case sS:o=10;break e;case oS:o=9;break e;case sm:o=11;break e;case om:o=14;break e;case Sn:o=16,n=null;break e}throw Error(k(130,t==null?t:typeof t,""))}return e=Yt(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function fi(t,e,r,n){return t=Yt(7,t,n,e),t.lanes=r,t}function Fc(t,e,r,n){return t=Yt(22,t,n,e),t.elementType=aS,t.lanes=r,t.stateNode={isHidden:!1},t}function Kf(t,e,r){return t=Yt(6,t,null,e),t.lanes=r,t}function Yf(t,e,r){return e=Yt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Vk(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=If(0),this.expirationTimes=If(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=If(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Um(t,e,r,n,i,s,o,a,l){return t=new Vk(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Yt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Am(s),t}function Nk(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rb)}catch(t){console.error(t)}}rb(),eS.exports=$t;var nb=eS.exports;const nU=$p(nb);function X(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;nt.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Si(){return Si=Object.assign?Object.assign.bind():function(t){for(var e=1;en&&(n=a.dependenciesState_)}for(r.length=i,t.newObserving_=null,s=e.length;s--;){var l=e[s];l.diffValue===0&&xb(l,t),l.diffValue=0}for(;i--;){var u=r[i];u.diffValue===1&&(u.diffValue=0,GR(u,t))}n!==ee.UP_TO_DATE_&&(t.dependenciesState_=n,t.onBecomeStale_())}function Ih(t){var e=t.observing_;t.observing_=[];for(var r=e.length;r--;)xb(e[r],t);t.dependenciesState_=ee.NOT_TRACKING_}function Ab(t){var e=ki();try{return t()}finally{tn(e)}}function ki(){var t=T.trackingDerivation;return T.trackingDerivation=null,t}function tn(t){T.trackingDerivation=t}function Ym(t){var e=T.allowStateReads;return T.allowStateReads=t,e}function Do(t){T.allowStateReads=t}function Eb(t){if(t.dependenciesState_!==ee.UP_TO_DATE_){t.dependenciesState_=ee.UP_TO_DATE_;for(var e=t.observing_,r=e.length;r--;)e[r].lowestObserverState_=ee.UP_TO_DATE_}}var su=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},ou=!0,Ob=!1,T=function(){var t=Hc();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(ou=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new su().version&&(ou=!1),ou?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new su):(setTimeout(function(){Ob||X(35)},1),new su)}();function HR(){if((T.pendingReactions.length||T.inBatch||T.isRunningReactions)&&X(36),Ob=!0,ou){var t=Hc();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),T=new su}}function GR(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function xb(t,e){t.observers_.delete(e),t.observers_.size===0&&Ib(t)}function Ib(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,T.pendingUnobservations.push(t))}function Xt(){T.inBatch++}function qt(){if(--T.inBatch===0){Mb();for(var t=T.pendingUnobservations,e=0;e0&&Ib(t),!1)}function Rb(t){t.lowestObserverState_!==ee.STALE_&&(t.lowestObserverState_=ee.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ee.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=ee.STALE_}))}function KR(t){t.lowestObserverState_!==ee.STALE_&&(t.lowestObserverState_=ee.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ee.POSSIBLY_STALE_?e.dependenciesState_=ee.STALE_:e.dependenciesState_===ee.UP_TO_DATE_&&(t.lowestObserverState_=ee.UP_TO_DATE_)}))}function YR(t){t.lowestObserverState_===ee.UP_TO_DATE_&&(t.lowestObserverState_=ee.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ee.UP_TO_DATE_&&(e.dependenciesState_=ee.POSSIBLY_STALE_,e.onBecomeStale_())}))}var un=function(){function t(r,n,i,s){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ee.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ku.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=s}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,T.pendingReactions.push(this),Mb())},e.runReaction_=function(){if(!this.isDisposed){Xt(),this.isScheduled=!1;var n=T.trackingContext;if(T.trackingContext=this,xh(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}T.trackingContext=n,qt()}},e.track=function(n){if(!this.isDisposed){Xt(),this.isRunning=!0;var i=T.trackingContext;T.trackingContext=this;var s=Cb(this,n,void 0);T.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ih(this),iu(s)&&this.reportExceptionInDerivation_(s.cause),qt()}},e.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(T.disableErrorBoundaries)throw n;var s="[mobx] uncaught error in '"+this+"'";T.suppressReactionErrors||console.error(s,n),T.globalReactionErrorHandlers.forEach(function(o){return o(n,i)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Xt(),Ih(this),qt()))},e.getDisposer_=function(n){var i=this,s=function o(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",s),s[U]=this,s},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(n){},Xs(t,[{key:"isDisposed",get:function(){return kt(this.flags_,t.isDisposedMask_)},set:function(n){this.flags_=Rt(this.flags_,t.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return kt(this.flags_,t.isScheduledMask_)},set:function(n){this.flags_=Rt(this.flags_,t.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return kt(this.flags_,t.isTrackPendingMask_)},set:function(n){this.flags_=Rt(this.flags_,t.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return kt(this.flags_,t.isRunningMask_)},set:function(n){this.flags_=Rt(this.flags_,t.isRunningMask_,n)}},{key:"diffValue",get:function(){return kt(this.flags_,t.diffValueMask_)?1:0},set:function(n){this.flags_=Rt(this.flags_,t.diffValueMask_,n===1)}}])}();un.isDisposedMask_=1;un.isScheduledMask_=2;un.isTrackPendingMask_=4;un.isRunningMask_=8;un.diffValueMask_=16;var XR=100,kh=function(e){return e()};function Mb(){T.inBatch>0||T.isRunningReactions||kh(qR)}function qR(){T.isRunningReactions=!0;for(var t=T.pendingReactions,e=0;t.length>0;){++e===XR&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,i=r.length;n0&&(e.dependencies=fM(t.observing_).map(Fb)),e}function fM(t){return Array.from(new Set(t))}var dM=0;function Ub(){this.message="FLOW_CANCELLED"}Ub.prototype=Object.create(Error.prototype);var Xf=mb("flow"),hM=mb("flow.bound",{bound:!0}),Ts=Object.assign(function(e,r){if(La(r))return Xf.decorate_20223_(e,r);if(wi(r))return Da(e,r,Xf);var n=e,i=n.name||"",s=function(){var a=this,l=arguments,u=++dM,c=D(i+" - runid: "+u+" - init",n).apply(a,l),f,d=void 0,p=new Promise(function(m,h){var v=0;f=h;function w(b){d=void 0;var C;try{C=D(i+" - runid: "+u+" - yield "+v++,c.next).call(c,b)}catch(A){return h(A)}y(C)}function g(b){d=void 0;var C;try{C=D(i+" - runid: "+u+" - yield "+v++,c.throw).call(c,b)}catch(A){return h(A)}y(C)}function y(b){if(vr(b==null?void 0:b.then)){b.then(y,h);return}return b.done?m(b.value):(d=Promise.resolve(b.value),d.then(w,g))}w(void 0)});return p.cancel=D(i+" - runid: "+u+" - cancel",function(){try{d&&Sv(d);var m=c.return(void 0),h=Promise.resolve(m.value);h.then(ls,ls),Sv(h),f(new Ub)}catch(v){f(v)}}),p};return s.isMobXFlow=!0,s},Xf);Ts.bound=pr(hM);function Sv(t){vr(t.cancel)&&t.cancel()}function ua(t){return(t==null?void 0:t.isMobXFlow)===!0}function pM(t,e){if(e===void 0)return Ci(t);if(qs(t)===!1||!t[U].values_.has(e))return!1;var r=ca(t,e);return Ci(r)}function mM(t,e){return pM(t,e)}function gM(t,e){return t?qs(t)||!!t[U]||Gm(t)||Xu(t)||Ci(t):!1}function Xm(t){return gM(t)}function yM(t){if(qs(t))return t[U].ownKeys_();X(38)}function yl(t,e,r){return t.set(e,r),r}function Ki(t,e){if(t==null||typeof t!="object"||t instanceof Date||!Xm(t))return t;if(jR(t)||Ci(t))return Ki(t.get(),e);if(e.has(t))return e.get(t);if(za(t)){var r=yl(e,t,new Array(t.length));return t.forEach(function(o,a){r[a]=Ki(o,e)}),r}if(fr(t)){var n=yl(e,t,new Set);return t.forEach(function(o){n.add(Ki(o,e))}),n}if(Qn(t)){var i=yl(e,t,new Map);return t.forEach(function(o,a){i.set(a,Ki(o,e))}),i}else{var s=yl(e,t,{});return yM(t).forEach(function(o){Va.propertyIsEnumerable.call(t,o)&&(s[o]=Ki(t[o],e))}),s}}function qf(t,e){return Ki(t,new Map)}function Yr(t,e){e===void 0&&(e=void 0),Xt();try{return t.apply(e)}finally{qt()}}function ji(t){return t[U]}var vM={has:function(e,r){return ji(e).has_(r)},get:function(e,r){return ji(e).get_(r)},set:function(e,r,n){var i;return wi(r)?(i=ji(e).set_(r,n,!0))!=null?i:!0:!1},deleteProperty:function(e,r){var n;return wi(r)?(n=ji(e).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(e,r,n){var i;return(i=ji(e).defineProperty_(r,n))!=null?i:!0},ownKeys:function(e){return ji(e).ownKeys_()},preventExtensions:function(e){X(13)}};function wM(t,e){var r,n;return sb(),t=Ri(t,e),(n=(r=t[U]).proxy_)!=null?n:r.proxy_=new Proxy(t,vM)}function Gt(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function Ba(t,e){var r=t.interceptors_||(t.interceptors_=[]);return r.push(e),ob(function(){var n=r.indexOf(e);n!==-1&&r.splice(n,1)})}function Kt(t,e){var r=ki();try{for(var n=[].concat(t.interceptors_||[]),i=0,s=n.length;i0}function Fa(t,e){var r=t.changeListeners_||(t.changeListeners_=[]);return r.push(e),ob(function(){var n=r.indexOf(e);n!==-1&&r.splice(n,1)})}function gr(t,e){var r=ki(),n=t.changeListeners_;if(n){n=n.slice();for(var i=0,s=n.length;i0?n.map(this.dehancer):n},e.intercept_=function(n){return Ba(this,n)},e.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Fa(this,n)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&X("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var s=new Array(n-i),o=0;o0&&Kb(n+i+1)},e.spliceWithArray_=function(n,i,s){var o=this;this.atom_;var a=this.values_.length;if(n===void 0?n=0:n>a?n=a:n<0&&(n=Math.max(0,a+n)),arguments.length===1?i=a-n:i==null?i=0:i=Math.max(0,Math.min(i,a-n)),s===void 0&&(s=Ch),Gt(this)){var l=Kt(this,{object:this.proxy_,type:bv,index:n,removedCount:i,added:s});if(!l)return Ch;i=l.removedCount,s=l.added}if(s=s.length===0?s:s.map(function(f){return o.enhancer_(f,void 0)}),this.legacyMode_){var u=s.length-i;this.updateArrayLength_(a,u)}var c=this.spliceItemsIntoValues_(n,i,s);return(i!==0||s.length!==0)&&this.notifyArraySplice_(n,s,c),this.dehanceValues_(c)},e.spliceItemsIntoValues_=function(n,i,s){if(s.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},e.set_=function(n,i){var s=this.values_;if(this.legacyMode_&&n>s.length&&X(17,n,s.length),n2?n-2:0),s=2;s-1?(this.splice(n,1),!0):!1}};he("at",Ft);he("concat",Ft);he("flat",Ft);he("includes",Ft);he("indexOf",Ft);he("join",Ft);he("lastIndexOf",Ft);he("slice",Ft);he("toString",Ft);he("toLocaleString",Ft);he("toSorted",Ft);he("toSpliced",Ft);he("with",Ft);he("every",Sr);he("filter",Sr);he("find",Sr);he("findIndex",Sr);he("findLast",Sr);he("findLastIndex",Sr);he("flatMap",Sr);he("forEach",Sr);he("map",Sr);he("some",Sr);he("toReversed",Sr);he("reduce",jb);he("reduceRight",jb);function he(t,e){typeof Array.prototype[t]=="function"&&(qu[t]=e(t))}function Ft(t){return function(){var e=this[U];e.atom_.reportObserved();var r=e.dehanceValues_(e.values_);return r[t].apply(r,arguments)}}function Sr(t){return function(e,r){var n=this,i=this[U];i.atom_.reportObserved();var s=i.dehanceValues_(i.values_);return s[t](function(o,a){return e.call(r,o,a,n)})}}function jb(t){return function(){var e=this,r=this[U];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(s,o,a){return i(s,o,a,e)},n[t].apply(n,arguments)}}var CM=Xn("ObservableArrayAdministration",qm);function za(t){return Gc(t)&&CM(t[U])}var AM={},kn="add",Qu="delete",Ju=function(){function t(r,n,i){var s=this;n===void 0&&(n=bi),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[U]=AM,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=i,vr(Map)||X(18),Jn(function(){s.keysAtom_=db("ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,r&&s.merge(r)})}var e=t.prototype;return e.has_=function(n){return this.data_.has(n)},e.has=function(n){var i=this;if(!T.trackingDerivation)return this.has_(n);var s=this.hasMap_.get(n);if(!s){var o=s=new Bn(this.has_(n),Kc,"ObservableMap.key?",!1);this.hasMap_.set(n,o),Lb(o,function(){return i.hasMap_.delete(n)})}return s.get()},e.set=function(n,i){var s=this.has_(n);if(Gt(this)){var o=Kt(this,{type:s?Dr:kn,object:this,newValue:i,name:n});if(!o)return this;i=o.newValue}return s?this.updateValue_(n,i):this.addValue_(n,i),this},e.delete=function(n){var i=this;if(this.keysAtom_,Gt(this)){var s=Kt(this,{type:Qu,object:this,name:n});if(!s)return!1}if(this.has_(n)){var o=Lo(),a=mr(this),l=a||o?{observableKind:"map",debugObjectName:this.name_,type:Qu,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return Yr(function(){var u;i.keysAtom_.reportChanged(),(u=i.hasMap_.get(n))==null||u.setNewValue_(!1);var c=i.data_.get(n);c.setNewValue_(void 0),i.data_.delete(n)}),a&&gr(this,l),!0}return!1},e.updateValue_=function(n,i){var s=this.data_.get(n);if(i=s.prepareNewValue_(i),i!==T.UNCHANGED){var o=Lo(),a=mr(this),l=a||o?{observableKind:"map",debugObjectName:this.name_,type:Dr,object:this,oldValue:s.value_,name:n,newValue:i}:null;s.setNewValue_(i),a&&gr(this,l)}},e.addValue_=function(n,i){var s=this;this.keysAtom_,Yr(function(){var u,c=new Bn(i,s.enhancer_,"ObservableMap.key",!1);s.data_.set(n,c),i=c.value_,(u=s.hasMap_.get(n))==null||u.setNewValue_(!0),s.keysAtom_.reportChanged()});var o=Lo(),a=mr(this),l=a||o?{observableKind:"map",debugObjectName:this.name_,type:kn,object:this,name:n,newValue:i}:null;a&&gr(this,l)},e.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var n=this,i=this.keys();return _v({next:function(){var o=i.next(),a=o.done,l=o.value;return{done:a,value:a?void 0:n.get(l)}}})},e.entries=function(){var n=this,i=this.keys();return _v({next:function(){var o=i.next(),a=o.done,l=o.value;return{done:a,value:a?void 0:[l,n.get(l)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(n,i){for(var s=us(this),o;!(o=s()).done;){var a=o.value,l=a[0],u=a[1];n.call(i,u,l,this)}},e.merge=function(n){var i=this;return Qn(n)&&(n=new Map(n)),Yr(function(){ln(n)?Wk(n).forEach(function(s){return i.set(s,n[s])}):Array.isArray(n)?n.forEach(function(s){var o=s[0],a=s[1];return i.set(o,a)}):Ys(n)?(jk(n)||X(19,n),n.forEach(function(s,o){return i.set(o,s)})):n!=null&&X(20,n)}),this},e.clear=function(){var n=this;Yr(function(){Ab(function(){for(var i=us(n.keys()),s;!(s=i()).done;){var o=s.value;n.delete(o)}})})},e.replace=function(n){var i=this;return Yr(function(){for(var s=EM(n),o=new Map,a=!1,l=us(i.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!s.has(c)){var f=i.delete(c);if(f)a=!0;else{var d=i.data_.get(c);o.set(c,d)}}}for(var p=us(s.entries()),m;!(m=p()).done;){var h=m.value,v=h[0],w=h[1],g=i.data_.has(v);if(i.set(v,w),i.data_.has(v)){var y=i.data_.get(v);o.set(v,y),g||(a=!0)}}if(!a)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var b=i.data_.keys(),C=o.keys(),A=b.next(),O=C.next();!A.done;){if(A.value!==O.value){i.keysAtom_.reportChanged();break}A=b.next(),O=C.next()}i.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(n,i){return Fa(this,n)},e.intercept_=function(n){return Ba(this,n)},Xs(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Qn=Xn("ObservableMap",Ju);function _v(t){return t[Symbol.toStringTag]="MapIterator",Jm(t)}function EM(t){if(Ys(t)||Qn(t))return t;if(Array.isArray(t))return new Map(t);if(ln(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}else return X(21,t)}var OM={},Zu=function(){function t(r,n,i){var s=this;n===void 0&&(n=bi),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[U]=OM,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,vr(Set)||X(22),this.enhancer_=function(o,a){return n(o,a,i)},Jn(function(){s.atom_=db(s.name_),r&&s.replace(r)})}var e=t.prototype;return e.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.clear=function(){var n=this;Yr(function(){Ab(function(){for(var i=us(n.data_.values()),s;!(s=i()).done;){var o=s.value;n.delete(o)}})})},e.forEach=function(n,i){for(var s=us(this),o;!(o=s()).done;){var a=o.value;n.call(i,a,a,this)}},e.add=function(n){var i=this;if(this.atom_,Gt(this)){var s=Kt(this,{type:kn,object:this,newValue:n});if(!s)return this;n=s.newValue}if(!this.has(n)){Yr(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var o=!1,a=mr(this),l=a||o?{observableKind:"set",debugObjectName:this.name_,type:kn,object:this,newValue:n}:null;a&&gr(this,l)}return this},e.delete=function(n){var i=this;if(Gt(this)){var s=Kt(this,{type:Qu,object:this,oldValue:n});if(!s)return!1}if(this.has(n)){var o=!1,a=mr(this),l=a||o?{observableKind:"set",debugObjectName:this.name_,type:Qu,object:this,oldValue:n}:null;return Yr(function(){i.atom_.reportChanged(),i.data_.delete(n)}),a&&gr(this,l),!0}return!1},e.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},e.entries=function(){var n=this.values();return Cv({next:function(){var s=n.next(),o=s.value,a=s.done;return a?{value:void 0,done:a}:{value:[o,o],done:a}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var n=this,i=this.data_.values();return Cv({next:function(){var o=i.next(),a=o.value,l=o.done;return l?{value:void 0,done:l}:{value:n.dehanceValue_(a),done:l}}})},e.intersection=function(n){if(Kr(n)&&!fr(n))return n.intersection(this);var i=new Set(this);return i.intersection(n)},e.union=function(n){if(Kr(n)&&!fr(n))return n.union(this);var i=new Set(this);return i.union(n)},e.difference=function(n){return new Set(this).difference(n)},e.symmetricDifference=function(n){if(Kr(n)&&!fr(n))return n.symmetricDifference(this);var i=new Set(this);return i.symmetricDifference(n)},e.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},e.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},e.isDisjointFrom=function(n){if(Kr(n)&&!fr(n))return n.isDisjointFrom(this);var i=new Set(this);return i.isDisjointFrom(n)},e.replace=function(n){var i=this;return fr(n)&&(n=new Set(n)),Yr(function(){Array.isArray(n)?(i.clear(),n.forEach(function(s){return i.add(s)})):Kr(n)?(i.clear(),n.forEach(function(s){return i.add(s)})):n!=null&&X("Cannot initialize set from "+n)}),this},e.observe_=function(n,i){return Fa(this,n)},e.intercept_=function(n){return Ba(this,n)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},Xs(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),fr=Xn("ObservableSet",Zu);function Cv(t){return t[Symbol.toStringTag]="SetIterator",Jm(t)}var Av=Object.create(null),Ev="remove",Wb=function(){function t(r,n,i,s){n===void 0&&(n=new Map),s===void 0&&(s=_R),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=s,this.keysAtom_=new qn("ObservableObject.keys"),this.isPlainObject_=ln(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(n){return this.values_.get(n).get()},e.setObservablePropValue_=function(n,i){var s=this.values_.get(n);if(s instanceof wr)return s.set(i),!0;if(Gt(this)){var o=Kt(this,{type:Dr,object:this.proxy_||this.target_,name:n,newValue:i});if(!o)return null;i=o.newValue}if(i=s.prepareNewValue_(i),i!==T.UNCHANGED){var a=mr(this),l=!1,u=a||l?{type:Dr,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:n,newValue:i}:null;s.setNewValue_(i),a&&gr(this,u)}return!0},e.get_=function(n){return T.trackingDerivation&&!en(this.target_,n)&&this.has_(n),this.target_[n]},e.set_=function(n,i,s){return s===void 0&&(s=!1),en(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):s?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},e.has_=function(n){if(!T.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new Bn(n in this.target_,Kc,"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},e.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(n in this.target_)){var s;if((s=this.target_[Tr])!=null&&s[n])return;X(1,i.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==Va;){var a=Hu(o,n);if(a){var l=i.make_(this,n,a,o);if(l===0)return;if(l===1)break}o=Object.getPrototypeOf(o)}xv(this,i,n)}},e.extend_=function(n,i,s,o){if(o===void 0&&(o=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(n,i,o);var a=s.extend_(this,n,i,o);return a&&xv(this,s,n),a},e.defineProperty_=function(n,i,s){s===void 0&&(s=!1),this.keysAtom_;try{Xt();var o=this.delete_(n);if(!o)return o;if(Gt(this)){var a=Kt(this,{object:this.proxy_||this.target_,name:n,type:kn,newValue:i.value});if(!a)return null;var l=a.newValue;i.value!==l&&(i=Si({},i,{value:l}))}if(s){if(!Reflect.defineProperty(this.target_,n,i))return!1}else Nr(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{qt()}return!0},e.defineObservableProperty_=function(n,i,s,o){o===void 0&&(o=!1),this.keysAtom_;try{Xt();var a=this.delete_(n);if(!a)return a;if(Gt(this)){var l=Kt(this,{object:this.proxy_||this.target_,name:n,type:kn,newValue:i});if(!l)return null;i=l.newValue}var u=Ov(n),c={configurable:T.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(o){if(!Reflect.defineProperty(this.target_,n,c))return!1}else Nr(this.target_,n,c);var f=new Bn(i,s,"ObservableObject.key",!1);this.values_.set(n,f),this.notifyPropertyAddition_(n,f.value_)}finally{qt()}return!0},e.defineComputedProperty_=function(n,i,s){s===void 0&&(s=!1),this.keysAtom_;try{Xt();var o=this.delete_(n);if(!o)return o;if(Gt(this)){var a=Kt(this,{object:this.proxy_||this.target_,name:n,type:kn,newValue:void 0});if(!a)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var l=Ov(n),u={configurable:T.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(s){if(!Reflect.defineProperty(this.target_,n,u))return!1}else Nr(this.target_,n,u);this.values_.set(n,new wr(i)),this.notifyPropertyAddition_(n,void 0)}finally{qt()}return!0},e.delete_=function(n,i){if(i===void 0&&(i=!1),this.keysAtom_,!en(this.target_,n))return!0;if(Gt(this)){var s=Kt(this,{object:this.proxy_||this.target_,name:n,type:Ev});if(!s)return null}try{var o;Xt();var a=mr(this),l=!1,u=this.values_.get(n),c=void 0;if(!u&&(a||l)){var f;c=(f=Hu(this.target_,n))==null?void 0:f.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(u&&(this.values_.delete(n),u instanceof Bn&&(c=u.value_),Rb(u)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(n))==null||o.set(n in this.target_),a||l){var d={type:Ev,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:n};a&&gr(this,d)}}finally{qt()}return!0},e.observe_=function(n,i){return Fa(this,n)},e.intercept_=function(n){return Ba(this,n)},e.notifyPropertyAddition_=function(n,i){var s,o=mr(this),a=!1;if(o||a){var l=o||a?{type:kn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;o&&gr(this,l)}(s=this.pendingKeys_)==null||(s=s.get(n))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),ks(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ri(t,e){var r;if(en(t,U))return t;var n=(r=e==null?void 0:e.name)!=null?r:"ObservableObject",i=new Wb(t,new Map,String(n),PR(e));return Na(t,U,i),t}var xM=Xn("ObservableObjectAdministration",Wb);function Ov(t){return Av[t]||(Av[t]={get:function(){return this[U].getObservablePropValue_(t)},set:function(r){return this[U].setObservablePropValue_(t,r)}})}function qs(t){return Gc(t)?xM(t[U]):!1}function xv(t,e,r){var n;(n=t.target_[Tr])==null||delete n[r]}var IM=Gb(0),kM=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Jf=0,Hb=function(){};function RM(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}RM(Hb,Array.prototype);var Qm=function(t){function e(n,i,s,o){var a;return s===void 0&&(s="ObservableArray"),o===void 0&&(o=!1),a=t.call(this)||this,Jn(function(){var l=new qm(s,i,o,!0);l.proxy_=a,lb(a,U,l),n&&n.length&&a.spliceWithArray(0,0,n),kM&&Object.defineProperty(a,"0",IM)}),a}fb(e,t);var r=e.prototype;return r.concat=function(){this[U].atom_.reportObserved();for(var i=arguments.length,s=new Array(i),o=0;oJf){for(var e=Jf;e=0&&r++;break}t=kv(t),e=kv(e);var a=o==="[object Array]";if(!a){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(vr(l)&&l instanceof l&&vr(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var c=n.length;c--;)if(n[c]===t)return i[c]===e;if(n.push(t),i.push(e),a){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!Ph(t[c],e[c],r-1,n,i))return!1}else{var f=Object.keys(t),d=f.length;if(Object.keys(e).length!==d)return!1;for(var p=0;p"u"&&X("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:JR,extras:{getDebugName:Th},$mobx:U});var Qc=new Map,DM=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((n=n.apply(t,e||[])).next())})},LM=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]0){if(++e>=UT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function HT(t){return function(){return t}}var ec=function(){try{var t=Pi(Object,"defineProperty");return t({},"",{}),t}catch{}}(),GT=ec?function(t,e){return ec(t,"toString",{configurable:!0,enumerable:!1,value:HT(e),writable:!0})}:eg,Zb=WT(GT);function KT(t,e,r,n){for(var i=t.length,s=r+-1;++s-1}var JT=9007199254740991,ZT=/^(?:0|[1-9]\d*)$/;function Zc(t,e){var r=typeof t;return e=e??JT,!!e&&(r=="number"||r!="symbol"&&ZT.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=iP}function ef(t){return t!=null&&ng(t.length)&&!tg(t)}function sP(t,e,r){if(!Dt(r))return!1;var n=typeof e;return(n=="number"?ef(r)&&Zc(e,r.length):n=="string"&&e in r)?ja(r[e],t):!1}function oP(t){return nP(function(e,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&sP(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++n-1}function yV(t,e){var r=this.__data__,n=tf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function hn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++ea))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,p=r&gN?new pa:void 0;for(s.set(t,e),s.set(e,t);++f=e||O<0||f&&E>=s}function w(){var A=id();if(v(A))return g(A);a=setTimeout(w,h(A))}function g(A){return a=void 0,d&&n?p(A):(n=i=void 0,o)}function y(){a!==void 0&&clearTimeout(a),u=0,n=l=i=a=void 0}function b(){return a===void 0?o:g(id())}function C(){var A=id(),O=v(A);if(n=arguments,i=this,l=A,O){if(a===void 0)return m(l);if(f)return clearTimeout(a),a=setTimeout(w,e),p(l)}return a===void 0&&(a=setTimeout(w,e)),o}return C.cancel=y,C.flush=b,C}function Lh(t,e,r){(r!==void 0&&!ja(t[e],r)||r===void 0&&!(e in t))&&rg(t,e,r)}function s2(t){return jn(t)&&ef(t)}function $h(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function o2(t){return rP(t,l_(t))}function a2(t,e,r,n,i,s,o){var a=$h(t,r),l=$h(e,r),u=o.get(l);if(u){Lh(t,r,u);return}var c=s?s(a,l,r+"",t,e,o):void 0,f=c===void 0;if(f){var d=rr(l),p=!d&&tc(l),m=!d&&!p&&sg(l);c=l,d||p||m?rr(a)?c=a:s2(a)?c=FT(a):p?(f=!1,c=XV(l)):m?(f=!1,c=uN(l)):c=[]:UV(l)||fa(l)?(c=a,fa(a)?c=o2(a):(!Dt(a)||tg(a))&&(c=cN(l))):f=!1}f&&(o.set(l,c),i(c,l,n,s,o),o.delete(l)),Lh(t,r,c)}function v_(t,e,r,n,i){t!==e&&e2(e,function(s,o){if(i||(i=new Lr),Dt(s))a2(t,e,o,r,v_,n,i);else{var a=n?n($h(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Lh(t,o,a)}},l_)}var l2=oP(function(t,e,r){v_(t,e,r)});function u2(t,e,r,n){if(!Dt(t))return t;e=nf(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i=m2){var u=e?null:p2(t);if(u)return ug(u);o=!1,i=h_,l=new pa}else l=e?[]:a;e:for(;++n{au[Fr[t]]=t});const Bh={type:"error",data:"parser error"},S_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",b_=typeof ArrayBuffer=="function",__=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,fg=({type:t,data:e},r,n)=>S_&&e instanceof Blob?r?n(e):i0(e,n):b_&&(e instanceof ArrayBuffer||__(e))?r?n(e):i0(new Blob([e]),n):n(Fr[t]+(e||"")),i0=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function s0(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let od;function w2(t,e){if(S_&&t.data instanceof Blob)return t.data.arrayBuffer().then(s0).then(e);if(b_&&(t.data instanceof ArrayBuffer||__(t.data)))return e(s0(t.data));fg(t,!1,r=>{od||(od=new TextEncoder),e(od.encode(r))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Eo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,r=t.length,n,i=0,s,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const u=new ArrayBuffer(e),c=new Uint8Array(u);for(n=0;n>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},b2=typeof ArrayBuffer=="function",dg=(t,e)=>{if(typeof t!="string")return{type:"message",data:C_(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:_2(t.substring(1),e)}:au[r]?t.length>1?{type:au[r],data:t.substring(1)}:{type:au[r]}:Bh},_2=(t,e)=>{if(b2){const r=S2(t);return C_(r,e)}else return{base64:!0,data:t}},C_=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},A_="",C2=(t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach((s,o)=>{fg(s,!1,a=>{n[o]=a,++i===r&&e(n.join(A_))})})},A2=(t,e)=>{const r=t.split(A_),n=[];for(let i=0;i{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(r)})}})}let ad;function wl(t){return t.reduce((e,r)=>e+r.length,0)}function Sl(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let i=0;iMath.pow(2,21)-1){a.enqueue(Bh);break}i=c*Math.pow(2,32)+u.getUint32(4),n=3}else{if(wl(r)t){a.enqueue(Bh);break}}}})}const E_=4;function je(t){if(t)return x2(t)}function x2(t){for(var e in je.prototype)t[e]=je.prototype[e];return t}je.prototype.on=je.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};je.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,i=0;iPromise.resolve().then(e):(e,r)=>r(e,0),Ht=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),I2="arraybuffer";function O_(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const k2=Ht.setTimeout,R2=Ht.clearTimeout;function of(t,e){e.useNativeTimers?(t.setTimeoutFn=k2.bind(Ht),t.clearTimeoutFn=R2.bind(Ht)):(t.setTimeoutFn=Ht.setTimeout.bind(Ht),t.clearTimeoutFn=Ht.clearTimeout.bind(Ht))}const M2=1.33;function T2(t){return typeof t=="string"?P2(t):Math.ceil((t.byteLength||t.size)*M2)}function P2(t){let e=0,r=0;for(let n=0,i=t.length;n=57344?r+=3:(n++,r+=4);return r}function x_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function V2(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function N2(t){let e={},r=t.split("&");for(let n=0,i=r.length;n{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};A2(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,C2(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=x_()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let I_=!1;try{I_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const $2=I_;function B2(){}class F2 extends L2{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class $r extends je{constructor(e,r,n){super(),this.createRequest=e,of(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=O_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=$r.requestsCount++,$r.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=B2,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $r.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}$r.requestsCount=0;$r.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",a0);else if(typeof addEventListener=="function"){const t="onpagehide"in Ht?"pagehide":"unload";addEventListener(t,a0,!1)}}function a0(){for(let t in $r.requests)$r.requests.hasOwnProperty(t)&&$r.requests[t].abort()}const U2=function(){const t=k_({xdomain:!1});return t&&t.responseType!==null}();class z2 extends F2{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=U2&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new $r(k_,this.uri(),e)}}function k_(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$2))return new XMLHttpRequest}catch{}if(!e)try{return new Ht[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const R_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class j2 extends hg{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=R_?{}:O_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r{try{this.doWrite(n,s)}catch{}i&&sf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=x_()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const ld=Ht.WebSocket||Ht.MozWebSocket;class W2 extends j2{createSocket(e,r,n){return R_?new ld(e,r,n):r?new ld(e,r):new ld(e)}doWrite(e,r){this.ws.send(r)}}class H2 extends hg{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=O2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),i=E2();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const s=()=>{n.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r{i&&sf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const G2={websocket:W2,webtransport:H2,polling:z2},K2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Y2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Fh(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let i=K2.exec(t||""),s={},o=14;for(;o--;)s[Y2[o]]=i[o]||"";return r!=-1&&n!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=X2(s,s.path),s.queryKey=q2(s,s.query),s}function X2(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function q2(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,s){i&&(r[i]=s)}),r}const Uh=typeof addEventListener=="function"&&typeof removeEventListener=="function",lu=[];Uh&&addEventListener("offline",()=>{lu.forEach(t=>t())},!1);class Fn extends je{constructor(e,r){if(super(),this.binaryType=I2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Fh(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Fh(r.host).host);of(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=N2(this.opts.query)),Uh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=E_,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Fn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Fn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,sf(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Fn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Uh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=lu.indexOf(this._offlineEventListener);n!==-1&&lu.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Fn.protocol=E_;class Q2 extends Fn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",f=>{if(!n)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Fn.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(c(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){n||(n=!0,c(),r.close(),r=null)}const o=f=>{const d=new Error("probe error: "+f);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(f){r&&f.name!==r.name&&s()}const c=()=>{r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};r.once("open",i),r.once("error",o),r.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;nG2[i]).filter(i=>!!i)),super(e,n)}};function Z2(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Fh(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}const eD=typeof ArrayBuffer=="function",tD=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,M_=Object.prototype.toString,rD=typeof Blob=="function"||typeof Blob<"u"&&M_.call(Blob)==="[object BlobConstructor]",nD=typeof File=="function"||typeof File<"u"&&M_.call(File)==="[object FileConstructor]";function pg(t){return eD&&(t instanceof ArrayBuffer||tD(t))||rD&&t instanceof Blob||nD&&t instanceof File}function uu(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r=0&&t.num{delete this.acks[e];for(let a=0;a{this.io.clearTimeoutFn(s),r.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...r){return new Promise((n,i)=>{const s=(o,a)=>o?i(o):n(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...s)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Y.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Y.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Y.EVENT:case Y.BINARY_EVENT:this.onevent(e);break;case Y.ACK:case Y.BINARY_ACK:this.onack(e);break;case Y.DISCONNECT:this.ondisconnect();break;case Y.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:Y.ACK,id:e,data:i}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Y.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n0&&t.jitter<=1?t.jitter:0,this.attempts=0}Qs.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0};Qs.prototype.reset=function(){this.attempts=0};Qs.prototype.setMin=function(t){this.ms=t};Qs.prototype.setMax=function(t){this.max=t};Qs.prototype.setJitter=function(t){this.jitter=t};class Wh extends je{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,of(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Qs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const i=r.parser||cD;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new J2(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=ur(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=ur(r,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ur(e,"ping",this.onping.bind(this)),ur(e,"data",this.ondata.bind(this)),ur(e,"error",this.onerror.bind(this)),ur(e,"close",this.onclose.bind(this)),ur(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){sf(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new T_(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;ne()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const po={};function cu(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=Z2(t,e.path||"/socket.io"),n=r.source,i=r.id,s=r.path,o=po[i]&&s in po[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let l;return a?l=new Wh(n,e):(po[i]||(po[i]=new Wh(n,e)),l=po[i]),r.query&&!e.query&&(e.query=r.queryKey),l.socket(r.path,e)}Object.assign(cu,{Manager:Wh,Socket:T_,io:cu,connect:cu});const dD="x-warmly-referer",Hh="x-warmly-user-identifier",P_="x-warmly-session-id",V_="x-warmly-fingerprint",N_="x-warmly-widget-version",hD="x-warmly-session-source",D_=()=>({[dD]:window.location.href}),ud={isSocketConnected:!1,remoteP2PSocketId:void 0,serverReady:!1};class pD{constructor(){S(this,"isSocketConnected",ud.isSocketConnected);S(this,"remoteP2PSocketId",ud.remoteP2PSocketId);S(this,"serverReady",ud.serverReady);S(this,"socket");S(this,"setIsSocketConnected",e=>this.isSocketConnected=e);S(this,"setRemoteP2PSocketId",e=>this.remoteP2PSocketId=e);S(this,"setServerReady",e=>this.serverReady=e);S(this,"setSocket",e=>{this.socket=e,this.isSocketConnected=!!e});S(this,"disconnectSocket",()=>{var e;(e=this.socket)==null||e.disconnect(),this.setSocket(void 0)});Ua(this,{isSocketConnected:L,setIsSocketConnected:D,remoteP2PSocketId:L,setRemoteP2PSocketId:D,serverReady:L,setServerReady:D,socket:!1},{autoBind:!0})}}const H=new pD,mD=t=>{const e=AE,r={extraHeaders:{...D_(),...t==null?void 0:t.extraHeaders},...t};return cu(e,r)};var nc={},gD=Object.defineProperty,yD=(t,e,r)=>e in t?gD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e,r)=>yD(t,typeof e!="symbol"?e+"":e,r),u0,vD=Object.defineProperty,wD=(t,e,r)=>e in t?vD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c0=(t,e,r)=>wD(t,typeof e!="symbol"?e+"":e,r),Ke=(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))(Ke||{});const f0={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},d0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bl={};function gg(t){if(bl[t])return bl[t];const e=globalThis[t],r=e.prototype,n=t in f0?f0[t]:void 0,i=!!(n&&n.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),s=t in d0?d0[t]:void 0,o=!!(s&&s.every(a=>{var l;return typeof r[a]=="function"&&((l=r[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o)return bl[t]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[t].prototype;return document.body.removeChild(a),u?bl[t]=u:r}catch{return r}}const cd={};function Zn(t,e,r){var n;const i=`${t}.${String(r)}`;if(cd[i])return cd[i].call(e);const s=gg(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(cd[i]=o,o.call(e)):e[r]}const fd={};function L_(t,e,r){const n=`${t}.${String(r)}`;if(fd[n])return fd[n].bind(e);const s=gg(t)[r];return typeof s!="function"?e[r]:(fd[n]=s,s.bind(e))}function SD(t){return Zn("Node",t,"childNodes")}function bD(t){return Zn("Node",t,"parentNode")}function _D(t){return Zn("Node",t,"parentElement")}function CD(t){return Zn("Node",t,"textContent")}function AD(t,e){return L_("Node",t,"contains")(e)}function ED(t){return L_("Node",t,"getRootNode")()}function OD(t){return!t||!("host"in t)?null:Zn("ShadowRoot",t,"host")}function xD(t){return t.styleSheets}function ID(t){return!t||!("shadowRoot"in t)?null:Zn("Element",t,"shadowRoot")}function kD(t,e){return Zn("Element",t,"querySelector")(e)}function RD(t,e){return Zn("Element",t,"querySelectorAll")(e)}function MD(){return gg("MutationObserver").constructor}const nt={childNodes:SD,parentNode:bD,parentElement:_D,textContent:CD,contains:AD,getRootNode:ED,host:OD,styleSheets:xD,shadowRoot:ID,querySelector:kD,querySelectorAll:RD,mutationObserver:MD};function $_(t){return t.nodeType===t.ELEMENT_NODE}function Bo(t){const e=t&&"host"in t&&"mode"in t&&nt.host(t)||null;return!!(e&&"shadowRoot"in e&&nt.shadowRoot(e)===t)}function Fo(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function TD(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 PD(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const 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 ic(t){try{const e=t.rules||t.cssRules;if(!e)return null;const r=Array.from(e,n=>B_(n,t.href)).join("");return TD(r)}catch{return null}}function B_(t,e){if(ND(t)){let r;try{r=ic(t.styleSheet)||PD(t)}catch{r=t.cssText}return t.styleSheet.href?sc(r,t.styleSheet.href):r}else{let r=t.cssText;return DD(t)&&t.selectorText.includes(":")&&(r=VD(r)),e?sc(r,e):r}}function VD(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function ND(t){return"styleSheet"in t}function DD(t){return"selectorText"in t}class F_{constructor(){c0(this,"idNodeMap",new Map),c0(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){const 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){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function LD(){return new F_}function yg({element:t,maskInputOptions:e,tagName:r,type:n,value:i,maskInputFn:s}){let o=i||"";const a=n&&Ei(n);return(e[r.toLowerCase()]||a&&e[a])&&(s?o=s(o,t):o="*".repeat(o.length)),o}function Ei(t){return t.toLowerCase()}const h0="__rrweb_original__";function $D(t){const e=t.getContext("2d");if(!e)return!0;const r=50;for(let n=0;nl!==0))return!1}return!0}function vg(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ei(e):null}function U_(t,e){let r;try{r=new URL(t,e??window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(i==null?void 0:i[1])??null}function BD(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const FD=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,UD=/^(?:[a-z+]+:)?\/\//i,zD=/^www\..*/i,jD=/^(data:)([^,]*),(.*)/i;function sc(t,e){return(t||"").replace(FD,(r,n,i,s,o,a)=>{const l=i||o||a,u=n||s||"";if(!l)return r;if(UD.test(l)||zD.test(l))return`url(${u}${l}${u})`;if(jD.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${BD(e)+l}${u})`;const c=e.split("/"),f=l.split("/");c.pop();for(const d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}let WD=1;const HD=new RegExp("[^a-z0-9-_:]"),ma=-2;function z_(){return WD++}function GD(t){if(t instanceof HTMLFormElement)return"form";const e=Ei(t.tagName);return HD.test(e)?"div":e}let Hi,p0;const KD=/^[^ \t\n\r\u000c]+/,YD=/^[, \t\n\r\u000c]+/;function XD(t,e){if(e.trim()==="")return e;let r=0;function n(s){let o;const a=s.exec(e.substring(r));return a?(o=a[0],r+=o.length,o):""}const i=[];for(;n(YD),!(r>=e.length);){let s=n(KD);if(s.slice(-1)===",")s=cs(t,s.substring(0,s.length-1)),i.push(s);else{let o="";s=cs(t,s);let a=!1;for(;;){const l=e.charAt(r);if(l===""){i.push((s+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,i.push((s+o).trim());break}else l==="("&&(a=!0);o+=l,r+=1}}}return i.join(", ")}const m0=new WeakMap;function cs(t,e){return!e||e.trim()===""?e:wg(t,e)}function qD(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function wg(t,e){let r=m0.get(t);if(r||(r=t.createElement("a"),m0.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function j_(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?cs(t,n):r==="srcset"?XD(t,n):r==="style"?sc(n,wg(t)):e==="object"&&r==="data"?cs(t,n):n)}function W_(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function QD(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function oc(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?oc(nt.parentNode(t),e,r):!1;for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}return r?oc(nt.parentNode(t),e,r):!1}function H_(t,e,r,n){let i;if($_(t)){if(i=t,!nt.childNodes(i).length)return!1}else{if(nt.parentElement(t)===null)return!1;i=nt.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(oc(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function JD(t,e,r){const n=t.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},r);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const o="about:blank";if(n.location.href!==o||t.src===o||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function ZD(t,e,r){let n=!1,i;try{i=t.sheet}catch{return}if(i)return;const s=setTimeout(()=>{n||(e(),n=!0)},r);t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}function eL(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1}=e,v=tL(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Ke.Document,childNodes:[],compatMode:t.compatMode}:{type:Ke.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Ke.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:v};case t.ELEMENT_NODE:return nL(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h,rootId:v});case t.TEXT_NODE:return rL(t,{doc:r,needsMask:o,maskTextFn:u,rootId:v});case t.CDATA_SECTION_NODE:return{type:Ke.CDATA,textContent:"",rootId:v};case t.COMMENT_NODE:return{type:Ke.Comment,textContent:nt.textContent(t)||"",rootId:v};default:return!1}}function tL(t,e){if(!e.hasNode(t))return;const r=e.getId(t);return r===1?void 0:r}function rL(t,e){var r;const{needsMask:n,maskTextFn:i,rootId:s}=e,o=nt.parentNode(t),a=o&&o.tagName;let l=nt.textContent(t);const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(l=ic(o.sheet))}catch(f){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${f}`,t)}l=sc(l,wg(e.doc))}return c&&(l="SCRIPT_PLACEHOLDER"),!u&&!c&&l&&n&&(l=i?i(l,nt.parentElement(t)):l.replace(/[\S]/g,"*")),{type:Ke.Text,textContent:l||"",isStyle:u,rootId:s}}function nL(t,e){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:p}=e,m=QD(t,n,i),h=GD(t);let v={};const w=t.attributes.length;for(let y=0;yC.href===t.href);let b=null;y&&(b=ic(y)),b&&(delete v.rel,delete v.href,v._cssText=b)}if(h==="style"&&t.sheet&&!(t.innerText||nt.textContent(t)||"").trim().length){const y=ic(t.sheet);y&&(v._cssText=y)}if(h==="input"||h==="textarea"||h==="select"){const y=t.value,b=t.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&y?v.value=yg({element:t,type:vg(t),tagName:h,value:y,maskInputOptions:o,maskInputFn:a}):b&&(v.checked=b)}if(h==="option"&&(t.selected&&!o.select?v.selected=!0:delete v.selected),h==="dialog"&&t.open&&(v.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&c){if(t.__context==="2d")$D(t)||(v.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const y=t.toDataURL(l.type,l.quality),b=r.createElement("canvas");b.width=t.width,b.height=t.height;const C=b.toDataURL(l.type,l.quality);y!==C&&(v.rr_dataURL=y)}}if(h==="img"&&u){Hi||(Hi=r.createElement("canvas"),p0=Hi.getContext("2d"));const y=t,b=y.currentSrc||y.getAttribute("src")||"",C=y.crossOrigin,A=()=>{y.removeEventListener("load",A);try{Hi.width=y.naturalWidth,Hi.height=y.naturalHeight,p0.drawImage(y,0,0),v.rr_dataURL=Hi.toDataURL(l.type,l.quality)}catch(O){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${b}! Error: ${O}`)}y.crossOrigin==="anonymous"&&(C?v.crossOrigin=C:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A)}if(h==="audio"||h==="video"){const y=v;y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime,y.rr_mediaPlaybackRate=t.playbackRate,y.rr_mediaMuted=t.muted,y.rr_mediaLoop=t.loop,y.rr_mediaVolume=t.volume}if(d||(t.scrollLeft&&(v.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(v.rr_scrollTop=t.scrollTop)),m){const{width:y,height:b}=t.getBoundingClientRect();v={class:v.class,rr_width:`${y}px`,rr_height:`${b}px`}}h==="iframe"&&!f(v.src)&&(t.contentDocument||(v.rr_src=v.src),delete v.src);let g;try{customElements.get(h)&&(g=!0)}catch{}return{type:Ke.Element,tagName:h,attributes:v,childNodes:[],isSVG:qD(t)||void 0,needBlock:m,rootId:p,isCustom:g}}function ce(t){return t==null?"":t.toLowerCase()}function iL(t,e){if(e.comment&&t.type===Ke.Comment)return!0;if(t.type===Ke.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&U_(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ce(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ce(t.attributes.name)==="application-name"||ce(t.attributes.rel)==="icon"||ce(t.attributes.rel)==="apple-touch-icon"||ce(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&ce(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ce(t.attributes.property).match(/^(og|twitter|fb):/)||ce(t.attributes.name).match(/^(og|twitter):/)||ce(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(ce(t.attributes.name)==="robots"||ce(t.attributes.name)==="googlebot"||ce(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(ce(t.attributes.name)==="author"||ce(t.attributes.name)==="generator"||ce(t.attributes.name)==="framework"||ce(t.attributes.name)==="publisher"||ce(t.attributes.name)==="progid"||ce(t.attributes.property).match(/^article:/)||ce(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(ce(t.attributes.name)==="google-site-verification"||ce(t.attributes.name)==="yandex-verification"||ce(t.attributes.name)==="csrf-token"||ce(t.attributes.name)==="p:domain_verify"||ce(t.attributes.name)==="verify-v1"||ce(t.attributes.name)==="verification"||ce(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function fs(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,ignoreSelector:o,ignoreClass:a,mutationBufferThrottleMs:l,maskTextClass:u,maskTextSelector:c,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:m,maskInputFn:h,slimDOMOptions:v,dataURLOptions:w={},inlineImages:g=!1,recordCanvas:y=!1,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:A=5e3,onStylesheetLoad:O,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:V=!1}=e;let{needsMask:te}=e,{preserveWhiteSpace:ne=!0}=e;te||(te=H_(t,u,c,te===void 0));const Se=eL(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:te,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,dataURLOptions:w,inlineImages:g,recordCanvas:y,keepIframeSrcFn:M,newlyAddedElement:V});if(!Se)return console.warn(t,"not serialized"),null;let be;n.hasNode(t)?be=n.getId(t):iL(Se,v)||!ne&&Se.type===Ke.Text&&!Se.isStyle&&!Se.textContent.replace(/^\s+|\s+$/gm,"").length?be=ma:be=z_();const j=Object.assign(Se,{id:be});if(n.add(t,j),be===ma)return null;b&&b(t);let Ue=!f;if(j.type===Ke.Element){Ue=Ue&&!j.needBlock,delete j.needBlock;const I=nt.shadowRoot(t);I&&Fo(I)&&(j.isShadowHost=!0)}if((j.type===Ke.Document||j.type===Ke.Element)&&Ue){v.headWhitespace&&j.type===Ke.Element&&j.tagName==="head"&&(ne=!1);const I={doc:r,mirror:n,blockClass:i,blockSelector:s,ignoreSelector:o,ignoreClass:a,mutationBufferThrottleMs:l,needsMask:te,maskTextClass:u,maskTextSelector:c,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:v,dataURLOptions:w,inlineImages:g,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:A,onStylesheetLoad:O,stylesheetLoadTimeout:E,keepIframeSrcFn:M};if(!(j.type===Ke.Element&&j.tagName==="textarea"&&j.attributes.value!==void 0))for(const F of Array.from(nt.childNodes(t))){const W=fs(F,I);W&&j.childNodes.push(W)}let N=null;if($_(t)&&(N=nt.shadowRoot(t)))for(const F of Array.from(nt.childNodes(N))){const W=fs(F,I);W&&(Fo(N)&&(W.isShadow=!0),j.childNodes.push(W))}}const re=nt.parentNode(t);return re&&Bo(re)&&Fo(re)&&(j.isShadow=!0),j.type===Ke.Element&&j.tagName==="iframe"&&JD(t,()=>{const I=t.contentDocument;if(I&&C){const N=fs(I,{doc:I,mirror:n,blockClass:i,blockSelector:s,needsMask:te,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:v,dataURLOptions:w,inlineImages:g,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:A,onStylesheetLoad:O,stylesheetLoadTimeout:E,keepIframeSrcFn:M});N&&C(t,N)}},A),j.type===Ke.Element&&j.tagName==="link"&&typeof j.attributes.rel=="string"&&(j.attributes.rel==="stylesheet"||j.attributes.rel==="preload"&&typeof j.attributes.href=="string"&&U_(j.attributes.href)==="css")&&ZD(t,()=>{if(O){const I=fs(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,ignoreClass:a,ignoreSelector:o,mutationBufferThrottleMs:l,needsMask:te,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:v,dataURLOptions:w,inlineImages:g,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:A,onStylesheetLoad:O,stylesheetLoadTimeout:E,keepIframeSrcFn:M});I&&O(t,I)}},E),j}function sL(t,e){const{mirror:r=new F_,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:C=()=>!1}=e||{};return fs(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:h,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:C,newlyAddedElement:!1})}function oL(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function aL(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:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Sg={exports:{}},pe=String,G_=function(){return{isColorSupported:!1,reset:pe,bold:pe,dim:pe,italic:pe,underline:pe,inverse:pe,hidden:pe,strikethrough:pe,black:pe,red:pe,green:pe,yellow:pe,blue:pe,magenta:pe,cyan:pe,white:pe,gray:pe,bgBlack:pe,bgRed:pe,bgGreen:pe,bgYellow:pe,bgBlue:pe,bgMagenta:pe,bgCyan:pe,bgWhite:pe}};Sg.exports=G_();Sg.exports.createColors=G_;var lL=Sg.exports;const uL={},cL=Object.freeze(Object.defineProperty({__proto__:null,default:uL},Symbol.toStringTag,{value:"Module"})),_r=aL(cL);let g0=lL,y0=_r,Gh=class K_ extends Error{constructor(e,r,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,K_)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=g0.isColorSupported),y0&&e&&(r=y0(r));let n=r.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,a,l;if(e){let{bold:u,gray:c,red:f}=g0.createColors(!0);a=d=>u(f(d)),l=d=>c(d)}else a=l=u=>u;return n.slice(i,s).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let p=l(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(d)+u+` `+p+a("^")}return" "+l(d)+u}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` `),this.name+": "+this.message+e}};var bg=Gh;Gh.default=Gh;var Ga={};Ga.isClean=Symbol("isClean");Ga.my=Symbol("my");const v0={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function fL(t){return t[0].toUpperCase()+t.slice(1)}let Kh=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let s=(e.raws.between||"")+(r?";":"");this.builder(n+i+s,e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(` `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon");for(let i=0;i{if(i=l.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=v0[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(` `);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],i=e.raws[r];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};var Y_=Kh;Kh.default=Kh;let dL=Y_;function Yh(t,e){new dL(e).stringify(t)}var af=Yh;Yh.default=Yh;let{isClean:_l,my:hL}=Ga,pL=bg,mL=Y_,gL=af;function Xh(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let i=t[n],s=typeof i;n==="parent"&&s==="object"?e&&(r[n]=e):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(o=>Xh(o,r)):(s==="object"&&i!==null&&(i=Xh(i)),r[n]=i)}return r}let qh=class{constructor(e={}){this.raws={},this[_l]=!1,this[hL]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=Xh(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new pL(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markDirty(){if(this[_l]){this[_l]=!1;let e=this;for(;e=e.parent;)e[_l]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let n=this.source.start;if(e.index)n=this.positionInside(e.index,r);else if(e.word){r=this.toString();let i=r.indexOf(e.word);i!==-1&&(n=this.positionInside(i,r))}return n}positionInside(e,r){let n=r||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;otypeof l=="object"&&l.toJSON?l.toJSON(null,r):l);else if(typeof a=="object"&&a.toJSON)n[o]=a.toJSON(null,r);else if(o==="source"){let l=r.get(a.input);l==null&&(l=s,r.set(a.input,s),s++),n[o]={end:a.end,inputId:l,start:a.start}}else n[o]=a}return i&&(n.inputs=[...r.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=gL){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(r,i)}get proxyOf(){return this}};var lf=qh;qh.default=qh;let yL=lf,Qh=class extends yL{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var uf=Qh;Qh.default=Qh;let vL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wL=(t=21)=>{let e="",r=t;for(;r--;)e+=vL[Math.random()*64|0];return e};var SL={nanoid:wL};let{SourceMapConsumer:w0,SourceMapGenerator:S0}=_r,{existsSync:bL,readFileSync:_L}=_r,{dirname:dd,join:CL}=_r;function AL(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Jh=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=dd(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new w0(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||n.test(e))return AL(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let n=e.lastIndexOf(r.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=dd(e),bL(e))return this.mapFile=e,_L(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof w0)return S0.fromSourceMap(r).toString();if(r instanceof S0)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=CL(dd(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var X_=Jh;Jh.default=Jh;let{SourceMapConsumer:EL,SourceMapGenerator:OL}=_r,{fileURLToPath:b0,pathToFileURL:Cl}=_r,{isAbsolute:Zh,resolve:ep}=_r,{nanoid:xL}=SL,hd=_r,_0=bg,IL=X_,pd=Symbol("fromOffsetCache"),kL=!!(EL&&OL),C0=!!(ep&&Zh),ac=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!C0||/^\w+:\/\//.test(r.from)||Zh(r.from)?this.file=r.from:this.file=ep(r.from)),C0&&kL){let n=new IL(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,r,n,i={}){let s,o,a;if(r&&typeof r=="object"){let u=r,c=n;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);r=f.line,n=f.col}else r=u.line,n=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);o=f.line,a=f.col}else o=c.line,a=c.column}else if(!n){let u=this.fromOffset(r);r=u.line,n=u.col}let l=this.origin(r,n,o,a);return l?s=new _0(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):s=new _0(e,o===void 0?r:{column:n,line:r},o===void 0?n:{column:a,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:a,endLine:o,line:r,source:this.css},this.file&&(Cl&&(s.input.url=Cl(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let r,n;if(this[pd])n=this[pd];else{let s=this.css.split(` `);n=new Array(s.length);let o=0;for(let a=0,l=s.length;a=r)i=n.length-1;else{let s=n.length-2,o;for(;i>1),e=n[o+1])i=o+1;else{i=o;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ep(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,i){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:r,line:e});if(!o.source)return!1;let a;typeof n=="number"&&(a=s.originalPositionFor({column:i,line:n}));let l;Zh(o.source)?l=Cl(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Cl(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(b0)u.file=b0(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var cf=ac;ac.default=ac;hd&&hd.registerInput&&hd.registerInput(ac);let{SourceMapConsumer:q_,SourceMapGenerator:fu}=_r,{dirname:du,relative:Q_,resolve:J_,sep:Z_}=_r,{pathToFileURL:A0}=_r,RL=cf,ML=!!(q_&&fu),TL=!!(du&&J_&&Q_&&Z_),PL=class{constructor(e,r,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` `;this.css.includes(`\r `)&&(r=`\r `),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||du(e.file),i;this.mapOpts.sourcesContent===!1?(i=new q_(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),TL&&ML&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=fu.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new fu({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});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 fu({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=a.match(/\n/g),s?(e+=s.length,o=a.lastIndexOf(` `),r=a.length-o):r+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?du(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=du(J_(n,this.mapOpts.annotation)));let i=Q_(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new RL(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(A0){let n=A0(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;Z_==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var eC=PL;let VL=lf,tp=class extends VL{constructor(e){super(e),this.type="comment"}};var ff=tp;tp.default=tp;let{isClean:tC,my:rC}=Ga,nC=uf,iC=ff,NL=lf,sC,_g,Cg,oC;function aC(t){return t.map(e=>(e.nodes&&(e.nodes=aC(e.nodes)),delete e.source,e))}function lC(t){if(t[tC]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)lC(e)}let cn=class uC extends NL{append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]e[r](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):r==="every"||r==="some"?n=>e[r]((i,...s)=>n(i.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new nC(e)]}else if(e.selector)e=[new _g(e)];else if(e.name)e=[new Cg(e)];else if(e.text)e=[new iC(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[rC]||uC.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[tC]&&lC(i),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let i;try{i=e(r,n)}catch(s){throw r.addToError(s)}return i!==!1&&r.walk&&(i=r.walk(e)),i})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};cn.registerParse=t=>{sC=t};cn.registerRule=t=>{_g=t};cn.registerAtRule=t=>{Cg=t};cn.registerRoot=t=>{oC=t};var Vi=cn;cn.default=cn;cn.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Cg.prototype):t.type==="rule"?Object.setPrototypeOf(t,_g.prototype):t.type==="decl"?Object.setPrototypeOf(t,nC.prototype):t.type==="comment"?Object.setPrototypeOf(t,iC.prototype):t.type==="root"&&Object.setPrototypeOf(t,oC.prototype),t[rC]=!0,t.nodes&&t.nodes.forEach(e=>{cn.rebuild(e)})};let DL=Vi,cC,fC,ga=class extends DL{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new cC(new fC,this,e).stringify()}};ga.registerLazyResult=t=>{cC=t};ga.registerProcessor=t=>{fC=t};var Ag=ga;ga.default=ga;let rp=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[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}};var dC=rp;rp.default=rp;let LL=dC,np=class{constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new LL(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Eg=np;np.default=np;const md=39,E0=34,Al=92,O0=47,El=10,mo=32,Ol=12,xl=9,Il=13,$L=91,BL=93,FL=40,UL=41,zL=123,jL=125,WL=59,HL=42,GL=58,KL=64,kl=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,YL=/.[\r\n"'(/\\]/,x0=/[\da-f]/i;var XL=function(e,r={}){let n=e.css.valueOf(),i=r.ignoreErrors,s,o,a,l,u,c,f,d,p,m,h=n.length,v=0,w=[],g=[];function y(){return v}function b(E){throw e.error("Unclosed "+E,v)}function C(){return g.length===0&&v>=h}function A(E){if(g.length)return g.pop();if(v>=h)return;let M=E?E.ignoreUnclosed:!1;switch(s=n.charCodeAt(v),s){case El:case mo:case xl:case Il:case Ol:{o=v;do o+=1,s=n.charCodeAt(o);while(s===mo||s===El||s===xl||s===Il||s===Ol);m=["space",n.slice(v,o)],v=o-1;break}case $L:case BL:case zL:case jL:case GL:case WL:case UL:{let V=String.fromCharCode(s);m=[V,V,v];break}case FL:{if(d=w.length?w.pop()[1]:"",p=n.charCodeAt(v+1),d==="url"&&p!==md&&p!==E0&&p!==mo&&p!==El&&p!==xl&&p!==Ol&&p!==Il){o=v;do{if(c=!1,o=n.indexOf(")",o+1),o===-1)if(i||M){o=v;break}else b("bracket");for(f=o;n.charCodeAt(f-1)===Al;)f-=1,c=!c}while(c);m=["brackets",n.slice(v,o+1),v,o],v=o}else o=n.indexOf(")",v+1),l=n.slice(v,o+1),o===-1||YL.test(l)?m=["(","(",v]:(m=["brackets",l,v,o],v=o);break}case md:case E0:{a=s===md?"'":'"',o=v;do{if(c=!1,o=n.indexOf(a,o+1),o===-1)if(i||M){o=v+1;break}else b("string");for(f=o;n.charCodeAt(f-1)===Al;)f-=1,c=!c}while(c);m=["string",n.slice(v,o+1),v,o],v=o;break}case KL:{kl.lastIndex=v+1,kl.test(n),kl.lastIndex===0?o=n.length-1:o=kl.lastIndex-2,m=["at-word",n.slice(v,o+1),v,o],v=o;break}case Al:{for(o=v,u=!0;n.charCodeAt(o+1)===Al;)o+=1,u=!u;if(s=n.charCodeAt(o+1),u&&s!==O0&&s!==mo&&s!==El&&s!==xl&&s!==Il&&s!==Ol&&(o+=1,x0.test(n.charAt(o)))){for(;x0.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===mo&&(o+=1)}m=["word",n.slice(v,o+1),v,o],v=o;break}default:{s===O0&&n.charCodeAt(v+1)===HL?(o=n.indexOf("*/",v+2)+1,o===0&&(i||M?o=n.length:b("comment")),m=["comment",n.slice(v,o+1),v,o],v=o):(Rl.lastIndex=v+1,Rl.test(n),Rl.lastIndex===0?o=n.length-1:o=Rl.lastIndex-2,m=["word",n.slice(v,o+1),v,o],w.push(m),v=o);break}}return v++,m}function O(E){g.push(E)}return{back:O,endOfFile:C,nextToken:A,position:y}};let hC=Vi,lc=class extends hC{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Og=lc;lc.default=lc;hC.registerAtRule(lc);let pC=Vi,mC,gC,Ps=class extends pC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let i=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of i)s.raws.before=r.raws.before}return i}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new mC(new gC,this,e).stringify()}};Ps.registerLazyResult=t=>{mC=t};Ps.registerProcessor=t=>{gC=t};var Ka=Ps;Ps.default=Ps;pC.registerRoot(Ps);let ya={comma(t){return ya.split(t,[","],!0)},space(t){let e=[" ",` `," "];return ya.split(t,e)},split(t,e,r){let n=[],i="",s=!1,o=0,a=!1,l="",u=!1;for(let c of t)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=c;return(r||i!=="")&&n.push(i.trim()),n}};var yC=ya;ya.default=ya;let vC=Vi,qL=yC,uc=class extends vC{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return qL.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var xg=uc;uc.default=uc;vC.registerRule(uc);let QL=uf,JL=XL,ZL=ff,e3=Og,t3=Ka,I0=xg;const k0={empty:!0,space:!0};function r3(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}let n3=class{constructor(e){this.input=e,this.root=new t3,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new e3;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,i,s,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?u.push(n==="("?")":"]"):n==="{"&&u.length>0?u.push("}"):n===u[u.length-1]&&u.pop(),u.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){a=!0;break}else if(n==="}"){if(l.length>0){for(s=l.length-1,i=l[s];i&&i[0]==="space";)i=l[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(r.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(r,"params",l),o&&(e=l[l.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),a&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,i;for(let s=r-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let r=0,n,i,s;for(let[o,a]of e.entries()){if(n=a,i=n[0],i==="("&&(r+=1),i===")"&&(r-=1),r===0&&i===":")if(!s)this.doubleColon(n);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n}return!1}comment(e){let r=new ZL;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=JL(this.input)}decl(e,r){let n=new QL;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||r3(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(s=e[u],s[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(n.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let p=c[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=f,e=c)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(n.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new I0;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,i=!1,s=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(n=u[0],l.push(u),n==="("||n==="[")s||(s=u),o.push(n==="("?")":"]");else if(a&&i&&n==="{")s||(s=u),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(l,a);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),r=!0;break}else n===":"&&(i=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),o.length>0&&this.unclosedBracket(s),r&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,i){let s,o,a=n.length,l="",u=!0,c,f;for(let d=0;dp+m[1],"");e.raws[r]={raw:d,value:l}}e[r]=l}rule(e){e.pop();let r=new I0;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let i=r;iip(e)),t}let sp={},Ns=class SC{constructor(e,r,n){this.stringified=!1,this.processed=!1;let i;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))i=ip(r);else if(r instanceof SC||r instanceof R0)i=ip(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let s=h3;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(r,n)}catch(o){this.processed=!0,this.error=o}i&&!i[l3]&&f3.rebuild(i)}this.result=new R0(e,i,n),this.helpers={...sp,postcss:sp,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!g3[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!y3[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?e(r,n,r[n][i]):e(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let n=this.visitTick(r);if(go(n))try{await n}catch(i){let s=r[r.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return go(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=c3;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let i=new u3(r,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(go(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xr];)e[xr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(r,this.helpers)}catch(o){throw this.handleError(o,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(go(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&r.visitorIndex{i[xr]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ns.registerPostcss=t=>{sp=t};var bC=Ns;Ns.default=Ns;p3.registerLazyResult(Ns);d3.registerLazyResult(Ns);let v3=eC,w3=af,S3=Ig;const b3=Eg;let op=class{constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let i,s=w3;this.result=new b3(this._processor,i,this._opts),this.result.css=r;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new v3(s,i,this._opts,r);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=S3;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var _3=op;op.default=op;let C3=_3,A3=bC,E3=Ag,O3=Ka,va=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new C3(this,e,r):new A3(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var x3=va;va.default=va;O3.registerProcessor(va);E3.registerProcessor(va);let I3=uf,k3=X_,R3=ff,M3=Og,T3=cf,P3=Ka,V3=xg;function wa(t,e){if(Array.isArray(t))return t.map(i=>wa(i));let{inputs:r,...n}=t;if(r){e=[];for(let i of r){let s={...i,__proto__:T3.prototype};s.map&&(s.map={...s.map,__proto__:k3.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=t.nodes.map(i=>wa(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new P3(n);if(n.type==="decl")return new I3(n);if(n.type==="rule")return new V3(n);if(n.type==="comment")return new R3(n);if(n.type==="atrule")return new M3(n);throw new Error("Unknown node type: "+t.type)}var N3=wa;wa.default=wa;let D3=bg,_C=uf,L3=bC,$3=Vi,kg=x3,B3=af,F3=N3,CC=Ag,U3=dC,AC=ff,EC=Og,z3=Eg,j3=cf,W3=Ig,H3=yC,OC=xg,xC=Ka,G3=lf;function se(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new kg(t)}se.plugin=function(e,r){let n=!1;function i(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),nc.LANG&&nc.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: https://www.w3ctech.com/topic/2226`));let a=r(...o);return a.postcssPlugin=e,a.postcssVersion=new kg().version,a}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,a,l){return se([i(l)]).process(o,a)},i};se.stringify=B3;se.parse=W3;se.fromJSON=F3;se.list=H3;se.comment=t=>new AC(t);se.atRule=t=>new EC(t);se.decl=t=>new _C(t);se.rule=t=>new OC(t);se.root=t=>new xC(t);se.document=t=>new CC(t);se.CssSyntaxError=D3;se.Declaration=_C;se.Container=$3;se.Processor=kg;se.Document=CC;se.Comment=AC;se.Warning=U3;se.AtRule=EC;se.Result=z3;se.Input=j3;se.Rule=OC;se.Root=xC;se.Node=G3;L3.registerPostcss(se);var K3=se;se.default=se;const Ae=oL(K3);Ae.stringify;Ae.fromJSON;Ae.plugin;Ae.parse;Ae.list;Ae.document;Ae.comment;Ae.atRule;Ae.rule;Ae.decl;Ae.root;Ae.CssSyntaxError;Ae.Declaration;Ae.Container;Ae.Processor;Ae.Document;Ae.Comment;Ae.Warning;Ae.AtRule;Ae.Result;Ae.Input;Ae.Rule;Ae.Root;Ae.Node;var Y3=Object.defineProperty,X3=(t,e,r)=>e in t?Y3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ut=(t,e,r)=>X3(t,typeof e!="symbol"?e+"":e,r);function q3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Q3(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:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Rg={exports:{}},me=String,IC=function(){return{isColorSupported:!1,reset:me,bold:me,dim:me,italic:me,underline:me,inverse:me,hidden:me,strikethrough:me,black:me,red:me,green:me,yellow:me,blue:me,magenta:me,cyan:me,white:me,gray:me,bgBlack:me,bgRed:me,bgGreen:me,bgYellow:me,bgBlue:me,bgMagenta:me,bgCyan:me,bgWhite:me}};Rg.exports=IC();Rg.exports.createColors=IC;var J3=Rg.exports;const Z3={},e$=Object.freeze(Object.defineProperty({__proto__:null,default:Z3},Symbol.toStringTag,{value:"Module"})),Cr=Q3(e$);let T0=J3,P0=Cr,ap=class kC extends Error{constructor(e,r,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,kC)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=T0.isColorSupported),P0&&e&&(r=P0(r));let n=r.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,a,l;if(e){let{bold:u,gray:c,red:f}=T0.createColors(!0);a=d=>u(f(d)),l=d=>c(d)}else a=l=u=>u;return n.slice(i,s).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let p=l(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(d)+u+` `+p+a("^")}return" "+l(d)+u}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` `),this.name+": "+this.message+e}};var Mg=ap;ap.default=ap;var Ya={};Ya.isClean=Symbol("isClean");Ya.my=Symbol("my");const V0={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t$(t){return t[0].toUpperCase()+t.slice(1)}let lp=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let s=(e.raws.between||"")+(r?";":"");this.builder(n+i+s,e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(` `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon");for(let i=0;i{if(i=l.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=V0[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(` `);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],i=e.raws[r];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};var RC=lp;lp.default=lp;let r$=RC;function up(t,e){new r$(e).stringify(t)}var df=up;up.default=up;let{isClean:Ml,my:n$}=Ya,i$=Mg,s$=RC,o$=df;function cp(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let i=t[n],s=typeof i;n==="parent"&&s==="object"?e&&(r[n]=e):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(o=>cp(o,r)):(s==="object"&&i!==null&&(i=cp(i)),r[n]=i)}return r}let fp=class{constructor(e={}){this.raws={},this[Ml]=!1,this[n$]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=cp(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new i$(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ml]){this[Ml]=!1;let e=this;for(;e=e.parent;)e[Ml]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let n=this.source.start;if(e.index)n=this.positionInside(e.index,r);else if(e.word){r=this.toString();let i=r.indexOf(e.word);i!==-1&&(n=this.positionInside(i,r))}return n}positionInside(e,r){let n=r||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;otypeof l=="object"&&l.toJSON?l.toJSON(null,r):l);else if(typeof a=="object"&&a.toJSON)n[o]=a.toJSON(null,r);else if(o==="source"){let l=r.get(a.input);l==null&&(l=s,r.set(a.input,s),s++),n[o]={end:a.end,inputId:l,start:a.start}}else n[o]=a}return i&&(n.inputs=[...r.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=o$){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(r,i)}get proxyOf(){return this}};var hf=fp;fp.default=fp;let a$=hf,dp=class extends a${constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var pf=dp;dp.default=dp;let l$="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",u$=(t=21)=>{let e="",r=t;for(;r--;)e+=l$[Math.random()*64|0];return e};var c$={nanoid:u$};let{SourceMapConsumer:N0,SourceMapGenerator:D0}=Cr,{existsSync:f$,readFileSync:d$}=Cr,{dirname:gd,join:h$}=Cr;function p$(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let hp=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=gd(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new N0(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||n.test(e))return p$(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let n=e.lastIndexOf(r.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=gd(e),f$(e))return this.mapFile=e,d$(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof N0)return D0.fromSourceMap(r).toString();if(r instanceof D0)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=h$(gd(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var MC=hp;hp.default=hp;let{SourceMapConsumer:m$,SourceMapGenerator:g$}=Cr,{fileURLToPath:L0,pathToFileURL:Tl}=Cr,{isAbsolute:pp,resolve:mp}=Cr,{nanoid:y$}=c$,yd=Cr,$0=Mg,v$=MC,vd=Symbol("fromOffsetCache"),w$=!!(m$&&g$),B0=!!(mp&&pp),fc=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!B0||/^\w+:\/\//.test(r.from)||pp(r.from)?this.file=r.from:this.file=mp(r.from)),B0&&w$){let n=new v$(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,r,n,i={}){let s,o,a;if(r&&typeof r=="object"){let u=r,c=n;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);r=f.line,n=f.col}else r=u.line,n=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);o=f.line,a=f.col}else o=c.line,a=c.column}else if(!n){let u=this.fromOffset(r);r=u.line,n=u.col}let l=this.origin(r,n,o,a);return l?s=new $0(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):s=new $0(e,o===void 0?r:{column:n,line:r},o===void 0?n:{column:a,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:a,endLine:o,line:r,source:this.css},this.file&&(Tl&&(s.input.url=Tl(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let r,n;if(this[vd])n=this[vd];else{let s=this.css.split(` `);n=new Array(s.length);let o=0;for(let a=0,l=s.length;a=r)i=n.length-1;else{let s=n.length-2,o;for(;i>1),e=n[o+1])i=o+1;else{i=o;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:mp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,i){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:r,line:e});if(!o.source)return!1;let a;typeof n=="number"&&(a=s.originalPositionFor({column:i,line:n}));let l;pp(o.source)?l=Tl(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Tl(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(L0)u.file=L0(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var mf=fc;fc.default=fc;yd&&yd.registerInput&&yd.registerInput(fc);let{SourceMapConsumer:TC,SourceMapGenerator:hu}=Cr,{dirname:pu,relative:PC,resolve:VC,sep:NC}=Cr,{pathToFileURL:F0}=Cr,S$=mf,b$=!!(TC&&hu),_$=!!(pu&&VC&&PC&&NC),C$=class{constructor(e,r,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` `;this.css.includes(`\r `)&&(r=`\r `),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||pu(e.file),i;this.mapOpts.sourcesContent===!1?(i=new TC(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),_$&&b$&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=hu.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new hu({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});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 hu({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=a.match(/\n/g),s?(e+=s.length,o=a.lastIndexOf(` `),r=a.length-o):r+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?pu(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=pu(VC(n,this.mapOpts.annotation)));let i=PC(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new S$(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(F0){let n=F0(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;NC==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var DC=C$;let A$=hf,gp=class extends A${constructor(e){super(e),this.type="comment"}};var gf=gp;gp.default=gp;let{isClean:LC,my:$C}=Ya,BC=pf,FC=gf,E$=hf,UC,Tg,Pg,zC;function jC(t){return t.map(e=>(e.nodes&&(e.nodes=jC(e.nodes)),delete e.source,e))}function WC(t){if(t[LC]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)WC(e)}let fn=class HC extends E${append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]e[r](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):r==="every"||r==="some"?n=>e[r]((i,...s)=>n(i.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new BC(e)]}else if(e.selector)e=[new Tg(e)];else if(e.name)e=[new Pg(e)];else if(e.text)e=[new FC(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[$C]||HC.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[LC]&&WC(i),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let i;try{i=e(r,n)}catch(s){throw r.addToError(s)}return i!==!1&&r.walk&&(i=r.walk(e)),i})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};fn.registerParse=t=>{UC=t};fn.registerRule=t=>{Tg=t};fn.registerAtRule=t=>{Pg=t};fn.registerRoot=t=>{zC=t};var Ni=fn;fn.default=fn;fn.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Pg.prototype):t.type==="rule"?Object.setPrototypeOf(t,Tg.prototype):t.type==="decl"?Object.setPrototypeOf(t,BC.prototype):t.type==="comment"?Object.setPrototypeOf(t,FC.prototype):t.type==="root"&&Object.setPrototypeOf(t,zC.prototype),t[$C]=!0,t.nodes&&t.nodes.forEach(e=>{fn.rebuild(e)})};let O$=Ni,GC,KC,Sa=class extends O${constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new GC(new KC,this,e).stringify()}};Sa.registerLazyResult=t=>{GC=t};Sa.registerProcessor=t=>{KC=t};var Vg=Sa;Sa.default=Sa;let yp=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[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}};var YC=yp;yp.default=yp;let x$=YC,vp=class{constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new x$(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ng=vp;vp.default=vp;const wd=39,U0=34,Pl=92,z0=47,Vl=10,yo=32,Nl=12,Dl=9,Ll=13,I$=91,k$=93,R$=40,M$=41,T$=123,P$=125,V$=59,N$=42,D$=58,L$=64,$l=/[\t\n\f\r "#'()/;[\\\]{}]/g,Bl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,$$=/.[\r\n"'(/\\]/,j0=/[\da-f]/i;var B$=function(e,r={}){let n=e.css.valueOf(),i=r.ignoreErrors,s,o,a,l,u,c,f,d,p,m,h=n.length,v=0,w=[],g=[];function y(){return v}function b(E){throw e.error("Unclosed "+E,v)}function C(){return g.length===0&&v>=h}function A(E){if(g.length)return g.pop();if(v>=h)return;let M=E?E.ignoreUnclosed:!1;switch(s=n.charCodeAt(v),s){case Vl:case yo:case Dl:case Ll:case Nl:{o=v;do o+=1,s=n.charCodeAt(o);while(s===yo||s===Vl||s===Dl||s===Ll||s===Nl);m=["space",n.slice(v,o)],v=o-1;break}case I$:case k$:case T$:case P$:case D$:case V$:case M$:{let V=String.fromCharCode(s);m=[V,V,v];break}case R$:{if(d=w.length?w.pop()[1]:"",p=n.charCodeAt(v+1),d==="url"&&p!==wd&&p!==U0&&p!==yo&&p!==Vl&&p!==Dl&&p!==Nl&&p!==Ll){o=v;do{if(c=!1,o=n.indexOf(")",o+1),o===-1)if(i||M){o=v;break}else b("bracket");for(f=o;n.charCodeAt(f-1)===Pl;)f-=1,c=!c}while(c);m=["brackets",n.slice(v,o+1),v,o],v=o}else o=n.indexOf(")",v+1),l=n.slice(v,o+1),o===-1||$$.test(l)?m=["(","(",v]:(m=["brackets",l,v,o],v=o);break}case wd:case U0:{a=s===wd?"'":'"',o=v;do{if(c=!1,o=n.indexOf(a,o+1),o===-1)if(i||M){o=v+1;break}else b("string");for(f=o;n.charCodeAt(f-1)===Pl;)f-=1,c=!c}while(c);m=["string",n.slice(v,o+1),v,o],v=o;break}case L$:{$l.lastIndex=v+1,$l.test(n),$l.lastIndex===0?o=n.length-1:o=$l.lastIndex-2,m=["at-word",n.slice(v,o+1),v,o],v=o;break}case Pl:{for(o=v,u=!0;n.charCodeAt(o+1)===Pl;)o+=1,u=!u;if(s=n.charCodeAt(o+1),u&&s!==z0&&s!==yo&&s!==Vl&&s!==Dl&&s!==Ll&&s!==Nl&&(o+=1,j0.test(n.charAt(o)))){for(;j0.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===yo&&(o+=1)}m=["word",n.slice(v,o+1),v,o],v=o;break}default:{s===z0&&n.charCodeAt(v+1)===N$?(o=n.indexOf("*/",v+2)+1,o===0&&(i||M?o=n.length:b("comment")),m=["comment",n.slice(v,o+1),v,o],v=o):(Bl.lastIndex=v+1,Bl.test(n),Bl.lastIndex===0?o=n.length-1:o=Bl.lastIndex-2,m=["word",n.slice(v,o+1),v,o],w.push(m),v=o);break}}return v++,m}function O(E){g.push(E)}return{back:O,endOfFile:C,nextToken:A,position:y}};let XC=Ni,dc=class extends XC{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Dg=dc;dc.default=dc;XC.registerAtRule(dc);let qC=Ni,QC,JC,Ds=class extends qC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let i=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of i)s.raws.before=r.raws.before}return i}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new QC(new JC,this,e).stringify()}};Ds.registerLazyResult=t=>{QC=t};Ds.registerProcessor=t=>{JC=t};var Xa=Ds;Ds.default=Ds;qC.registerRoot(Ds);let ba={comma(t){return ba.split(t,[","],!0)},space(t){let e=[" ",` `," "];return ba.split(t,e)},split(t,e,r){let n=[],i="",s=!1,o=0,a=!1,l="",u=!1;for(let c of t)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=c;return(r||i!=="")&&n.push(i.trim()),n}};var ZC=ba;ba.default=ba;let eA=Ni,F$=ZC,hc=class extends eA{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return F$.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Lg=hc;hc.default=hc;eA.registerRule(hc);let U$=pf,z$=B$,j$=gf,W$=Dg,H$=Xa,W0=Lg;const H0={empty:!0,space:!0};function G$(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}let K$=class{constructor(e){this.input=e,this.root=new H$,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new W$;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,i,s,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?u.push(n==="("?")":"]"):n==="{"&&u.length>0?u.push("}"):n===u[u.length-1]&&u.pop(),u.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){a=!0;break}else if(n==="}"){if(l.length>0){for(s=l.length-1,i=l[s];i&&i[0]==="space";)i=l[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(r.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(r,"params",l),o&&(e=l[l.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),a&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,i;for(let s=r-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let r=0,n,i,s;for(let[o,a]of e.entries()){if(n=a,i=n[0],i==="("&&(r+=1),i===")"&&(r-=1),r===0&&i===":")if(!s)this.doubleColon(n);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n}return!1}comment(e){let r=new j$;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=z$(this.input)}decl(e,r){let n=new U$;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||G$(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(s=e[u],s[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(n.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let p=c[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=f,e=c)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(n.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new W0;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,i=!1,s=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(n=u[0],l.push(u),n==="("||n==="[")s||(s=u),o.push(n==="("?")":"]");else if(a&&i&&n==="{")s||(s=u),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(l,a);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),r=!0;break}else n===":"&&(i=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),o.length>0&&this.unclosedBracket(s),r&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,i){let s,o,a=n.length,l="",u=!0,c,f;for(let d=0;dp+m[1],"");e.raws[r]={raw:d,value:l}}e[r]=l}rule(e){e.pop();let r=new W0;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let i=r;iwp(e)),t}let Sp={},$s=class rA{constructor(e,r,n){this.stringified=!1,this.processed=!1;let i;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))i=wp(r);else if(r instanceof rA||r instanceof G0)i=wp(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let s=n5;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(r,n)}catch(o){this.processed=!0,this.error=o}i&&!i[J$]&&t5.rebuild(i)}this.result=new G0(e,i,n),this.helpers={...Sp,postcss:Sp,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!o5[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a5[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?e(r,n,r[n][i]):e(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let n=this.visitTick(r);if(vo(n))try{await n}catch(i){let s=r[r.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return vo(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=e5;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let i=new Z$(r,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(vo(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ir];)e[Ir]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(r,this.helpers)}catch(o){throw this.handleError(o,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(vo(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&r.visitorIndex{i[Ir]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};$s.registerPostcss=t=>{Sp=t};var nA=$s;$s.default=$s;i5.registerLazyResult($s);r5.registerLazyResult($s);let l5=DC,u5=df,c5=$g;const f5=Ng;let bp=class{constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let i,s=u5;this.result=new f5(this._processor,i,this._opts),this.result.css=r;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new l5(s,i,this._opts,r);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=c5;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var d5=bp;bp.default=bp;let h5=d5,p5=nA,m5=Vg,g5=Xa,_a=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new h5(this,e,r):new p5(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var y5=_a;_a.default=_a;g5.registerProcessor(_a);m5.registerProcessor(_a);let v5=pf,w5=MC,S5=gf,b5=Dg,_5=mf,C5=Xa,A5=Lg;function Ca(t,e){if(Array.isArray(t))return t.map(i=>Ca(i));let{inputs:r,...n}=t;if(r){e=[];for(let i of r){let s={...i,__proto__:_5.prototype};s.map&&(s.map={...s.map,__proto__:w5.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=t.nodes.map(i=>Ca(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new C5(n);if(n.type==="decl")return new v5(n);if(n.type==="rule")return new A5(n);if(n.type==="comment")return new S5(n);if(n.type==="atrule")return new b5(n);throw new Error("Unknown node type: "+t.type)}var E5=Ca;Ca.default=Ca;let O5=Mg,iA=pf,x5=nA,I5=Ni,Bg=y5,k5=df,R5=E5,sA=Vg,M5=YC,oA=gf,aA=Dg,T5=Ng,P5=mf,V5=$g,N5=ZC,lA=Lg,uA=Xa,D5=hf;function oe(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Bg(t)}oe.plugin=function(e,r){let n=!1;function i(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),nc.LANG&&nc.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: https://www.w3ctech.com/topic/2226`));let a=r(...o);return a.postcssPlugin=e,a.postcssVersion=new Bg().version,a}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,a,l){return oe([i(l)]).process(o,a)},i};oe.stringify=k5;oe.parse=V5;oe.fromJSON=R5;oe.list=N5;oe.comment=t=>new oA(t);oe.atRule=t=>new aA(t);oe.decl=t=>new iA(t);oe.rule=t=>new lA(t);oe.root=t=>new uA(t);oe.document=t=>new sA(t);oe.CssSyntaxError=O5;oe.Declaration=iA;oe.Container=I5;oe.Processor=Bg;oe.Document=sA;oe.Comment=oA;oe.Warning=M5;oe.AtRule=aA;oe.Result=T5;oe.Input=P5;oe.Rule=lA;oe.Root=uA;oe.Node=D5;x5.registerPostcss(oe);var L5=oe;oe.default=oe;const Ee=q3(L5);Ee.stringify;Ee.fromJSON;Ee.plugin;Ee.parse;Ee.list;Ee.document;Ee.comment;Ee.atRule;Ee.rule;Ee.decl;Ee.root;Ee.CssSyntaxError;Ee.Declaration;Ee.Container;Ee.Processor;Ee.Document;Ee.Comment;Ee.Warning;Ee.AtRule;Ee.Result;Ee.Input;Ee.Rule;Ee.Root;Ee.Node;class Fg{constructor(...e){Ut(this,"parentElement",null),Ut(this,"parentNode",null),Ut(this,"ownerDocument"),Ut(this,"firstChild",null),Ut(this,"lastChild",null),Ut(this,"previousSibling",null),Ut(this,"nextSibling",null),Ut(this,"ELEMENT_NODE",1),Ut(this,"TEXT_NODE",3),Ut(this,"nodeType"),Ut(this,"nodeName"),Ut(this,"RRNodeType")}get childNodes(){const e=[];let r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof Fg){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,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"}}const Y0={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},X0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fl={};function Ug(t){if(Fl[t])return Fl[t];const e=globalThis[t],r=e.prototype,n=t in Y0?Y0[t]:void 0,i=!!(n&&n.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),s=t in X0?X0[t]:void 0,o=!!(s&&s.every(a=>{var l;return typeof r[a]=="function"&&((l=r[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o)return Fl[t]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[t].prototype;return document.body.removeChild(a),u?Fl[t]=u:r}catch{return r}}const Sd={};function ei(t,e,r){var n;const i=`${t}.${String(r)}`;if(Sd[i])return Sd[i].call(e);const s=Ug(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Sd[i]=o,o.call(e)):e[r]}const bd={};function cA(t,e,r){const n=`${t}.${String(r)}`;if(bd[n])return bd[n].bind(e);const s=Ug(t)[r];return typeof s!="function"?e[r]:(bd[n]=s,s.bind(e))}function $5(t){return ei("Node",t,"childNodes")}function B5(t){return ei("Node",t,"parentNode")}function F5(t){return ei("Node",t,"parentElement")}function U5(t){return ei("Node",t,"textContent")}function z5(t,e){return cA("Node",t,"contains")(e)}function j5(t){return cA("Node",t,"getRootNode")()}function W5(t){return!t||!("host"in t)?null:ei("ShadowRoot",t,"host")}function H5(t){return t.styleSheets}function G5(t){return!t||!("shadowRoot"in t)?null:ei("Element",t,"shadowRoot")}function K5(t,e){return ei("Element",t,"querySelector")(e)}function Y5(t,e){return ei("Element",t,"querySelectorAll")(e)}function fA(){return Ug("MutationObserver").constructor}const G={childNodes:$5,parentNode:B5,parentElement:F5,textContent:U5,contains:z5,getRootNode:j5,host:W5,styleSheets:H5,shadowRoot:G5,querySelector:K5,querySelectorAll:Y5,mutationObserver:fA};function pt(t,e,r=document){const n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}const Yi=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let q0={map:{},getId(){return console.error(Yi),-1},getNode(){return console.error(Yi),null},removeNodeFromMap(){console.error(Yi)},has(){return console.error(Yi),!1},reset(){console.error(Yi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(q0=new Proxy(q0,{get(t,e,r){return e==="map"&&console.error(Yi),Reflect.get(t,e,r)}}));function Bs(t,e,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const a=e-(o-i),l=this;a<=0||a>e?(n&&(clearTimeout(n),n=null),i=o,t.apply(l,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,t.apply(l,s)},a))}}function yf(t,e,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>yf(t,e,s||{},!0)}function Js(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}let mc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(mc=()=>new Date().getTime());function dA(t){var e,r,n,i;const s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((e=G.parentElement(s.body))==null?void 0:e.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=G.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function hA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mA(t){return t?t.nodeType===t.ELEMENT_NODE?t:G.parentElement(t):null}function mt(t,e,r,n){if(!t)return!1;const i=mA(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(oc(i,e,n))return!0;if(r&&(typeof i.matches=="function"&&i.matches(r)||n&&typeof i.closest=="function"&&i.closest(r)!==null))return!0}catch{}return!1}function X5(t,e){return e.getId(t)!==-1}function _d(t,e,r,n={}){const{blockSelector:i="",ignoreSelector:s=""}=n;return t.tagName==="TITLE"&&r.headTitleMutations||i&&typeof i.matches=="function"&&t.matches(i)||s&&typeof s.matches=="function"&&t.matches(s)?!0:e.getId(t)===ma}function gA(t,e){if(Bo(t))return!1;const r=e.getId(t);if(!e.has(r))return!0;const n=G.parentNode(t);return n&&n.nodeType===t.DOCUMENT_NODE?!1:n?gA(n,e):!0}function _p(t){return!!t.changedTouches}function q5(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 yA(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function vA(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Cp(t){return t?t instanceof Fg&&"shadowRoot"in t?!!t.shadowRoot:!!G.shadowRoot(t):!1}class Q5{constructor(){R(this,"id",1),R(this,"styleIDMap",new WeakMap),R(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 wA(t){var e;let r=null;return"getRootNode"in t&&((e=G.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&G.host(G.getRootNode(t))&&(r=G.host(G.getRootNode(t))),r}function J5(t){let e=t,r;for(;r=wA(e);)e=r;return e}function Z5(t){const e=t.ownerDocument;if(!e)return!1;const r=J5(t);return G.contains(e,r)}function SA(t){const e=t.ownerDocument;return e?G.contains(e,t)||Z5(t):!1}var q=(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))(q||{}),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||{}),St=(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))(St||{}),Wr=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Wr||{}),Fs=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Fs||{}),Xi=(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))(Xi||{});function Q0(t){return"__ln"in t}class eB{constructor(){R(this,"length",0),R(this,"head",null),R(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`${t}@${e}`;class tB{constructor(){R(this,"frozen",!1),R(this,"locked",!1),R(this,"texts",[]),R(this,"attributes",[]),R(this,"attributeMap",new WeakMap),R(this,"removes",[]),R(this,"mapRemoves",[]),R(this,"movedMap",{}),R(this,"addedSet",new Set),R(this,"movedSet",new Set),R(this,"droppedSet",new Set),R(this,"mutationCb"),R(this,"blockClass"),R(this,"blockSelector"),R(this,"ignoreClass"),R(this,"ignoreSelector"),R(this,"mutationBufferThrottleMs"),R(this,"maskTextClass"),R(this,"maskTextSelector"),R(this,"inlineStylesheet"),R(this,"maskInputOptions"),R(this,"maskTextFn"),R(this,"maskInputFn"),R(this,"keepIframeSrcFn"),R(this,"recordCanvas"),R(this,"inlineImages"),R(this,"slimDOMOptions"),R(this,"dataURLOptions"),R(this,"doc"),R(this,"mirror"),R(this,"iframeManager"),R(this,"stylesheetManager"),R(this,"shadowDomManager"),R(this,"canvasManager"),R(this,"processedNodeManager"),R(this,"ignoreCSSAttributes"),R(this,"unattachedDoc"),R(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),R(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],r=new Set,n=new eB,i=l=>{let u=l,c=ma;for(;c===ma;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},s=l=>{const u=G.parentNode(l);if(!u||!SA(l)||u.tagName==="TEXTAREA")return;const c=Bo(u)?this.mirror.getId(wA(l)):this.mirror.getId(u),f=i(l);if(c===-1||f===-1)return n.addNode(l);const d=fs(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,ignoreClass:this.ignoreClass,ignoreSelector:this.ignoreSelector,mutationBufferThrottleMs:this.mutationBufferThrottleMs,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{yA(p,this.mirror)&&this.iframeManager.addIframe(p),vA(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Cp(l)&&this.shadowDomManager.addShadowRoot(G.shadowRoot(l),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});d&&(e.push({parentId:c,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Z0(this.removes,l,this.mirror)&&!this.movedSet.has(G.parentNode(l))||s(l);for(const l of this.addedSet)!ew(this.droppedSet,l)&&!Z0(this.removes,l,this.mirror)||ew(this.movedSet,l)?s(l):this.droppedSet.add(l);let o=null;for(;n.length;){let l=null;if(o){const u=this.mirror.getId(G.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=n.tail;for(;u;){const c=u;if(u=u.previous,c){const f=this.mirror.getId(G.parentNode(c.value));if(i(c.value)===-1)continue;if(f!==-1){l=c;break}else{const p=c.value,m=G.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=G.host(m);if(this.mirror.getId(h)!==-1){l=c;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}o=l.previous,n.removeNode(l.value),s(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=G.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),f=JSON.stringify(l._unchangedStyles);c.length!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))}),R(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)),r.attributes.value=Array.from(G.childNodes(e),n=>G.textContent(n)||"").join("")}),R(this,"processMutation",e=>{if(!_d(e.target,this.mirror,this.slimDOMOptions,this))switch(e.type){case"characterData":{const r=G.textContent(e.target);!mt(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:H_(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,mA(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{const r=e.target;let n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){const o=vg(r);i=yg({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(mt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),n==="type"&&r.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!W_(r.tagName,n))if(s.attributes[n]=j_(this.doc,Ei(r.tagName),Ei(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const a of Array.from(r.style)){const l=r.style.getPropertyValue(a),u=r.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=l:s.styleDiff[a]=[l,u]:s._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))r.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1);try{if(this.ignoreCSSAttributes&&Array.from(this.ignoreCSSAttributes).forEach(a=>delete s.styleDiff[a]),!Object.keys(s.styleDiff).length){this.attributes=this.attributes.filter(a=>a.node!==e.target);return}}catch{}}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case"childList":{if(mt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=Bo(e.target)?this.mirror.getId(G.host(e.target)):this.mirror.getId(e.target);mt(e.target,this.blockClass,this.blockSelector,!1)||_d(r,this.mirror,this.slimDOMOptions,this)||!X5(r,this.mirror)||(this.addedSet.has(r)?(Ap(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||gA(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[J0(n,i)]?Ap(this.movedSet,r):this.removes.push({parentId:i,id:n,isShadow:Bo(e.target)&&Fo(e.target)?!0:void 0})),this.mapRemoves.push(r))});break}}}),R(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(_d(e,this.mirror,this.slimDOMOptions,this))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[J0(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);mt(e,this.blockClass,this.blockSelector,!1)||(G.childNodes(e).forEach(n=>this.genAdds(n)),Cp(e)&&G.childNodes(G.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","ignoreClass","ignoreSelector","ignoreCSSAttributes","mutationBufferThrottleMs","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=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ap(t,e){t.delete(e),G.childNodes(e).forEach(r=>Ap(t,r))}function Z0(t,e,r){return t.length===0?!1:rB(t,e,r)}function rB(t,e,r){let n=G.parentNode(e);for(;n;){const i=r.getId(n);if(t.some(s=>s.id===i))return!0;n=G.parentNode(n)}return!1}function ew(t,e){return t.size===0?!1:bA(t,e)}function bA(t,e){const r=G.parentNode(e);return r?t.has(r)?!0:bA(t,r):!1}let Uo;function nB(t){Uo=t}function iB(){Uo=void 0}const Q=t=>Uo?(...r)=>{try{return t(...r)}catch(n){if(Uo&&Uo(n)===!0)return;throw n}}:t,ui=[];function qa(t){try{if("composedPath"in t){const 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 _A(t,e){const r=new tB;ui.push(r),r.init(t);const n=typeof t.mutationBufferThrottleMs=="number"?t.mutationBufferThrottleMs:500,i=new(fA())(Bs(Q(r.processMutations.bind(r)),n));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function sB({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const l=Bs(Q(f=>{const d=Date.now()-a;t(o.map(p=>(p.timeOffset-=d,p)),f),o=[],a=null}),s),u=Q(Bs(Q(f=>{const d=qa(f),{clientX:p,clientY:m}=_p(f)?f.changedTouches[0]:f;a||(a=mc()),o.push({x:p,y:m,id:n.getId(d),timeOffset:mc()-a}),l(typeof DragEvent<"u"&&f instanceof DragEvent?z.Drag:f instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),c=[pt("mousemove",u,r),pt("touchmove",u,r),pt("drag",u,r)];return Q(()=>{c.forEach(f=>f())})}function oB({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,a=[];let l=null;const u=c=>f=>{const d=qa(f);if(mt(d,n,i,!0))return;let p=null,m=c;if("pointerType"in f){switch(f.pointerType){case"mouse":p=Wr.Mouse;break;case"touch":p=Wr.Touch;break;case"pen":p=Wr.Pen;break}p===Wr.Touch?St[c]===St.MouseDown?m="TouchStart":St[c]===St.MouseUp&&(m="TouchEnd"):Wr.Pen}else _p(f)&&(p=Wr.Touch);p!==null?(l=p,(m.startsWith("Touch")&&p===Wr.Touch||m.startsWith("Mouse")&&p===Wr.Mouse)&&(p=null)):St[c]===St.Click&&(p=l,l=null);const h=_p(f)?f.changedTouches[0]:f;if(!h)return;const v=r.getId(d),{clientX:w,clientY:g}=h;Q(t)({type:St[m],id:v,x:w,y:g,...p!==null&&{pointerType:p}})};return Object.keys(St).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let f=Ei(c);const d=u(c);if(window.PointerEvent)switch(St[c]){case St.MouseDown:case St.MouseUp:f=f.replace("mouse","pointer");break;case St.TouchStart:case St.TouchEnd:return}a.push(pt(f,d,e))}),Q(()=>{a.forEach(c=>c())})}function CA({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=Q(Bs(Q(a=>{const l=qa(a);if(!l||mt(l,n,i,!0))return;const u=r.getId(l);if(l===e&&e.defaultView){const c=dA(e.defaultView);t({id:u,x:c.left,y:c.top})}else t({id:u,x:l.scrollLeft,y:l.scrollTop})}),s.scroll||100));return pt("scroll",o,e)}function aB({viewportResizeCb:t},{win:e}){let r=-1,n=-1;const i=Q(Bs(Q(()=>{const s=hA(),o=pA();(r!==s||n!==o)&&(t({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return pt("resize",i,e)}const lB=["INPUT","TEXTAREA","SELECT"],tw=new WeakMap;function uB({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function f(g){let y=qa(g);const b=g.isTrusted,C=y&&y.tagName;if(y&&C==="OPTION"&&(y=G.parentElement(y)),!y||!C||lB.indexOf(C)<0||mt(y,n,i,!0)||y.classList.contains(s)||o&&y.matches(o))return;let A=y.value,O=!1;const E=vg(y)||"";E==="radio"||E==="checkbox"?O=y.checked:(a[C.toLowerCase()]||a[E])&&(A=yg({element:y,maskInputOptions:a,tagName:C,type:E,value:A,maskInputFn:l})),d(y,c?{text:A,isChecked:O,userTriggered:b}:{text:A,isChecked:O});const M=y.name;E==="radio"&&M&&O&&e.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(V=>{if(V!==y){const te=V.value;d(V,c?{text:te,isChecked:!O,userTriggered:!1}:{text:te,isChecked:!O})}})}function d(g,y){const b=tw.get(g);if(!b||b.text!==y.text||b.isChecked!==y.isChecked){tw.set(g,y);const C=r.getId(g);Q(t)({...y,id:C})}}const m=(u.input==="last"?["change"]:["input","change"]).map(g=>pt(g,Q(f),e)),h=e.defaultView;if(!h)return()=>{m.forEach(g=>g())};const v=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),w=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&m.push(...w.map(g=>yf(g[0],g[1],{set(){Q(f)({target:this,isTrusted:!1})}},!1,h))),Q(()=>{m.forEach(g=>g())})}function gc(t){const e=[];function r(n,i){if(Ul("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Ul("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Ul("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Ul("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(o)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(t,e)}function Cn(t,e,r){let n,i;return t?(t.ownerNode?n=e.getId(t.ownerNode):i=r.getId(t),{styleId:i,id:n}):{}}function cB({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Q((c,f,d)=>{const[p,m]=d,{id:h,styleId:v}=Cn(f,e,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&t({id:h,styleId:v,adds:[{rule:p,index:m}]}),c.apply(f,d)})}),n.CSSStyleSheet.prototype.addRule=function(c,f,d=this.cssRules.length){const p=`${c} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Q((c,f,d)=>{const[p]=d,{id:m,styleId:h}=Cn(f,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,removes:[{index:p}]}),c.apply(f,d)})}),n.CSSStyleSheet.prototype.removeRule=function(c){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Q((c,f,d)=>{const[p]=d,{id:m,styleId:h}=Cn(f,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,replace:p}),c.apply(f,d)})}));let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Q((c,f,d)=>{const[p]=d,{id:m,styleId:h}=Cn(f,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,replaceSync:p}),c.apply(f,d)})}));const l={};zl("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(zl("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),zl("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),zl("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:Q((d,p,m)=>{const[h,v]=m,{id:w,styleId:g}=Cn(p.parentStyleSheet,e,r.styleMirror);return(w&&w!==-1||g&&g!==-1)&&t({id:w,styleId:g,adds:[{rule:h,index:[...gc(p),v||0]}]}),d.apply(p,m)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:Q((d,p,m)=>{const[h]=m,{id:v,styleId:w}=Cn(p.parentStyleSheet,e,r.styleMirror);return(v&&v!==-1||w&&w!==-1)&&t({id:v,styleId:w,removes:[{index:[...gc(p),h]}]}),d.apply(p,m)})})}),Q(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=s,o&&(n.CSSStyleSheet.prototype.replace=o),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function AA({mirror:t,stylesheetManager:e},r){var n,i,s;let o=null;r.nodeName==="#document"?o=t.getId(r):o=t.getId(G.host(r));const a=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const f=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return f}}),Q(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function fB({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Q((a,l,u)=>{var c;const[f,d,p]=u;if(r.has(f))return s.apply(l,[f,d,p]);const{id:m,styleId:h}=Cn((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,set:{property:f,value:d,priority:p},index:gc(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Q((a,l,u)=>{var c;const[f]=u;if(r.has(f))return o.apply(l,[f]);const{id:d,styleId:p}=Cn((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,n.styleMirror);return(d&&d!==-1||p&&p!==-1)&&t({id:d,styleId:p,remove:{property:f},index:gc(l.parentRule)}),a.apply(l,u)})}),Q(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function dB({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=Q(l=>Bs(Q(u=>{const c=qa(u);if(!c||mt(c,e,r,!0))return;const{currentTime:f,volume:d,muted:p,playbackRate:m,loop:h}=c;t({type:l,id:n.getId(c),currentTime:f,volume:d,muted:p,playbackRate:m,loop:h})}),i.media||500)),a=[pt("play",o(Xi.Play),s),pt("pause",o(Xi.Pause),s),pt("seeked",o(Xi.Seeked),s),pt("volumechange",o(Xi.VolumeChange),s),pt("ratechange",o(Xi.RateChange),s)];return Q(()=>{a.forEach(l=>l())})}function hB({fontCb:t,doc:e}){const r=e.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(l,u,c){const f=new s(l,u,c);return i.set(f,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const o=Js(e.fonts,"add",function(a){return function(l){return setTimeout(Q(()=>{const u=i.get(l);u&&(t(u),i.delete(l))}),0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=s}),n.push(o),Q(()=>{n.forEach(a=>a())})}function pB(t){const{doc:e,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=t;let o=!0;const a=Q(()=>{const l=e.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let f=0;f{}:Js(r.customElements,"define",function(i){return function(s,o,a){try{e({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,a])}})}function gB(t,e){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,fontCb:d,selectionCb:p,customElementCb:m}=t;t.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),r(...h)},t.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),n(...h)},t.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),i(...h)},t.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),s(...h)},t.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),o(...h)},t.inputCb=(...h)=>{e.input&&e.input(...h),a(...h)},t.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),l(...h)},t.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),u(...h)},t.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),c(...h)},t.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),f(...h)},t.fontCb=(...h)=>{e.font&&e.font(...h),d(...h)},t.selectionCb=(...h)=>{e.selection&&e.selection(...h),p(...h)},t.customElementCb=(...h)=>{e.customElement&&e.customElement(...h),m(...h)}}function yB(t,e={}){const r=t.doc.defaultView;if(!r)return()=>{};gB(t,e);let n;t.recordDOM&&(n=_A(t,t.doc));const i=sB(t),s=oB(t),o=CA(t),a=aB(t,{win:r}),l=uB(t),u=dB(t);let c=()=>{},f=()=>{},d=()=>{},p=()=>{};t.recordDOM&&(c=cB(t,{win:r}),f=AA(t,t.doc),d=fB(t,{win:r}),t.collectFonts&&(p=hB(t)));const m=pB(t),h=mB(t),v=[];for(const w of t.plugins)v.push(w.observer(w.callback,r,w.options));return Q(()=>{ui.forEach(w=>w.reset()),n==null||n.disconnect(),i(),s(),o(),a(),l(),u(),c(),f(),d(),p(),m(),h(),v.forEach(w=>w())})}function Ul(t){return typeof window[t]<"u"}function zl(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class rw{constructor(e){R(this,"iframeIdToRemoteIdMap",new WeakMap),R(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,r,n,i){const s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=s.get(r);return a||(a=this.generateIdFn(),s.set(r,a),o.set(a,r)),a}getIds(e,r){const n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return r.map(s=>this.getId(e,s,n,i))}getRemoteId(e,r,n){const i=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(e,r){const n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let 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}}class vB{constructor(e){R(this,"iframes",new WeakMap),R(this,"crossOriginIframeMap",new WeakMap),R(this,"crossOriginIframeMirror",new rw(z_)),R(this,"crossOriginIframeStyleMirror"),R(this,"crossOriginIframeRootIdMap",new WeakMap),R(this,"mirror"),R(this,"mutationCb"),R(this,"wrappedEmit"),R(this,"loadListener"),R(this,"stylesheetManager"),R(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rw(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case q.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:q.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return r;case q.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case q.IncrementalSnapshot:switch(r.data.source){case z.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case z.Drag:case z.TouchMove:case z.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case z.ViewportResize:return!1;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(i=>{this.replaceIds(i,e,["start","end"])}),r;case z.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),r}}return!1}replace(e,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=e.getIds(n,r[s]):r[s]=e.getId(n,r[s]));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!==Ke.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class wB{constructor(e){R(this,"shadowDoms",new WeakSet),R(this,"mutationCb"),R(this,"scrollCb"),R(this,"bypassOptions"),R(this,"mirror"),R(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(!Fo(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=_A({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(CA({...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(G.host(e))),this.restoreHandlers.push(AA({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){const n=this;this.restoreHandlers.push(Js(e.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),a=G.shadowRoot(this);return a&&SA(this)&&n.addShadowRoot(a,r),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ds="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",SB=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var jl=0;jl>2],i+=ds[(e[r]&3)<<4|e[r+1]>>4],i+=ds[(e[r+1]&15)<<2|e[r+2]>>6],i+=ds[e[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const nw=new Map;function _B(t,e){let r=nw.get(t);return r||(r=new Map,nw.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}const EA=(t,e,r)=>{if(!t||!(xA(t,e)||typeof t=="object"))return;const n=t.constructor.name,i=_B(r,n);let s=i.indexOf(t);return s===-1&&(s=i.length,i.push(t)),s};function mu(t,e,r){if(t instanceof Array)return t.map(n=>mu(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){const n=t.constructor.name,i=bB(t);return{rr_type:n,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[mu(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const n=t.constructor.name,{src:i}=t;return{rr_type:n,src:i}}else if(t instanceof HTMLCanvasElement){const n="HTMLImageElement",i=t.toDataURL();return{rr_type:n,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[mu(t.data,e,r),t.width,t.height]};if(xA(t,e)||typeof t=="object"){const n=t.constructor.name,i=EA(t,e,r);return{rr_type:n,index:i}}}}return t}const OA=(t,e,r)=>t.map(n=>mu(n,e,r)),xA=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>t instanceof e[i]);function CB(t,e,r,n){const i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const a=Js(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return mt(this.canvas,r,n,!0)||setTimeout(()=>{const c=OA(u,e,this);t(this.canvas,{type:Fs["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch{const a=yf(e.CanvasRenderingContext2D.prototype,o,{set(l){t(this.canvas,{type:Fs["2D"],property:o,args:[l],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function AB(t){return t==="experimental-webgl"?"webgl":t}function iw(t,e,r,n){const i=[];try{const s=Js(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!mt(this,e,r,!0)){const u=AB(a);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function sw(t,e,r,n,i,s){const o=[],a=Object.getOwnPropertyNames(t);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof t[l]!="function")continue;const u=Js(t,l,function(c){return function(...f){const d=c.apply(this,f);if(EA(d,s,this),"tagName"in this.canvas&&!mt(this.canvas,n,i,!0)){const p=OA(f,s,this),m={type:e,property:l,args:p};r(this.canvas,m)}return d}});o.push(u)}catch{const u=yf(t,l,{set(c){r(this.canvas,{type:e,property:l,args:[c],setter:!0})}});o.push(u)}return o}function EB(t,e,r,n){const i=[];return i.push(...sw(e.WebGLRenderingContext.prototype,Fs.WebGL,t,r,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...sw(e.WebGL2RenderingContext.prototype,Fs.WebGL2,t,r,n,e)),()=>{i.forEach(s=>s())}}const IA="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",OB=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),ow=typeof window<"u"&&window.Blob&&new Blob([OB(IA)],{type:"text/javascript;charset=utf-8"});function xB(t){let e;try{if(e=ow&&(window.URL||window.webkitURL).createObjectURL(ow),!e)throw"";const r=new Worker(e,{name:t==null?void 0:t.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+IA,{name:t==null?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class IB{constructor(e){R(this,"pendingCanvasMutations",new Map),R(this,"rafStamps",{latestId:0,invokeId:null}),R(this,"mirror"),R(this,"mutationCb"),R(this,"resetObservers"),R(this,"frozen",!1),R(this,"locked",!1),R(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:r="all",win:n,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&r==="all"&&this.initCanvasMutationObserver(n,i,s),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,s,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,s){const o=iw(r,n,i,!0),a=new Map,l=new xB;l.onmessage=m=>{const{id:h}=m.data;if(a.set(h,!1),!("base64"in m.data))return;const{base64:v,type:w,width:g,height:y}=m.data;this.mutationCb({id:h,type:Fs["2D"],commands:[{property:"clearRect",args:[0,0,g,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:v}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,f;const d=()=>{const m=[];return r.document.querySelectorAll("canvas").forEach(h=>{mt(h,n,i,!0)||m.push(h)}),m},p=m=>{if(c&&m-c{var v;const w=this.mirror.getId(h);if(a.get(w)||h.width===0||h.height===0)return;if(a.set(w,!0),["webgl","webgl2"].includes(h.__context)){const y=h.getContext(h.__context);((v=y==null?void 0:y.getContextAttributes())==null?void 0:v.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const g=await createImageBitmap(h);l.postMessage({id:w,bitmap:g,width:h.width,height:h.height,dataURLOptions:s.dataURLOptions},[g])}),f=requestAnimationFrame(p)};f=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=iw(e,r,n,!1),s=CB(this.processMutation.bind(this),e,r,n),o=EB(this.processMutation.bind(this),e,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;const i=n.map(o=>{const{type:a,...l}=o;return l}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(e)}}class kB{constructor(e){R(this,"trackedLinkElements",new WeakSet),R(this,"mutationCb"),R(this,"adoptedStyleSheetCb"),R(this,"styleMirror",new Q5),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;const n={id:r,styleIds:[]},i=[];for(const s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(a,l)=>({rule:B_(a,s.href),index:l}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class RB{constructor(){R(this,"nodeMap",new WeakMap),R(this,"active",!1)}inOtherBuffer(e,r){const n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==r)}add(e,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}destroy(){}}let Te,gu,Cd,yc=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((u0=t.contentWindow)==null?void 0:u0.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const or=LD();function Vt(t={}){const{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,mutationBufferThrottleMs:f=500,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:h,maskTextFn:v,hooks:w,packFn:g,sampling:y={},dataURLOptions:b={},mousemoveWait:C,recordDOM:A=!0,recordCanvas:O=!1,recordCrossOriginIframes:E=!1,recordAfter:M=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:te=!1,inlineImages:ne=!1,plugins:Se,keepIframeSrcFn:be=()=>!1,ignoreCSSAttributes:j=new Set([]),errorHandler:Ue}=t;nB(Ue);const re=E?window.parent===window:!0;let I=!1;if(!re)try{window.parent.document&&(I=!1)}catch{I=!0}if(re&&!e)throw new Error("emit function is required");if(!re&&!I)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),or.reset();const N=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},F=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};q5();let W,ae=0;const wt=J=>{for(const ct of Se||[])ct.eventProcessor&&(J=ct.eventProcessor(J));return g&&!I&&(J=g(J)),J};Te=(J,ct)=>{var ue;const Me=J;if(Me.timestamp=mc(),(ue=ui[0])!=null&&ue.isFrozen()&&Me.type!==q.FullSnapshot&&!(Me.type===q.IncrementalSnapshot&&Me.data.source===z.Mutation)&&ui.forEach(Ar=>Ar.unfreeze()),re)e==null||e(wt(Me),ct);else if(I){const Ar={type:"rrweb",event:wt(Me),origin:window.location.origin,isCheckout:ct};window.parent.postMessage(Ar,"*")}if(Me.type===q.FullSnapshot)W=Me,ae=0;else if(Me.type===q.IncrementalSnapshot){if(Me.data.source===z.Mutation&&Me.data.isAttachIframe)return;ae++;const Ar=n&&ae>=n,le=r&&Me.timestamp-W.timestamp>r;(Ar||le)&&gu(!0)}};const Oe=J=>{Te({type:q.IncrementalSnapshot,data:{source:z.Mutation,...J}})},xe=J=>Te({type:q.IncrementalSnapshot,data:{source:z.Scroll,...J}}),et=J=>Te({type:q.IncrementalSnapshot,data:{source:z.CanvasMutation,...J}}),Ur=J=>Te({type:q.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...J}}),ir=new kB({mutationCb:Oe,adoptedStyleSheetCb:Ur}),zr=new vB({mirror:or,mutationCb:Oe,stylesheetManager:ir,recordCrossOriginIframes:E,wrappedEmit:Te});for(const J of Se||[])J.getMirror&&J.getMirror({nodeMirror:or,crossOriginIframeMirror:zr.crossOriginIframeMirror,crossOriginIframeStyleMirror:zr.crossOriginIframeStyleMirror});const Di=new RB;Cd=new IB({recordCanvas:O,mutationCb:et,win:window,blockClass:i,blockSelector:s,mirror:or,sampling:y.canvas,dataURLOptions:b});const ti=new wB({mutationCb:Oe,scrollCb:xe,bypassOptions:{blockClass:i,blockSelector:s,ignoreClass:o,ignoreSelector:a,ignoreCSSAttributes:j,mutationBufferThrottleMs:f,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:N,dataURLOptions:b,maskTextFn:v,maskInputFn:h,recordCanvas:O,inlineImages:ne,sampling:y,slimDOMOptions:F,iframeManager:zr,stylesheetManager:ir,canvasManager:Cd,keepIframeSrcFn:be,processedNodeManager:Di},mirror:or});gu=(J=!1)=>{if(!A)return;Te({type:q.Meta,data:{href:window.location.href,width:pA(),height:hA()}},J),ir.reset(),ti.init(),ui.forEach(ue=>ue.lock());const ct=sL(document,{mirror:or,blockClass:i,blockSelector:s,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:N,maskTextFn:v,maskInputFn:h,slimDOM:F,dataURLOptions:b,recordCanvas:O,inlineImages:ne,onSerialize:ue=>{yA(ue,or)&&zr.addIframe(ue),vA(ue,or)&&ir.trackLinkElement(ue),Cp(ue)&&ti.addShadowRoot(G.shadowRoot(ue),document)},onIframeLoad:(ue,Me)=>{zr.attachIframe(ue,Me),ti.observeAttachShadow(ue)},onStylesheetLoad:(ue,Me)=>{ir.attachLinkElement(ue,Me)},keepIframeSrcFn:be});if(!ct)return console.warn("Failed to snapshot the document");Te({type:q.FullSnapshot,data:{node:ct,initialOffset:dA(window)}},J),ui.forEach(ue=>ue.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ir.adoptStyleSheets(document.adoptedStyleSheets,or.getId(document))};try{const J=[],ct=Me=>{var Ar;return Q(yB)({mutationCb:Oe,mousemoveCb:(le,bf)=>Te({type:q.IncrementalSnapshot,data:{source:bf,positions:le}}),mouseInteractionCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.MouseInteraction,...le}}),scrollCb:xe,viewportResizeCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.ViewportResize,...le}}),inputCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.Input,...le}}),mediaInteractionCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.MediaInteraction,...le}}),styleSheetRuleCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.StyleSheetRule,...le}}),styleDeclarationCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.StyleDeclaration,...le}}),canvasMutationCb:et,fontCb:le=>Te({type:q.IncrementalSnapshot,data:{source:z.Font,...le}}),selectionCb:le=>{Te({type:q.IncrementalSnapshot,data:{source:z.Selection,...le}})},customElementCb:le=>{Te({type:q.IncrementalSnapshot,data:{source:z.CustomElement,...le}})},blockClass:i,ignoreClass:o,ignoreSelector:a,mutationBufferThrottleMs:f,maskTextClass:l,maskTextSelector:u,maskInputOptions:N,inlineStylesheet:c,sampling:y,recordDOM:A,recordCanvas:O,inlineImages:ne,userTriggeredOnInput:V,collectFonts:te,doc:Me,maskInputFn:h,maskTextFn:v,keepIframeSrcFn:be,blockSelector:s,slimDOMOptions:F,dataURLOptions:b,mirror:or,iframeManager:zr,stylesheetManager:ir,shadowDomManager:ti,processedNodeManager:Di,canvasManager:Cd,ignoreCSSAttributes:j,plugins:((Ar=Se==null?void 0:Se.filter(le=>le.observer))==null?void 0:Ar.map(le=>({observer:le.observer,options:le.options,callback:bf=>Te({type:q.Plugin,data:{plugin:le.name,payload:bf}})})))||[]},w)};zr.addLoadListener(Me=>{try{J.push(ct(Me.contentDocument))}catch(Ar){console.warn(Ar)}});const ue=()=>{gu(),J.push(ct(document)),yc=!0};return document.readyState==="interactive"||document.readyState==="complete"?ue():(J.push(pt("DOMContentLoaded",()=>{Te({type:q.DomContentLoaded,data:{}}),M==="DOMContentLoaded"&&ue()})),J.push(pt("load",()=>{Te({type:q.Load,data:{}}),M==="load"&&ue()},window))),()=>{J.forEach(Me=>Me()),Di.destroy(),yc=!1,iB()}}catch(J){console.warn(J)}}Vt.addCustomEvent=(t,e)=>{if(!yc)throw new Error("please add custom event after start recording");Te({type:q.Custom,data:{tag:t,payload:e}})};Vt.freezePage=()=>{ui.forEach(t=>t.freeze())};Vt.takeFullSnapshot=t=>{if(!yc)throw new Error("please take full snapshot after start recording");gu(t)};Vt.mirror=or;var aw;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(aw||(aw={}));const{addCustomEvent:BU}=Vt,{freezePage:FU}=Vt,{takeFullSnapshot:UU}=Vt,MB=(t,e,r)=>(...n)=>{const i=r!=null&&r.getState?r.getState:()=>({loading:!1,value:void 0,error:void 0,subscription:void 0}),{allowNull:s=!0}=r||{};In(()=>i().loading=!0),t(...n).then(o=>{const a=e?e(o):o;if(!s&&!a){r!=null&&r.onError&&(r==null||r.onError(new Error("")));return}In(()=>{i().value=a,i().error=void 0,r!=null&&r.onSuccess&&(r==null||r.onSuccess(a))})}).catch(o=>In(()=>{i().error=o,r!=null&&r.onError&&(r==null||r.onError(o))})).finally(()=>In(()=>i().loading=!1))},Ad=(t,e)=>MB(t,r=>r,e),TB=t=>{Ha.on("receivedP2PMessage",e=>{e.event==="video-state-changed"?t.webRtcStore.mediaStore.setRemoteVideoOn(e.payload.videoOn):e.event==="mic-state-changed"&&t.webRtcStore.mediaStore.setRemoteMicOn(e.payload.micOn)})},PB=()=>Ha.off("receivedP2PMessage"),VB=[{urls:["stun:us-turn4.xirsys.com"]},{username:"PvLJDpyuuyzUipceEtX3oFsiSmU3MBWAf9onI4j016VM6vHR6gzKBAsz_t0z9r2vAAAAAGQKUa9XYXJtbHlEZXY=",credential:"a4c3162a-bec2-11ed-bde9-0242ac140004",urls:["turn:us-turn4.xirsys.com:80?transport=udp","turn:us-turn4.xirsys.com:3478?transport=udp","turn:us-turn4.xirsys.com:80?transport=tcp","turn:us-turn4.xirsys.com:3478?transport=tcp","turns:us-turn4.xirsys.com:443?transport=tcp","turns:us-turn4.xirsys.com:5349?transport=tcp"]}],NB={iceServers:VB},DB={offerToReceiveAudio:!0,offerToReceiveVideo:!0},LB=t=>{try{JSON.parse(t||"")}catch{return!1}return!0},Ep=t=>{if(t)try{return JSON.parse(t)}catch{return}},tt={mediaDevices:[],selectedAudioInputMediaDevice:void 0,selectedAudioOutputMediaDevice:void 0,selectedVideoInputMediaDevice:void 0,remoteVideoElement:void 0,otherRemoteVideoElements:[],otherLocalVideoElements:[],localVideoElement:void 0,showVideoControls:!1,showMediaControls:!0,videoOn:!1,micOn:!1,remoteVideoOn:!1,remoteMicOn:!1,lastPlayedMessageId:void 0,stateAtDisconnect:{videoOn:!1,micOn:!1,remoteVideoOn:!1,remoteMicOn:!1}};class $B{constructor(e){S(this,"mediaDevices",tt.mediaDevices);S(this,"selectedAudioInputMediaDevice",tt.selectedAudioInputMediaDevice);S(this,"selectedAudioOutputMediaDevice",tt.selectedAudioOutputMediaDevice);S(this,"selectedVideoInputMediaDevice",tt.selectedVideoInputMediaDevice);S(this,"remoteVideoElement",tt.remoteVideoElement);S(this,"localVideoElement",tt.localVideoElement);S(this,"showVideoControls",tt.showVideoControls);S(this,"showMediaControls",tt.showMediaControls);S(this,"videoOn",tt.videoOn);S(this,"micOn",tt.micOn);S(this,"remoteVideoOn",tt.remoteVideoOn);S(this,"remoteMicOn",tt.remoteMicOn);S(this,"lastPlayedMessageId",tt.lastPlayedMessageId);S(this,"otherRemoteVideoElements",tt.otherRemoteVideoElements);S(this,"otherLocalVideoElements",tt.otherLocalVideoElements);S(this,"stateAtDisconnect",tt.stateAtDisconnect);S(this,"type");S(this,"setVideoOn",e=>this.videoOn=e);S(this,"setMicOn",e=>this.micOn=e);S(this,"setLastPlayedMessageId",e=>this.lastPlayedMessageId=e);S(this,"setSelectedAudioInputMediaDevice",e=>this.selectedAudioInputMediaDevice=e);S(this,"setSelectedAudioOutputMediaDevice",e=>this.selectedAudioOutputMediaDevice=e);S(this,"setSelectedVideoInputMediaDevice",e=>this.selectedVideoInputMediaDevice=e);S(this,"setRemoteVideoElement",e=>this.remoteVideoElement=e);S(this,"addOtherRemoteVideoElements",e=>{var n;const r=Array.isArray(e)?e:[e];this.otherRemoteVideoElements=(n=this.otherRemoteVideoElements)==null?void 0:n.concat(r),r.forEach(i=>{var s,o;return(s=this.remoteVideoElement)!=null&&s.srcObject?i.srcObject=(o=this.remoteVideoElement)==null?void 0:o.srcObject:null})});S(this,"setLocalVideoElement",e=>this.localVideoElement=e);S(this,"setShowVideoControls",e=>this.showVideoControls=e);S(this,"setShowMediaControls",e=>this.showVideoControls=e);S(this,"addOtherLocalVideoElements",e=>{var n;const r=Array.isArray(e)?e:[e];this.otherLocalVideoElements=(n=this.otherLocalVideoElements)==null?void 0:n.concat(r),r.forEach(i=>{var s,o;return(s=this.localVideoElement)!=null&&s.srcObject?i.srcObject=(o=this.localVideoElement)==null?void 0:o.srcObject:null})});S(this,"setStateAtDisconnect",()=>this.stateAtDisconnect={videoOn:this.videoOn,micOn:this.micOn,remoteMicOn:this.remoteMicOn,remoteVideoOn:this.remoteVideoOn});S(this,"setRemoteVideoOn",e=>this.remoteVideoOn=e);S(this,"setRemoteMicOn",e=>this.remoteMicOn=e);S(this,"getUserMediaError",({error:e,permissionRequestType:r})=>{const n="error",i=r=="camera"?"video_permission_error":"microphone_permission_error";let s=r=="microphone"?"Microphone not found":"Microphone and Camera not found",o=`Please connect to a ${r=="microphone"?"microphone.":"camera and microphone."}`;const a=r=="microphone";return e.message.includes("Permission denied")?(s=`${a?"Microphone":"Camera and microphone"} access denied`,o=`Click the ${a?"red microphone icon":"camera icon"} on the right of the URL bar and enable the permission to continue the call.`):e.message.includes("Permission dismissed")&&(s=`${a?"Microphone":"Camera"} permission dismissed`,o=`Try clicking the ${a?"microphone":"video"} icon to toggle on your ${a?"microphone":"video"} again`),s="⚠ "+s,{type:n,name:i,header:s,body:o}});S(this,"getMediaPermissions",async()=>{let e=!1,r=!1;try{e=(await navigator.permissions.query({name:"microphone"})).state==="granted",r=(await navigator.permissions.query({name:"camera"})).state==="granted"}catch(n){fe.log(n)}return{hasMicrophone:e,hasCamera:r}});S(this,"requestMediaPermissions",async e=>{var i;const{hasMicrophone:r,hasCamera:n}=await this.getMediaPermissions();if(!r||!n){const s=await this.getMediaStream({audio:!r,video:!n,setUserNotificationMessage:e});return(i=s==null?void 0:s.getTracks())==null||i.forEach(o=>o.stop()),!!s}return!0});S(this,"loadMediaDevices",async()=>{try{const e=await navigator.mediaDevices.enumerateDevices();In(()=>{e!=null&&e.length&&(this.mediaDevices=sd(e,r=>r.kind+r.groupId))})}catch(e){fe.error(e)}});S(this,"getMediaStream",async({audio:e,video:r,setUserNotificationMessage:n})=>{try{const i=await navigator.mediaDevices.getUserMedia({audio:e,video:r});return await this.loadMediaDevices(),i}catch(i){const s=this.getUserMediaError({error:i,permissionRequestType:r&&"camera"||"microphone"});n&&n(s);return}});S(this,"attachSinkId",async e=>{const r=this.remoteVideoElement;if(!r||!e)return;const n=r;if(typeof n.sinkId<"u"&&typeof n.setSinkId=="function")try{await n.setSinkId(e)}catch(i){let s=i;i.name==="SecurityError"&&(s=`You need to use HTTPS for selecting audio output device: ${i}`),fe.error(s)}else fe.warn("Browser does not support output device selection.")});S(this,"deviceExists",e=>this.mediaDevices.find(r=>r.deviceId===e)!==void 0);S(this,"resetState",()=>{Object.entries(tt).forEach(([e,r])=>this[e]=r),Xb(this)});this.type=e,zb(this),Zm(this,{name:`MediaStore-${e}`,properties:["selectedAudioInputMediaDevice","selectedVideoInputMediaDevice","selectedAudioOutputMediaDevice","showVideoControls","lastPlayedMessageId"],storage:window.localStorage}),this.loadMediaDevices(),$e(()=>({hasDevices:this.mediaDevices.length>0,mediaDevice:this.selectedAudioInputMediaDevice}),({hasDevices:r,mediaDevice:n})=>{!r||!(n!=null&&n.deviceId)||this.deviceExists(n.deviceId)||(fe.error("Failed to find audio input device"),this.setSelectedAudioInputMediaDevice())}),$e(()=>({hasDevices:this.mediaDevices.length>0,mediaDevice:this.selectedVideoInputMediaDevice}),({hasDevices:r,mediaDevice:n})=>{!r||!(n!=null&&n.deviceId)||this.deviceExists(n.deviceId)||(fe.error("Failed to find video input device"),this.setSelectedVideoInputMediaDevice())}),$e(()=>({hasDevices:this.mediaDevices.length>0,remoteElement:this.remoteVideoElement,mediaDevice:this.selectedAudioOutputMediaDevice}),({hasDevices:r,remoteElement:n,mediaDevice:i})=>{!r||!n||!(i!=null&&i.deviceId)||(this.deviceExists(i.deviceId)||(fe.error("Failed to find audio output device"),this.setSelectedAudioOutputMediaDevice(void 0)),this.attachSinkId(i==null?void 0:i.deviceId))})}get audioInputMediaDevices(){return sd(this.mediaDevices.filter(e=>e.kind==="audioinput"&&e.deviceId),"deviceId")}get audioOutputMediaDevices(){return sd(this.mediaDevices.filter(e=>e.kind==="audiooutput"&&e.deviceId),"deviceId")}get videoInputMediaDevices(){return this.mediaDevices.filter(e=>e.kind==="videoinput"&&e.deviceId)}}const vn={isP2PConnected:!1,isCaller:!1,isStartingVideoStream:!1,isStartingAudioStream:!1,connectionState:"disconnected",isEstablishingConnection:!1,connectionTimeoutTimer:void 0};class BB{constructor(e){S(this,"isP2PConnected",vn.isP2PConnected);S(this,"isCaller",vn.isCaller);S(this,"isStartingVideoStream",vn.isStartingVideoStream);S(this,"isStartingAudioStream",vn.isStartingAudioStream);S(this,"connectionState",vn.connectionState);S(this,"isEstablishingConnection",vn.isEstablishingConnection);S(this,"connectionTimeoutTimer",vn.connectionTimeoutTimer);S(this,"mediaStore");S(this,"peerConnection");S(this,"localStream");S(this,"remoteStream");S(this,"receiveDataChannel");S(this,"sendDataChannel");S(this,"dataChannelQueue",[]);S(this,"type","client");S(this,"makingOffer",!1);S(this,"setIsCaller",e=>this.isCaller=e);S(this,"setIsStartingVideoStream",e=>this.isStartingVideoStream=e);S(this,"setIsStartingAudioStream",e=>this.isStartingAudioStream=e);S(this,"setLocalStream",e=>this.localStream=e);S(this,"setRemoteStream",e=>this.remoteStream=e);S(this,"setSendDataChannel",e=>this.sendDataChannel=e);S(this,"setReceiveDataChannel",e=>this.receiveDataChannel=e);S(this,"setPeerConnection",e=>this.peerConnection=e);S(this,"setConnectionState",e=>this.connectionState=e);S(this,"setIsP2PConnected",e=>{var r;e&&this.type==="agent"&&((r=H.socket)==null||r.emit("peer-connection-established")),this.type==="client"&&Vt.takeFullSnapshot(),this.isP2PConnected=e});S(this,"checkConnectionTimeout",()=>{this.isEstablishingConnection&&this.closeWebRtcConnection()});S(this,"setIsEstablishingConnection",e=>{this.isEstablishingConnection=e,e&&(this.connectionTimeoutTimer=setTimeout(this.checkConnectionTimeout,7500))});S(this,"onIceStateChange",()=>{});S(this,"onSignalStateChange",()=>{var e;((e=this.peerConnection)==null?void 0:e.signalingState)==="closed"&&this.closeWebRtcConnection()});S(this,"manipulateVideoElement",(e,r)=>{const{remoteVideoElement:n,localVideoElement:i,otherRemoteVideoElements:s,otherLocalVideoElements:o}=this.mediaStore,a=e==="remote"?n:i,l=e==="remote"?s:o;a&&r(a),l.forEach(u=>u?r(u):null)});S(this,"onAddRemoteStreamCallback",({event:e})=>{const r=this.mediaStore.remoteVideoElement;r&&r.srcObject!==e.streams[0]&&(this.manipulateVideoElement("remote",n=>n.srcObject=e.streams[0]),this.setRemoteStream(e.streams[0]))});S(this,"onNegotiationNeeded",()=>{var e;((e=this.peerConnection)==null?void 0:e.signalingState)==="stable"&&this.createOffer()});S(this,"onConnectionStateChange",()=>{if(!this.peerConnection)return;this.setConnectionState(this.peerConnection.connectionState);const e=["connected"],r=["disconnected","closed","failed"];e.includes(this.peerConnection.connectionState)?this.setIsP2PConnected(!0):r.includes(this.peerConnection.connectionState)&&this.disconnectWebRtcSession()});S(this,"createOffer",async()=>{var e;if(!(!this.peerConnection||!H.remoteP2PSocketId||this.makingOffer))try{this.makingOffer=!0;const r=await this.peerConnection.createOffer(DB);await this.peerConnection.setLocalDescription(r),(e=H.socket)==null||e.emit("p2p-negotiation",{type:"offer",description:r,to:H.remoteP2PSocketId})}catch{return}finally{this.makingOffer=!1}});S(this,"createAnswer",async({message:e})=>{var r;if(!(!e.description||!this.peerConnection||!H.remoteP2PSocketId)){await this.peerConnection.setRemoteDescription(new RTCSessionDescription(e.description));try{await this.peerConnection.addEventListener("icecandidate",i=>this.onIceCandidateAdded({event:i}));const n=await this.peerConnection.createAnswer();await this.peerConnection.setLocalDescription(n),(r=H.socket)==null||r.emit("p2p-negotiation",{type:"answer",description:n,to:H.remoteP2PSocketId})}catch{return}}});S(this,"handleP2PNegotiation",async({message:e,userIdentifier:r})=>{var n;try{switch(e.type){case"candidate":this.peerConnection&&await this.peerConnection.addIceCandidate(e.candidate);break;case"offer":if(!e.from)return;H.setRemoteP2PSocketId(e.from),this.peerConnection||await this.createRtcPeerConnection({userIdentifier:r}),this.peerConnection&&H.socket&&await this.createAnswer({message:e});break;case"answer":if(!H.remoteP2PSocketId)return;this.peerConnection&&e.description&&await this.peerConnection.setRemoteDescription(new RTCSessionDescription(e.description)),(n=H.socket)==null||n.emit("p2p-negotiation",{type:"ready",to:H.remoteP2PSocketId});break;case"hang_up":this.disconnectWebRtcSession();break;case"ready":this.setIsP2PConnected(!0);break}}catch(i){fe.error("P2P negotiation callback error",i);return}});S(this,"onIceCandidateAdded",({event:{candidate:e}})=>{!e||!H.socket||!H.remoteP2PSocketId||H.socket.emit("p2p-negotiation",{type:"candidate",candidate:e,to:H.remoteP2PSocketId})});S(this,"sendP2PEvent",e=>{var r;((r=this.dataChannel)==null?void 0:r.readyState)!=="open"&&(this.dataChannelQueue=[...this.dataChannelQueue,e]),this.sendP2PMessage({message:e})});S(this,"sendP2PMessage",({message:e})=>{var n,i;const r=JSON.stringify({...e,origin:"warmly"});this.isCaller&&((n=this.sendDataChannel)==null?void 0:n.readyState)==="open"?this.sendDataChannel.send(r):!this.isCaller&&((i=this.receiveDataChannel)==null?void 0:i.readyState)==="open"&&this.receiveDataChannel.send(r)});S(this,"isAgentOwnedSession",(e,r)=>e&&e!==r);S(this,"closeWebRtcConnection",()=>{var e;try{this.dataChannelQueue=[],H.remoteP2PSocketId&&((e=H.socket)==null||e.emit("p2p-negotiation",{type:"hang_up",to:H.remoteP2PSocketId})),this.disconnectWebRtcSession(),this.resetState()}catch(r){fe.error("Close WebRTC connection error",r)}});S(this,"createRtcPeerConnection",({userIdentifier:e,agentId:r})=>{var n;if(!(!H.socket||this.isAgentOwnedSession(r,e))){this.peerConnection&&this.closeWebRtcConnection();try{this.setIsEstablishingConnection(!0);const i=new RTCPeerConnection(NB);if(this.setPeerConnection(i),!this.peerConnection){fe.error("Failed to get peerConnection");return}this.peerConnection.addEventListener("iceconnectionstatechange",()=>this.onIceStateChange()),this.localStream&&this.localStream.getTracks().forEach(s=>{var o;return(o=this.peerConnection)==null?void 0:o.addTrack(s,this.localStream)}),this.peerConnection.addEventListener("track",s=>this.onAddRemoteStreamCallback({event:s})),this.peerConnection.onnegotiationneeded=()=>this.onNegotiationNeeded(),this.peerConnection.onsignalingstatechange=()=>this.onSignalStateChange(),this.peerConnection.onconnectionstatechange=()=>this.onConnectionStateChange(),this.isCaller?(this.peerConnection.addEventListener("icecandidate",s=>this.onIceCandidateAdded({event:s})),this.createDataChannel({rtcDataChannelName:(n=H.socket)==null?void 0:n.id})):this.peerConnection.ondatachannel=s=>this.receiveChannelCallback({event:s})}catch{this.setPeerConnection(void 0)}}});S(this,"toggleWebRtcVideo",async e=>{const{videoOn:r,setVideoOn:n}=this.mediaStore;try{this.setIsStartingVideoStream(!0),n(!r),await this.getUserAudioVideoStream(e);const i=this.localStream;i&&this.peerConnection&&(i.getTracks().forEach(s=>{var o;return(o=this.peerConnection)==null?void 0:o.addTrack(s,i)}),e(void 0))}catch(i){fe.error("toggleWebRtcVideo error",i)}finally{this.setIsStartingVideoStream(!1)}});S(this,"toggleWebRtcAudio",async e=>{const{micOn:r,setMicOn:n}=this.mediaStore;try{this.setIsStartingAudioStream(!0),n(!r),await this.getUserAudioVideoStream(e);const i=this.localStream;i&&this.peerConnection&&(i.getTracks().forEach(s=>{var o;return(o=this.peerConnection)==null?void 0:o.addTrack(s,i)}),e(void 0))}catch(i){fe.error("toggleWebRtcAudio error",i)}finally{this.setIsStartingAudioStream(!1)}});S(this,"onDataChannelReady",()=>{var e;((e=this.dataChannel)==null?void 0:e.readyState)==="open"&&(this.dataChannelQueue.forEach(r=>this.sendP2PMessage({message:r})),this.dataChannelQueue=[])});S(this,"createDataChannel",async({rtcDataChannelName:e})=>{const r={ordered:!1,maxPacketLifeTime:3e3},n=`webrtc_channel_${e}`;if(!this.peerConnection)return;const i=await this.peerConnection.createDataChannel(n,r);i.onmessage=this.processIncomingP2PMessage,i.onopen=()=>{this.setIsCaller(!0),this.onDataChannelReady()},this.setSendDataChannel(i)});S(this,"onReceiveChannelOpenState",()=>{var e;this.setIsCaller(!1),(e=this.receiveDataChannel)==null||e.readyState});S(this,"processIncomingP2PMessage",e=>{if(!LB(e.data))return;const r=JSON.parse(e.data);r.origin==="warmly"&&(r.payload.createdAt&&(r.payload.createdAt=new Date(r.payload.createdAt)),Ha.emit("receivedP2PMessage",r))});S(this,"receiveChannelCallback",({event:e})=>{const r=e.channel;r.onopen=()=>this.onReceiveChannelOpenState(),r.onmessage=this.processIncomingP2PMessage,this.setReceiveDataChannel(r)});S(this,"disconnectWebRtcSession",()=>{var e;this.mediaStore.setStateAtDisconnect(),this.mediaStore.setVideoOn(!1),this.mediaStore.setMicOn(!1),this.mediaStore.setRemoteVideoOn(!1),this.isCaller&&this.sendDataChannel?this.sendDataChannel.close():this.receiveDataChannel&&this.receiveDataChannel.close(),this.peerConnection&&(this.peerConnection.onicecandidate=null),this.closeLocalStream(),this.closeRemoteStream(),this.peerConnection&&this.peerConnection.close(),this.setPeerConnection(void 0),this.setIsP2PConnected(!1),(e=H.socket)==null||e.emit("peer-connection-ended")});S(this,"removeAllTracks",e=>{const r=e==null?void 0:e.getTracks();r==null||r.forEach(n=>{n.stop(),e==null||e.removeTrack(n)})});S(this,"closeLocalStream",()=>{const e=this.mediaStore.localVideoElement;e&&this.manipulateVideoElement("local",r=>r.srcObject=null),(e==null?void 0:e.muted)===!1&&this.manipulateVideoElement("local",r=>r.muted=!0),this.removeAllTracks(this.localStream),this.setLocalStream(void 0)});S(this,"closeRemoteStream",()=>{const e=this.mediaStore.remoteVideoElement;e&&this.manipulateVideoElement("remote",r=>r.srcObject=null),(e==null?void 0:e.muted)===!1&&this.manipulateVideoElement("remote",r=>r.muted=!0),this.removeAllTracks(this.remoteStream),this.setRemoteStream(void 0)});S(this,"getUserAudioVideoStream",async e=>{const{selectedVideoInputMediaDevice:r,selectedAudioInputMediaDevice:n,videoOn:i,micOn:s,localVideoElement:o}=this.mediaStore;let a,l;if(s&&n?a={deviceId:{exact:n.deviceId}}:a=s,i&&r?l={deviceId:{exact:r.deviceId}}:l=i,this.closeLocalStream(),!a&&!i){this.closeLocalStream(),this.reattachRemoteStream();return}const u=await this.mediaStore.getMediaStream({audio:a,video:l,setUserNotificationMessage:e});this.setLocalStream(u),u&&(o&&this.manipulateVideoElement("local",c=>c.srcObject=u),this.reattachRemoteStream())});S(this,"reattachRemoteStream",()=>{const{micOn:e,remoteVideoElement:r}=this.mediaStore;if(r){if(r.srcObject&&this.remoteStream){const n=this.remoteStream;this.manipulateVideoElement("remote",i=>i.srcObject=n)}this.manipulateVideoElement("remote",n=>n.muted=!e)}});S(this,"resetState",()=>{const e=this.isCaller;Object.entries(vn).forEach(([r,n])=>this[r]=n),this.isCaller=e});this.type=e,this.mediaStore=new $B(e),Ua(this,{isP2PConnected:L,setIsP2PConnected:D,isCaller:L,setIsCaller:D,isStartingVideoStream:L,setIsStartingVideoStream:D,isStartingAudioStream:L,setIsStartingAudioStream:D,setConnectionState:D,connectionState:L,isEstablishingConnection:L,setIsEstablishingConnection:D,isConnecting:Je,connectionTimeoutTimer:L},{autoBind:!0}),$e(()=>this.connectionState,r=>{r!=="connecting"&&this.isEstablishingConnection&&(this.setIsEstablishingConnection(!1),clearTimeout(this.connectionTimeoutTimer),this.connectionTimeoutTimer=void 0)}),$e(()=>this.mediaStore.videoOn,r=>{this.sendP2PEvent({event:"video-state-changed",payload:{videoOn:r}})}),$e(()=>this.mediaStore.micOn,r=>{this.sendP2PEvent({event:"mic-state-changed",payload:{micOn:r}})}),$e(()=>this.mediaStore.mediaDevices.length>0&&this.mediaStore.selectedAudioInputMediaDevice,()=>{this.mediaStore.micOn&&this.getUserAudioVideoStream()}),$e(()=>this.mediaStore.mediaDevices.length>0&&this.mediaStore.selectedVideoInputMediaDevice,()=>{this.mediaStore.videoOn&&this.getUserAudioVideoStream()})}get dataChannel(){return this.type==="client"?this.receiveDataChannel:this.sendDataChannel}get isConnecting(){return this.isEstablishingConnection||this.connectionState==="connecting"}}const ft={type:"client",getMessagesState:{loading:!1},userNotificationMessage:void 0,sentMessages:[],receivedMessages:[],remoteIsTyping:!1,typingOrigin:void 0,remoteUser:void 0,userIdentifier:"",initialMessagesCount:void 0,callType:void 0,sessionIdEngagedInConversation:void 0,sessionIdEngagedByWorkflow:void 0,isLastMessageQuestion:!1};class FB{constructor({type:e,userIdentifier:r}){S(this,"type",ft.type);S(this,"getMessagesState",ft.getMessagesState);S(this,"userNotificationMessage",ft.userNotificationMessage);S(this,"sentMessages",ft.sentMessages);S(this,"receivedMessages",ft.receivedMessages);S(this,"remoteIsTyping",ft.remoteIsTyping);S(this,"remoteUser",ft.remoteUser);S(this,"userIdentifier",ft.userIdentifier);S(this,"initialMessagesCount",ft.initialMessagesCount);S(this,"callType",ft.callType);S(this,"webRtcStore");S(this,"sessionIdEngagedInConversation",ft.sessionIdEngagedInConversation);S(this,"sessionIdEngagedByWorkflow",ft.sessionIdEngagedByWorkflow);S(this,"isLastMessageQuestion",ft.isLastMessageQuestion);S(this,"typingOrigin",ft.typingOrigin);S(this,"keepAliveTimer");S(this,"getMessages",e=>{});S(this,"setRemoteIsTyping",e=>this.remoteIsTyping=e);S(this,"setTypingOrigin",e=>this.typingOrigin=e);S(this,"setUserNotificationMessage",e=>this.userNotificationMessage=e);S(this,"setRemoteUser",e=>this.remoteUser=e);S(this,"onIsTypingChange",(e,r)=>{var n;return(n=H.socket)==null?void 0:n.emit("typing-state-changed",{isTyping:e,origin:r})});S(this,"setCallType",e=>this.callType=e);S(this,"setSessionIdEngagedByWorkflow",e=>this.sessionIdEngagedByWorkflow=e);S(this,"setIsLastMessageQuestion",e=>this.isLastMessageQuestion=e);S(this,"setSessionIdEngagedInConversation",e=>this.sessionIdEngagedInConversation=e);S(this,"toggleVideo",async()=>{await this.webRtcStore.toggleWebRtcVideo(this.setUserNotificationMessage)});S(this,"toggleAudio",async()=>{await this.webRtcStore.toggleWebRtcAudio(this.setUserNotificationMessage)});S(this,"processChatMessages",e=>{typeof this.initialMessagesCount>"u"&&(this.initialMessagesCount=e.length);const r=this.type==="agent",n=e.filter(i=>r?!i.isFromAgent:i.isFromAgent).map(i=>({...i,createdAt:new Date(i.createdAt)}));this.receivedMessages=n,this.sentMessages=e.filter(i=>r?i.isFromAgent:!i.isFromAgent).map(i=>({...i,createdAt:new Date(i.createdAt)}))});S(this,"initiateCall",async()=>{const{videoOn:e,micOn:r,localVideoElement:n}=this.webRtcStore.mediaStore;!this.webRtcStore.isP2PConnected||!n||!this.callType||(this.callType==="video"?(e||await this.toggleVideo(),r||await this.toggleAudio()):this.callType==="audio"&&!r&&this.toggleAudio(),this.setCallType(void 0))});this.type=e,this.webRtcStore=new BB(e),r&&(this.userIdentifier=r),Ha.on("logout",()=>this.resetState()),TB(this),Ua(this,{type:L,getMessagesState:L,userNotificationMessage:L,sentMessages:L,receivedMessages:L,remoteIsTyping:L,remoteUser:L,userIdentifier:L,initialMessagesCount:L,callType:L,webRtcStore:!1,sessionIdEngagedInConversation:L,sessionIdEngagedByWorkflow:L,setRemoteIsTyping:D,setUserNotificationMessage:D,setRemoteUser:D,onIsTypingChange:D,setCallType:D,setSessionIdEngagedByWorkflow:D,setSessionIdEngagedInConversation:D,isEngagedByWorkflow:Je,isEngagedInConversation:Je,toggleVideo:D,toggleAudio:D,sendMessage:D,receiveMessage:D.bound,processChatMessages:D,resetState:D.bound,messagesLoading:Je,sortedReceivedMessages:Je,visitorInfo:Je},{autoBind:!0}),$e(()=>({videoElement:this.webRtcStore.mediaStore.localVideoElement,isConnected:this.webRtcStore.isP2PConnected}),async({videoElement:n,isConnected:i})=>{i&&n&&this.callType&&await this.initiateCall()}),$e(()=>this.sessionIdEngagedInConversation,n=>{!n&&this.webRtcStore.isP2PConnected&&this.webRtcStore.closeWebRtcConnection(),e==="client"&&(n&&!this.keepAliveTimer&&(this.keepAliveTimer=setInterval(()=>{var i;(i=H.socket)==null||i.emit("keep-alive")},1e4)),!n&&this.keepAliveTimer&&(clearInterval(this.keepAliveTimer),this.keepAliveTimer=void 0))})}sendMessage(e){this.sentMessages=this.sentMessages.concat(e)}receiveMessage(e){this.remoteIsTyping=!1,this.receivedMessages=this.receivedMessages.concat(e)}resetState(){PB(),this.webRtcStore.closeWebRtcConnection(),H.disconnectSocket(),Object.entries(ft).forEach(([e,r])=>{const n=e;["type","userIdentifier"].every(i=>i!==n)&&(this[n]=r)})}get messagesLoading(){return this.getMessagesState.loading}get sortedReceivedMessages(){return this.receivedMessages.slice().sort((e,r)=>e.createdAt.getTime()-r.createdAt.getTime())}get visitorInfo(){var e,r;return(r=(e=this.getMessagesState.value)==null?void 0:e.find(n=>{var i;return n.messageOrigin==="visitor"&&!!((i=n.sender)!=null&&i.email)}))==null?void 0:r.sender}get isEngagedByWorkflow(){return!1}get isEngagedInConversation(){return!1}}var Lt=Uint8Array,Tt=Uint16Array,zg=Int32Array,jg=new Lt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Wg=new Lt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),lw=new Lt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kA=function(t,e){for(var r=new Tt(31),n=0;n<31;++n)r[n]=e+=1<>1|(ve&21845)<<1;wn=(wn&52428)>>2|(wn&13107)<<2,wn=(wn&61680)>>4|(wn&3855)<<4,xp[ve]=((wn&65280)>>8|(wn&255)<<8)>>1}var zo=function(t,e,r){for(var n=t.length,i=0,s=new Tt(e);i>l]=u}else for(a=new Tt(n),i=0;i>15-t[i]);return a},Oi=new Lt(288);for(var ve=0;ve<144;++ve)Oi[ve]=8;for(var ve=144;ve<256;++ve)Oi[ve]=9;for(var ve=256;ve<280;++ve)Oi[ve]=7;for(var ve=280;ve<288;++ve)Oi[ve]=8;var vc=new Lt(32);for(var ve=0;ve<32;++ve)vc[ve]=5;var jB=zo(Oi,9,0),WB=zo(vc,5,0),MA=function(t){return(t+7)/8|0},TA=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new Lt(t.subarray(e,r))},jr=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},wo=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},Ed=function(t,e){for(var r=[],n=0;nd&&(d=s[n].s);var p=new Tt(d+1),m=Ip(r[c-1],p,0);if(m>e){var n=0,h=0,v=m-e,w=1<e)h+=w-(1<>=v;h>0;){var y=s[n].s;p[y]=0&&h;--n){var b=s[n].s;p[b]==e&&(--p[b],++h)}m=e}return{t:new Lt(p),l:m}},Ip=function(t,e,r){return t.s==-1?Math.max(Ip(t.l,e,r+1),Ip(t.r,e,r+1)):e[t.s]=r},cw=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Tt(++e),n=0,i=t[0],s=1,o=function(l){r[n++]=l},a=1;a<=e;++a)if(t[a]==i&&a!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=t[a]}return{c:r.subarray(0,n),n:e}},So=function(t,e){for(var r=0,n=0;n>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var s=0;s4&&!V[lw[ne-1]];--ne);var Se=u+5<<3,be=So(i,Oi)+So(s,vc)+o,j=So(i,d)+So(s,h)+o+14+3*ne+So(O,V)+2*O[16]+3*O[17]+7*O[18];if(l>=0&&Se<=be&&Se<=j)return PA(e,c,t.subarray(l,l+u));var Ue,re,I,N;if(jr(e,c,1+(j15&&(jr(e,c,wt[E]>>5&127),c+=wt[E]>>12)}}else Ue=jB,re=Oi,I=WB,N=vc;for(var E=0;E255){var Oe=xe>>18&31;wo(e,c,Ue[Oe+257]),c+=re[Oe+257],Oe>7&&(jr(e,c,xe>>23&31),c+=jg[Oe]);var et=xe&31;wo(e,c,I[et]),c+=N[et],et>3&&(wo(e,c,xe>>5&8191),c+=Wg[et])}else wo(e,c,Ue[xe]),c+=re[xe]}return wo(e,c,Ue[256]),c+re[256]},HB=new zg([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),VA=new Lt(0),GB=function(t,e,r,n,i,s){var o=s.z||t.length,a=new Lt(n+o+5*(1+Math.ceil(o/7e3))+i),l=a.subarray(n,a.length-i),u=s.l,c=(s.r||0)&7;if(e){c&&(l[0]=s.r>>3);for(var f=HB[e-1],d=f>>13,p=f&8191,m=(1<7e3||V>24576)&&(Ue>423||!u)){c=fw(t,l,0,b,C,A,E,V,ne,M-ne,c),V=O=E=0,ne=M;for(var re=0;re<286;++re)C[re]=0;for(var re=0;re<30;++re)A[re]=0}var I=2,N=0,F=p,W=be-j&32767;if(Ue>2&&Se==y(M-W))for(var ae=Math.min(d,Ue)-1,wt=Math.min(32767,M),Oe=Math.min(258,Ue);W<=wt&&--F&&be!=j;){if(t[M+I]==t[M+I-W]){for(var xe=0;xeI){if(I=xe,N=W,xe>ae)break;for(var et=Math.min(W,xe-2),Ur=0,re=0;reUr&&(Ur=Di,j=ir)}}}be=j,j=h[be],W+=be-j&32767}if(N){b[V++]=268435456|Op[I]<<18|uw[N];var ti=Op[I]&31,J=uw[N]&31;E+=jg[ti]+Wg[J],++C[257+ti],++A[J],te=M+I,++O}else b[V++]=t[M],++C[t[M]]}}for(M=Math.max(M,te);M=o&&(l[c/8|0]=u,ct=o),c=PA(l,c+1,t.subarray(M,ct))}s.i=o}return TA(a,0,n+MA(c)+i)},NA=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,s=r.length|0,o=0;o!=s;){for(var a=Math.min(o+2655,s);o>16),i=(i&65535)+15*(i>>16)}t=n,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},KB=function(t,e,r,n,i){if(!i&&(i={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),o=new Lt(s.length+t.length);o.set(s),o.set(t,s.length),t=o,i.w=s.length}return GB(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,r,n,i)},DA=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},YB=function(t,e){var r=e.level,n=r==0?0:r<6?1:r==9?3:2;if(t[0]=120,t[1]=n<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=NA();i.p(e.dictionary),DA(t,2,i.d())}};function XB(t,e){e||(e={});var r=NA();r.p(t);var n=KB(t,e,e.dictionary?6:2,4);return YB(n,e),DA(n,n.length-4,r.d()),n}var dw=typeof TextEncoder<"u"&&new TextEncoder,qB=typeof TextDecoder<"u"&&new TextDecoder,QB=0;try{qB.decode(VA,{stream:!0}),QB=1}catch{}function JB(t,e){var r;if(dw)return dw.encode(t);for(var n=t.length,i=new Lt(t.length+(t.length>>1)),s=0,o=function(u){i[s++]=u},r=0;ri.length){var a=new Lt(s+8+(n-r<<1));a.set(i),i=a}var l=t.charCodeAt(r);l<128||e?o(l):l<2048?(o(192|l>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|t.charCodeAt(++r)&1023,o(240|l>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|l&63)):(o(224|l>>12),o(128|l>>6&63),o(128|l&63))}return TA(i,0,s)}function ZB(t,e){var r,n;{for(var n="",i=0;i{if(t.type!==2)return t;const e={...t,v:t4};return ZB(XB(JB(JSON.stringify(e))))},LA=t=>["matrix","translate","rotate","scale","skew","perspective"].some(r=>t.includes(r.toLocaleLowerCase())),n4=t=>{var l,u,c,f,d;const e=t==null?void 0:t.style;if(!!!(e&&typeof e!="string"))return!0;const n=e;if(Object.keys(n).length===1&&n["background-image"])return!1;const i=Object.keys(t).length===1&&((l=Object.keys(t))==null?void 0:l[0])==="style",s=((u=Object.keys(n))==null?void 0:u.includes("opacity"))&&n.opacity!=="1"&&n.opacity!=="0",o=((c=Object.keys(n))==null?void 0:c.length)===1&&((f=Object.keys(n))==null?void 0:f[0])==="will-change",a=((d=Object.keys(n))==null?void 0:d.includes("transform"))&&typeof n.transform=="string"&&LA(n.transform);return!(i&&(s||o||a))},i4=["style","transform"],$A=["stop-color","stroke","stroke-width","stroke-opacity","d"],s4=i4.concat($A),o4=t=>t.every(e=>!Object.keys(e).some(r=>s4.includes(r))),a4=t=>!Object.keys(t).some(e=>$A.includes(e)),l4=t=>{const e=t==null?void 0:t.transform;return!(e&&typeof e=="string")?!0:!LA(e)},u4=t=>{if(t.type!==3||t.data.source!==0)return!0;const r=t.data.attributes.map(i=>i.attributes);return o4(r)?!0:r.every(i=>!n4(i)||!l4(i)?!1:a4(i))},c4=t=>(t?t+", ":"")+e4.join(","),hw=t=>{var r,n;const e=((r=t==null?void 0:t.config)==null?void 0:r.rrwebRecordOptions)||{};return{...e,ignoreCSSAttributes:e.ignoreCSSAttributes?new Set(e.ignoreCSSAttributes):void 0,emit:t.emit,packFn:(n=t.config)!=null&&n.compressFullSnapshotEvents?r4:void 0,blockSelector:c4(e==null?void 0:e.blockSelector)}},f4="data:audio/mpeg;base64,SUQzBAAAAAACXVRYWFgAAAASAAADbWFqb3JfYnJhbmQATTRBIABUWFhYAAAAEQAAA21pbm9yX3ZlcnNpb24AMABUWFhYAAAAIAAAA2NvbXBhdGlibGVfYnJhbmRzAE00QSBpc29tbXA0MgBUWFhYAAAANgAAA3ZvaWNlLW1lbW8tdXVpZAAyMTBGRjU4NC1GMDJELTRBRUItOUFCRC1CM0I0OUJBQjBGOTEAVElUMgAAAAYAAANCb29wAFRYWFgAAAB/AAADaVR1blNNUEIAIDAwMDAwMDAwIDAwMDAwNzcyIDAwMDAwMDE5IDAwMDAwMDAwMDAwMDIwNzUgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAAVFNTRQAAAA8AAANMYXZmNTkuMjcuMTAwAAAAAAAAAAAAAAD/+1TAAAAAAAAAAAAAAAAAAAAAAABYaW5nAAAADwAAAAkAAA2AAEBAQEBAQEBAQEBAUVFRUVFRUVFRUVFubm5ubm5ubm5ubpGRkZGRkZGRkZGRrq6urq6urq6urq7KysrKysrKysrKyuDg4ODg4ODg4ODg+Pj4+Pj4+Pj4+Pj//////////////wAAAABMYXZjNTkuMzcAAAAAAAAAAAAAAAAkBbIAAAAAAAANgAh2D/oAAAAAAAAAAAAAAAAAAAD/+8TEAAAFmAM7oIAAIZCn5XT2DV0IBubXbbf/cAg+D5QHz5xbwifnAi+XLvlHdb/T5QMdYP5CUv/y7yn8P/KHMHwZNo2iUmkioFydgQ0BzKUegPoHED/GAKA5QJF0HyeePkjVrD12MkEn7CeE0dgTEQciyV1QQ2/X3qMhE5w55LNvB3ke50mr8bQ0BaZsWVM9czbL789/yJup2FIm5rUyGPZhauYeAkZ5U1Vm5o05B0DjRwaUyRW5UjS1Zva+2WB3JhzCgoVODNEg+E2QPsiBL41iXdlxuOUn8+mWINDzuahahu9khuXurZJt0+qV2Qt72XVKqrSKVndyOnVHa1ws5xaHtM6tqzvqw/Yc20bcjTjSUAlBaoSpN9BGY0AwZ/sR7REEIBUjX6BDFcsGQtxYJh0OxPF4/CIVzIQScC6IeiWJJ6TkxOcQ1qVWoP7O6yYrX1601xqV6zoKRNlg9L+Osdx8e6du3yHis1VppbsRxaFrIWTurt5cs1FildjtogryXhKZO7xeky9MY02ynrPOIUaVCbbpFHmGa9OZq3cwTn4f/CcZu5/3IABVCcvtrrljRKhkjBGpqVrkDlTCEakABAwgwzQ4IibYyhLWEW+5SPN+D15wh2Ph2PZWH3CQuiudIThsVCfATDJSSCWgwBKfnxLPS40vJ/utYsUn6VUhnJk7AcLC1EsXxJLTTguz2woYBUZiDba7RLTJpb5jGi7+GPVQ+T2XDa7G469xsrJJrTcw0kYVJh8Nv7a9VtGa7lV/9/sI4Nhyv+IIEFAjQrISEjKiRIYgMgKya6kZ8CY0WHPwQVMywAIdmAkm4DATpwNB8HLDGYUKFn8pzlQ9FsDhM9SzgoWJlSSLmY1fLBcXyQw3YZ3N3XblGZ1hblVkVsj/+2TE/QAMnSEz7CBP6n8wJHWGGjzwXkatYL2rMpfCeNyujeHBePKtbbSBBcILjAfedq8lJsRYlLPb6eQJMZnzuI/n1NNuFSm9Pouou4sWNH1rEettV3i3tPDlpHvjWf66zHxEcrPb7pq+IsSOwwETE/2xUYZlIQEQAwAwBhFrdoqEZsmr1AAQAo/MwRw1NNzJrQNUkYyGEx4ZHsWGKC0y2xTM7mCwZMYhE5XUwA4jr6xLeGTwSUBg2jLDZybAoNGQIYbB4OG7BDkqUOfsAzYkQqGVqq0I5hALXIYrHhgAQGTQqYoEZkMMmCh+oAsOpkr/+5TE6AAUFYElrLDRotOwJD608ATANAQx8IBIsmLQaFQOYdEqjhVAiIwjDMKn4owSA4W04w0IjE4xFAeYMDBhAGAUKRJXTCWcqdS90VL0D3cm3njAFC5jQlGcwUJDRTAmHAkT29QTJjpYJjVQoFa6scos/zK+ZaIQFCQyAY1Godgx6DGwBSFZVlTzG7FFD7E37sNq7+T/ytraJidheBfZcFdS7FFlhZ+Hpe01+fjUSs3JHC7Mva/q629JOY00UVQBoARtXNKg4FgYEBgMRiCAooKpkxuNNiXdRTUSZk6VG7tJT54b////////////////////+l//9kauABT2/ctdEIkwRYypEwB4w4xBIY0AVDIYPERfy9xgkBw+AujMMUU9LgHG7HoxxUA2Hl+h0P5aBqdGxJM1p6+78R0cnZEgXPmJJWkFGvYbVEOFtVFnuzOzbdRO110ej4SkoSlmjxjA1mWiYXg8NyUDUSDpUtq0/CzTK530o7a+fnbrdHnftZ//+6TE8oArpb81+c4QArYv6De0wATurkzM49a7tvrad60PW2vZQ+utYXXd5msDzLtqtMPat46VFWI9ooAIAAnLrHNebnhJi5BhywkEwDptBDmodJYCFKlCBovr9LzETmnSyD39i7wtgHgFnF1x5EqzTak4NivC4sEnj1aZwnSHGf8TYojh2iCryCNPlHG7a9DHHHaIvDs8nXq5nJej9ft1o8i0j13nJ1DnaZb81uTs5pHIxaLFLQJRCBtwdDtVZbVXlGa/6JXXMztJIxDjUgIuRCIQYVpakT/3cp0uSUBULl2jd3Nkw0jDDSFIAIaaPQQUgGNYEapX4DWgoOoaFgYMQahLXWoKxDSWR/w9Lp6bnQnNKz6xaEFSnLcOvIrDWIaxthuMlCKPBiyflYzENWtOYq3Ys7U5eo6xc9LiZbDS9L689d5mKOE8GwfHpebTXBrRK1MY2n1b5cWcixqxa3DKh2Mg0qkOg2XloFhZEu7RogaLCwhDGE0BlKf9o+aqDhHqbV8Cyl30l36PACmMLFqJrBoJQKgZ6S9R1EBKAwsYFJglF1GmHMhdhSCTA5g+MTwpAeeLRZGod054oZXlZy5NXvKhyimkbjDpOMllW6oRhCfMkm7y91usWqrc/sIcK1P/+5TE0oAUFX05rDDT6pKwJrWWIjwJ4rrT8pSJlQ6kFjCyYfSVLV7lPhiKcvWYcTXUfSHxnlj9WfSjSZ19BhJJL1ymBcoH2bOfbVzqtlVjw2wf/////y0qruCrLt/b96CTDoVL2hlogiMgI0wDKEC6RaSPDJyUzT2argb+LuhekL/Q81plYOiSXSaaNF4vtfkUEDR8fJFrTCtd5lDVWlWNsXJbCW51rNMtBfaZjlVC08CcGpRejiq0+xaPdY0JSOPj7x6vWlU/ll15nYHrX1+dbuUp31djU5TuilNNgqkgBmmIulZRMmx2Q1de84F5Dq+ulsiBTf37tlgMlEBxkwiOJF4cXLBS6jBGKga6FljwTptAVLDNJEGfv8CY7jUFJDUGBkck8GoglouNsF5AOniYSV5UdZWGCOyo8QD8vOqnCnY7aPey09S/9RPzz1hDEAiGfXsfxKabeJr8TmMKX8OZyrKRuEQNBNjJzWx78RN05qvLukVNkMRNXkOMdSaRybb/+5TE5QAUMYE1rLDR4mUpZrWWGnx1YUdeJr3xOkzoDC3dI24wDgdKFqheaLAo0iyDnA9Q840ptgrC5XNU0f1u8JYK0AchDHVktGKAvaJb7CzTsvtiXRdY4QF4FTgwPqo2jKWPhcRdU+YqeQWbvQ+qdXszC0wVSmdK+2v7lvy18QYwnRHXC9Z5Z4rxGvO3ohFGE2QlOfZWTeVoajEoMnEYzdSlI9G4KZdkuZZsx/hFNGN1AUSNrpZLDBsskM9DLL7P0S54ICCmBEwutG8IepBVqYMIgKAlDmI0lCqWy2rT6Vpb/RZ83gcukshQqhHy6ryARkzcF4LueSitkitxklLFIJSJlWHJoPCo7sB88esiPE6r0aUIrk2IF8XSJ9uc5ol7tlBkJtbi6xRCvsU0c1Zwc5vHddSDaM2mjU2prTRiZvY1s0SS9QRkaNTJQWXigRv65iN2WyyOsAiCAkNQBwRjoCqYGdWFJRgsUleZQseS1QpiDPkcospjAjYLBJyMdZL/+3TE/QAS1UkvrLDR4kgppTWGGj3gBMpAlq0gRGB8l+akTSgiTdGwFGtraRyWdwwCTVpEotcJgFXouCMnBWz+9GxvNCXI/864JbuyxJMAoV22c3DtKyq2WrfJyVGquDwo2gVDSh0/08JEWSyjcef/205LlQZMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVlVlEAACgcjYeyFAooCJoD1JInGlmWr5KlUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+4TE7gAUFWsr7CR34kGsZPWUmiVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+xTE5oPDECsDBJjEqAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=";function d4(){try{let t=document.getElementById("warmly-script-loader");t||(t=document.querySelector('script[src*="warmly.js"]'));const e=t==null?void 0:t.src;return e?new URL(e).origin:"/"}catch(t){return fe.error("Error getting widget root url",t),"/"}}function h4(t,e){try{const r=new URL(t);return r.href.replace(r.origin,e)}catch{return`${e}/${t}`}}const pw=16*(60*1e3);function p4(t){return t}function m4(t){return t.length===0?p4:t.length===1?t[0]:function(r){return t.reduce((n,i)=>i(n),r)}}function vf(t){const e={subscribe(r){let n=null,i=!1,s=!1,o=!1;function a(){if(n===null){o=!0;return}s||(s=!0,typeof n=="function"?n():n&&n.unsubscribe())}return n=t({next(l){var u;i||(u=r.next)==null||u.call(r,l)},error(l){var u;i||(i=!0,(u=r.error)==null||u.call(r,l),a())},complete(){var l;i||(i=!0,(l=r.complete)==null||l.call(r),a())}}),o&&a(),{unsubscribe:a}},pipe(...r){return m4(r)(e)}};return e}function g4(t){return e=>{let r=0,n=null;const i=[];function s(){n||(n=e.subscribe({next(a){var l;for(const u of i)(l=u.next)==null||l.call(u,a)},error(a){var l;for(const u of i)(l=u.error)==null||l.call(u,a)},complete(){var a;for(const l of i)(a=l.complete)==null||a.call(l)}}))}function o(){if(r===0&&n){const a=n;n=null,a.unsubscribe()}}return{subscribe(a){return r++,i.push(a),s(),{unsubscribe(){r--,o();const l=i.findIndex(u=>u===a);l>-1&&i.splice(l,1)}}}}}}class Hg extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,Hg.prototype)}}function y4(t){let e;return{promise:new Promise((n,i)=>{let s=!1;function o(){s||(s=!0,i(new Hg("This operation was aborted.")),a.unsubscribe())}const a=t.subscribe({next(l){s=!0,n(l),o()},error(l){s=!0,i(l),o()},complete(){s=!0,o()}});e=o}),abort:e}}function BA(t){return vf(e=>{function r(i=0,s=t.op){const o=t.links[i];if(!o)throw new Error("No more links to execute - did you forget to add an ending link?");return o({op:s,next(l){return r(i+1,l)}})}return r().subscribe(e)})}function mw(t){return Array.isArray(t)?t:[t]}function Od(t){return e=>{const r=mw(t.true).map(i=>i(e)),n=mw(t.false).map(i=>i(e));return i=>vf(s=>{const o=t.condition(i.op)?r:n;return BA({op:i.op,links:o}).subscribe(s)})}}function FA(t){const e=Object.create(null);for(const r in t){const n=t[r];e[n]=r}return e}const UA={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};FA(UA);FA(UA);const zA=()=>{};function jA(t,e){return new Proxy(zA,{get(n,i){if(!(typeof i!="string"||i==="then"))return jA(t,[...e,i])},apply(n,i,s){const o=e[e.length-1]==="apply";return t({args:o?s.length>=2?s[1]:[]:s,path:o?e.slice(0,-1):e})}})}const v4=t=>jA(t,[]),w4=t=>new Proxy(zA,{get(e,r){if(!(typeof r!="string"||r==="then"))return t(r)}});function S4(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}class b4 extends Error{}function _4(t){if(t instanceof Error)return t;const e=typeof t;if(!(e==="undefined"||e==="function"||t===null)){if(e!=="object")return new Error(String(t));if(S4(t)){const r=new b4;for(const n in t)r[n]=t[n];return r}}}function wc(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}function C4(t,e){if("error"in t){const n=e.transformer.deserialize(t.error);return{ok:!1,error:{...t,error:n}}}return{ok:!0,result:{...t.result,...(!t.result.type||t.result.type==="data")&&{type:"data",data:e.transformer.deserialize(t.result.data)}}}}class xd extends Error{constructor(){super("Unable to transform response from server")}}function WA(t,e){let r;try{r=C4(t,e)}catch{throw new xd}if(!r.ok&&(!wc(r.error.error)||typeof r.error.error.code!="number"))throw new xd;if(r.ok&&!wc(r.result))throw new xd;return r}function A4(t){return t instanceof Qt||t instanceof Error&&t.name==="TRPCClientError"}function E4(t){return wc(t)&&wc(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}class Qt extends Error{static from(e,r={}){const n=e;return A4(n)?(r.meta&&(n.meta={...n.meta,...r.meta}),n):E4(n)?new Qt(n.error.message,{...r,result:n}):n instanceof Error?new Qt(n.message,{...r,cause:_4(n)}):new Qt("Unknown error",{...r,cause:n})}constructor(e,r){var i,s;const n=r==null?void 0:r.cause;super(e,{cause:n}),this.meta=r==null?void 0:r.meta,this.cause=n,this.shape=(i=r==null?void 0:r.result)==null?void 0:i.error,this.data=(s=r==null?void 0:r.result)==null?void 0:s.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,Qt.prototype)}}const gw=t=>typeof t=="function";function O4(t){if(t)return t;if(typeof window<"u"&&gw(window.fetch))return window.fetch;if(typeof globalThis<"u"&&gw(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}function x4(t){return t||(typeof window<"u"&&window.AbortController?window.AbortController:typeof globalThis<"u"&&globalThis.AbortController?globalThis.AbortController:null)}function HA(t){return{url:t.url.toString().replace(/\/$/,""),fetch:t.fetch,AbortController:x4(t.AbortController)}}function I4(t){const e={};for(let r=0;rt.runtime.transformer.serialize(e)))}const Gg=t=>{let e=t.url+"/"+t.path;const r=[];if("inputs"in t&&r.push("batch=1"),t.type==="query"){const n=GA(t);n!==void 0&&r.push(`input=${encodeURIComponent(JSON.stringify(n))}`)}return r.length&&(e+="?"+r.join("&")),e},KA=t=>{if(t.type==="query")return;const e=GA(t);return e!==void 0?JSON.stringify(e):void 0},R4=t=>M4({...t,contentTypeHeader:"application/json",getUrl:Gg,getBody:KA});async function YA(t,e){const r=t.getUrl(t),n=t.getBody(t),{type:i}=t,s=await t.headers();/* istanbul ignore if -- @preserve */if(i==="subscription")throw new Error("Subscriptions should use wsLink");const o={...t.contentTypeHeader?{"content-type":t.contentTypeHeader}:{},...t.batchModeHeader?{"trpc-batch-mode":t.batchModeHeader}:{},...s};return O4(t.fetch)(r,{method:k4[i],signal:e==null?void 0:e.signal,body:n,headers:o})}function M4(t){const e=t.AbortController?new t.AbortController:null,r={};let n=!1;return{promise:new Promise((o,a)=>{YA(t,e).then(l=>(r.response=l,n=!0,l.json())).then(l=>{r.responseJSON=l,o({json:l,meta:r})}).catch(l=>{n=!0,a(Qt.from(l,{meta:r}))})}),cancel:()=>{n||e==null||e.abort()}}}const Id=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function kd(t){let e=null,r=null;const n=()=>{clearTimeout(r),r=null,e=null};function i(a){var c,f;const l=[[]];let u=0;for(;;){const d=a[u];if(!d)break;const p=l[l.length-1];if(d.aborted){(c=d.reject)==null||c.call(d,new Error("Aborted")),u++;continue}if(t.validate(p.concat(d).map(h=>h.key))){p.push(d),u++;continue}if(p.length===0){(f=d.reject)==null||f.call(d,new Error("Input is too big for a single dispatch")),u++;continue}l.push([])}return l}function s(){const a=i(e);n();for(const l of a){if(!l.length)continue;const u={items:l,cancel:Id};for(const p of l)p.batch=u;const c=(p,m)=>{var v;const h=u.items[p];(v=h.resolve)==null||v.call(h,m),h.batch=null,h.reject=null,h.resolve=null},{promise:f,cancel:d}=t.fetch(u.items.map(p=>p.key),c);u.cancel=d,f.then(p=>{var m;for(let h=0;h{var m;for(const h of u.items)(m=h.reject)==null||m.call(h,p),h.batch=null})}}function o(a){const l={aborted:!1,key:a,batch:null,resolve:Id,reject:Id},u=new Promise((f,d)=>{l.reject=d,l.resolve=f,e||(e=[]),e.push(l)});return r||(r=setTimeout(s)),{promise:u,cancel:()=>{var f;l.aborted=!0,(f=l.batch)!=null&&f.items.every(d=>d.aborted)&&(l.batch.cancel(),l.batch=null)}}}return{load:o}}function T4(t){return function(r){const n=HA(r),i=r.maxURLLength??1/0;return s=>{const o=f=>{const d=m=>{if(i===1/0)return!0;const h=m.map(g=>g.path).join(","),v=m.map(g=>g.input);return Gg({...n,runtime:s,type:f,path:h,inputs:v}).length<=i},p=t({...n,runtime:s,type:f,opts:r});return{validate:d,fetch:p}},a=kd(o("query")),l=kd(o("mutation")),u=kd(o("subscription")),c={query:a,subscription:u,mutation:l};return({op:f})=>vf(d=>{const p=c[f.type],{promise:m,cancel:h}=p.load(f);let v;return m.then(w=>{v=w;const g=WA(w.json,s);if(!g.ok){d.error(Qt.from(g.error,{meta:w.meta}));return}d.next({context:w.meta,result:g.result}),d.complete()}).catch(w=>{d.error(Qt.from(w,{meta:v==null?void 0:v.meta}))}),()=>{h()}})}}}function P4(t){return e=>{const r=HA(e);return n=>({op:i})=>vf(s=>{const{path:o,input:a,type:l}=i,{promise:u,cancel:c}=t.requester({...r,runtime:n,type:l,path:o,input:a,headers(){return e.headers?typeof e.headers=="function"?e.headers({op:i}):e.headers:{}}});let f;return u.then(d=>{f=d.meta;const p=WA(d.json,n);if(!p.ok){s.error(Qt.from(p.error,{meta:f}));return}s.next({context:d.meta,result:p.result}),s.complete()}).catch(d=>{s.error(Qt.from(d,{meta:f}))}),()=>{c()}})}}const yw=P4({requester:R4});class V4{$request({type:e,input:r,path:n,context:i={}}){return BA({links:this.links,op:{id:++this.requestId,type:e,path:n,input:r,context:i}}).pipe(g4())}requestAsPromise(e){const r=this.$request(e),{promise:n,abort:i}=y4(r);return new Promise((o,a)=>{var l;(l=e.signal)==null||l.addEventListener("abort",i),n.then(u=>{o(u.result.data)}).catch(u=>{a(Qt.from(u))})})}query(e,r,n){return this.requestAsPromise({type:"query",path:e,input:r,context:n==null?void 0:n.context,signal:n==null?void 0:n.signal})}mutation(e,r,n){return this.requestAsPromise({type:"mutation",path:e,input:r,context:n==null?void 0:n.context,signal:n==null?void 0:n.signal})}subscription(e,r,n){return this.$request({type:"subscription",path:e,input:r,context:n==null?void 0:n.context}).subscribe({next(s){var o,a,l;s.result.type==="started"?(o=n.onStarted)==null||o.call(n):s.result.type==="stopped"?(a=n.onStopped)==null||a.call(n):(l=n.onData)==null||l.call(n,s.result.data)},error(s){var o;(o=n.onError)==null||o.call(n,s)},complete(){var s;(s=n.onComplete)==null||s.call(n)}})}constructor(e){this.requestId=0;const r=(()=>{const n=e.transformer;return n?"input"in n?e.transformer:{input:n,output:n}:{input:{serialize:i=>i,deserialize:i=>i},output:{serialize:i=>i,deserialize:i=>i}}})();this.runtime={transformer:{serialize:n=>r.input.serialize(n),deserialize:n=>r.output.deserialize(n)},combinedTransformer:r},this.links=e.links.map(n=>n(this.runtime))}}const N4={query:"query",mutate:"mutation",subscribe:"subscription"},D4=t=>N4[t];function L4(t){return w4(e=>t.hasOwnProperty(e)?t[e]:e==="__untypedClient"?t:v4(({path:r,args:n})=>{const i=[e,...r],s=D4(i.pop()),o=i.join(".");return t[s](o,...n)}))}function $4(t){const e=new V4(t);return L4(e)}function B4(t){if(t)return t;if(typeof window<"u"&&window.TextDecoder)return new window.TextDecoder;if(typeof globalThis<"u"&&globalThis.TextDecoder)return new globalThis.TextDecoder;throw new Error("No TextDecoder implementation found")}async function F4(t){const e=t.parse??JSON.parse,r=n=>{var a;if((a=t.signal)!=null&&a.aborted||!n||n==="}")return;const i=n.indexOf(":"),s=n.substring(2,i-1),o=n.substring(i+1);t.onSingle(Number(s),e(o))};await U4(t.readableStream,r,t.textDecoder)}async function U4(t,e,r){let n="";const i=s=>{const a=r.decode(s).split(` `);if(a.length===1)n+=a[0];else if(a.length>1){e(n+a[0]);for(let l=1;l{t.on("data",e),t.on("end",r)})}async function j4(t,e){const r=t.getReader();let n=await r.read();for(;!n.done;)e(n.value),n=await r.read()}const W4=(t,e)=>{const r=t.AbortController?new t.AbortController:null,n=YA({...t,contentTypeHeader:"application/json",batchModeHeader:"stream",getUrl:Gg,getBody:KA},r),i=()=>r==null?void 0:r.abort(),s=n.then(async o=>{if(!o.body)throw new Error("Received response without body");const a={response:o};return F4({readableStream:o.body,onSingle:e,parse:l=>({json:JSON.parse(l),meta:a}),signal:r==null?void 0:r.signal,textDecoder:t.textDecoder})});return{cancel:i,promise:s}},H4=t=>{const e=B4(t.opts.textDecoder);return(r,n)=>{const i=r.map(l=>l.path).join(","),s=r.map(l=>l.input),{cancel:o,promise:a}=W4({...t,textDecoder:e,path:i,inputs:s,headers(){return t.opts.headers?typeof t.opts.headers=="function"?t.opts.headers({opList:r}):t.opts.headers:{}}},(l,u)=>{n(l,u)});return{promise:a.then(()=>[]),cancel:o}}},vw=T4(H4);var G4=function(){function t(){this.keyToValue=new Map,this.valueToKey=new Map}return t.prototype.set=function(e,r){this.keyToValue.set(e,r),this.valueToKey.set(r,e)},t.prototype.getByKey=function(e){return this.keyToValue.get(e)},t.prototype.getByValue=function(e){return this.valueToKey.get(e)},t.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},t}(),XA=function(){function t(e){this.generateIdentifier=e,this.kv=new G4}return t.prototype.register=function(e,r){this.kv.getByValue(e)||(r||(r=this.generateIdentifier(e)),this.kv.set(r,e))},t.prototype.clear=function(){this.kv.clear()},t.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},t.prototype.getValue=function(e){return this.kv.getByKey(e)},t}(),K4=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Y4=function(t){K4(e,t);function e(){var r=t.call(this,function(n){return n.name})||this;return r.classToAllowedProps=new Map,r}return e.prototype.register=function(r,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(r,n.allowProps),t.prototype.register.call(this,r,n.identifier)):t.prototype.register.call(this,r,n)},e.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},e}(XA),X4=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function q4(t){if("values"in Object)return Object.values(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(t[r]);return e}function Q4(t,e){var r=q4(t);if("find"in r)return r.find(e);for(var n=r,i=0;i"u"},eF=function(t){return t===null},Aa=function(t){return typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype},kp=function(t){return Aa(t)&&Object.keys(t).length===0},Wn=function(t){return Array.isArray(t)},tF=function(t){return typeof t=="string"},rF=function(t){return typeof t=="number"&&!isNaN(t)},nF=function(t){return typeof t=="boolean"},iF=function(t){return t instanceof RegExp},Ea=function(t){return t instanceof Map},Oa=function(t){return t instanceof Set},QA=function(t){return Z4(t)==="Symbol"},sF=function(t){return t instanceof Date&&!isNaN(t.valueOf())},oF=function(t){return t instanceof Error},Sw=function(t){return typeof t=="number"&&isNaN(t)},aF=function(t){return nF(t)||eF(t)||qA(t)||rF(t)||tF(t)||QA(t)},lF=function(t){return typeof t=="bigint"},uF=function(t){return t===1/0||t===-1/0},cF=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},fF=function(t){return t instanceof URL},JA=function(t){return t.replace(/\./g,"\\.")},Rd=function(t){return t.map(String).map(JA).join(".")},jo=function(t){for(var e=[],r="",n=0;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Tp=function(t,e){for(var r=0,n=e.length,i=t.length;r0?"Infinity":"-Infinity"},Number),Or(function(t){return t===0&&1/t===-1/0},"number",function(){return"-0"},Number),Or(fF,"URL",function(t){return t.toString()},function(t){return new URL(t)})];function wf(t,e,r,n){return{isApplicable:t,annotation:e,transform:r,untransform:n}}var eE=wf(function(t,e){if(QA(t)){var r=!!e.symbolRegistry.getIdentifier(t);return r}return!1},function(t,e){var r=e.symbolRegistry.getIdentifier(t);return["symbol",r]},function(t){return t.description},function(t,e,r){var n=r.symbolRegistry.getValue(e[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),dF=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(t,e){return t[e.name]=e,t},{}),tE=wf(cF,function(t){return["typed-array",t.constructor.name]},function(t){return Tp([],Mp(t))},function(t,e){var r=dF[e[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(t)});function rE(t,e){if(t!=null&&t.constructor){var r=!!e.classRegistry.getIdentifier(t.constructor);return r}return!1}var nE=wf(rE,function(t,e){var r=e.classRegistry.getIdentifier(t.constructor);return["class",r]},function(t,e){var r=e.classRegistry.getAllowedProps(t.constructor);if(!r)return Rp({},t);var n={};return r.forEach(function(i){n[i]=t[i]}),n},function(t,e,r){var n=r.classRegistry.getValue(e[1]);if(!n)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(n.prototype),t)}),iE=wf(function(t,e){return!!e.customTransformerRegistry.findApplicable(t)},function(t,e){var r=e.customTransformerRegistry.findApplicable(t);return["custom",r.name]},function(t,e){var r=e.customTransformerRegistry.findApplicable(t);return r.serialize(t)},function(t,e,r){var n=r.customTransformerRegistry.findByName(e[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(t)}),hF=[nE,eE,iE,tE],bw=function(t,e){var r=ww(hF,function(i){return i.isApplicable(t,e)});if(r)return{value:r.transform(t,e),type:r.annotation(t,e)};var n=ww(ZA,function(i){return i.isApplicable(t,e)});if(n)return{value:n.transform(t,e),type:n.annotation}},sE={};ZA.forEach(function(t){sE[t.annotation]=t});var pF=function(t,e,r){if(Wn(e))switch(e[0]){case"symbol":return eE.untransform(t,e,r);case"class":return nE.untransform(t,e,r);case"custom":return iE.untransform(t,e,r);case"typed-array":return tE.untransform(t,e,r);default:throw new Error("Unknown transformation: "+e)}else{var n=sE[e];if(!n)throw new Error("Unknown transformation: "+e);return n.untransform(t,r)}},hs=function(t,e){for(var r=t.keys();e>0;)r.next(),e--;return r.next().value};function oE(t){if(yu(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(yu(t,"prototype"))throw new Error("prototype is not allowed as a property");if(yu(t,"constructor"))throw new Error("constructor is not allowed as a property")}var mF=function(t,e){oE(e);for(var r=0;r0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Rn=function(t,e){for(var r=0,n=e.length,i=t.length;rNp(i,e));if(!bF(t))return t;const r=Object.getOwnPropertyNames(t),n=Object.getOwnPropertySymbols(t);return[...r,...n].reduce((i,s)=>{if(_w(e.props)&&!e.props.includes(s))return i;const o=t[s],a=Np(o,e);return _F(i,s,a,t,e.nonenumerable),i},{})}var si=function(){return si=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},AF=function(t,e){for(var r=0,n=e.length,i=t.length;rfetch(t,{...e,credentials:"include"}),EF=t=>({links:[Od({condition:e=>e.context.batch===!0,true:Od({condition:e=>e.context.target==="session-server",true:vw({url:Qg,fetch:Wl,headers:async({opList:e})=>{var s,o,a;const r=t!=null&&t.headers?await((s=t==null?void 0:t.headers)==null?void 0:s.call(t)):{},n=((a=(o=e==null?void 0:e[0])==null?void 0:o.context)==null?void 0:a.headers)||{};return{...r,...n}},maxURLLength:4092}),false:vw({url:qg,fetch:Wl,headers:async({opList:e})=>{var s,o,a;const r=t!=null&&t.headers?await((s=t==null?void 0:t.headers)==null?void 0:s.call(t)):{},n=((a=(o=e==null?void 0:e[0])==null?void 0:o.context)==null?void 0:a.headers)||{};return{...r,...n,"X-Warmly-Target":"session-server"}},maxURLLength:4092})}),false:Od({condition:e=>e.context.target==="session-server",true:yw({url:Qg,fetch:Wl,headers:async({op:e})=>{var s,o;const r=t!=null&&t.headers?await((s=t==null?void 0:t.headers)==null?void 0:s.call(t)):{},n=((o=e.context)==null?void 0:o.headers)||{};return{...r,...n,"X-Warmly-Target":"session-server"}}}),false:yw({url:qg,fetch:Wl,headers:async({op:e})=>{var s,o;const r=t!=null&&t.headers?await((s=t==null?void 0:t.headers)==null?void 0:s.call(t)):{},n=((o=e.context)==null?void 0:o.headers)||{};return{...r,...n}}})})})],transformer:mn}),OF=t=>$4(EF(t)),xF=()=>{const{sessionId:t,userIdentifier:e,sessionSource:r}=JSON.parse(localStorage.getItem("ClientSessionStore")||"{}");return{...e&&{[Hh]:e},...t&&{[P_]:t},...r&&{[hD]:r},...window.warmly_fingerprint&&{[V_]:window.warmly_fingerprint},[N_]:Lp,...D_()}},Mr=OF({headers:xF}),IF=t=>`${Math.round(t/60)}m`;let Cw=!1;const kF=t=>{if(vu!=="production"){fe.warn(`Not setting up contact pixel because environment is ${vu}`);return}if(Cw)return;Cw=!0;const e=document.createElement("script");e.type="text/javascript";const r=encodeURIComponent(` https://api.immagnify.com/v1/integrations/fxf/webhook/khlFEhkHvc?hem=\${HEM_SHA256_LOWERCASE}&up_id=\${UP_ID}&puid=${t}&ip=\${IP} `);e.src=`https://a.usbrowserspeed.com/cs?pid=4dd5c5fae59ce3249cf6f13469fbc883b27c8135ce5092e6a3b38092dc07d387&puid=${t}&r=${r}`,document.head.append(e),Mr.sessions.trackScriptAdded.mutate({sessionId:t,type:"warmly"},{context:{target:"session-server"}})};let Aw=!1;const RF=t=>{if(Aw)return;Aw=!0;const e=document.createElement("script");e.type="text/javascript",e.src="https://d-code.liadm.com/did-008f.min.js",e.onload=function(){var r;(r=window.liQd_did_008f)==null||r.resolve(function(n){if(n){const i={...n,sessionId:t,sourceUrl:window.location.href,sourceDomain:window.location.hostname};Mr.sessions.captureLiveIntent.mutate({payload:i},{context:{target:"session-server"}})}},function(n){fe.error(n)},{resolve:["md5","sha2","age","gender"]})},document.head.append(e)},MF=async({createdSession:t,eventHandlers:e})=>{let n=!1,i=0,s=0,o=!1;const a=mD({path:zs.SOCKET_IO,query:{...d2(t,["sessionId","sessionUserId"]),widgetVersion:Lp},autoConnect:!0,reconnectionDelayMax:3e4,reconnectionAttempts:10,transports:["websocket","polling"]});return a.on("connect",()=>{o||(o=!0,Object.entries(e).forEach(([l,u])=>{const c=l.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`).replace("on-","");["session-joined","session-ended"].includes(c)||a.on(c,u)}),a.on("session-joined",({initialized:l,roomSize:u})=>{if(n=l,e.onSetRoomSize(u),n||(a.emit("client-socket-connected"),Vt.takeFullSnapshot(),i))return;const c=()=>{n||s>15?(clearInterval(i),i=0,s=0):(Vt.takeFullSnapshot(),s=s+1)};c(),i=window.setInterval(()=>c(),3e3)}),a.on("session-ended",l=>{a.disconnect(),e.onSessionEnded(l)}),a.on("disconnect",async()=>{try{(await Mr.sessions.getSessionStatus.mutate({sessionId:t.sessionId},{context:{target:"session-server"}})).includes("closed")&&a.disconnect()}catch(l){fe.error("getSessionStatus Error",l),a.disconnect()}}))}),a.on("connect_error",()=>a.io.opts.transports=["polling","websocket"]),a};let Ew=!1;const TF=[z.MouseMove,z.MouseInteraction,z.Scroll,z.ViewportResize,z.Input,z.TouchMove,z.Drag,z.Selection],He={recordSessionState:{loading:!1},updateHubspotUserTokenState:{loading:!1},sessionId:void 0,sessionSource:void 0,createdSession:void 0,prompts:{promptForVideo:!1},roomSize:0,initialKeepAliveSent:!1,currentActivityTimer:0,widgetRootUrl:void 0,inboundSettings:{inboundEnabled:!1,customPrivacyPolicyEnabled:!1,inboundCalendarUrl:void 0,inboundCustomSettings:void 0,inboundVideoGreetingEnabled:!1,videoGreetingDefaultUrl:void 0,privacyPolicyUrl:void 0,initialPrivacyPolicyMessage:void 0,shortenedPrivacyPolicyMessage:void 0},agentHasTurnedOnAudioOrVideo:!1,sessionTerminated:!1,recreatingSession:!1,reconnectionState:void 0,inactivityTimeout:void 0,hideVisitorsReplay:!1,workflowId:void 0};class PF extends FB{constructor(){super({type:"client",getWarmlyWidgetIdHeader:()=>({...this.userIdentifier&&{[Hh]:this.userIdentifier},...this.sessionId&&{[P_]:this.sessionId},...window.warmly_fingerprint&&{[V_]:window.warmly_fingerprint},[N_]:Lp})});S(this,"recordSessionState",He.recordSessionState);S(this,"updateHubspotUserTokenState",He.updateHubspotUserTokenState);S(this,"sessionId",He.sessionId);S(this,"sessionSource",He.sessionSource);S(this,"createdSession",He.createdSession);S(this,"agent",He.agent);S(this,"prompts",He.prompts);S(this,"roomSize",He.roomSize);S(this,"initialKeepAliveSent",He.initialKeepAliveSent);S(this,"currentActivityTimer",He.currentActivityTimer);S(this,"inboundSettings",He.inboundSettings);S(this,"agentHasTurnedOnAudioOrVideo",He.agentHasTurnedOnAudioOrVideo);S(this,"sessionTerminated",He.sessionTerminated);S(this,"recreatingSession",He.recreatingSession);S(this,"reconnectionState",He.reconnectionState);S(this,"inactivityTimeout",He.inactivityTimeout);S(this,"hideVisitorsReplay",He.hideVisitorsReplay);S(this,"widgetRootUrl",d4());S(this,"getMessages",Ad(r=>Mr.chat.getMessages.query(r,{context:{target:"session-server"}}),{getState:()=>this.getMessagesState,onSuccess:r=>this.processChatMessages(r||[])}));S(this,"hexToRgb",r=>{const n=parseInt(r.slice(1,3),16),i=parseInt(r.slice(3,5),16),s=parseInt(r.slice(5,7),16);return{r:n,g:i,b:s}});S(this,"setAgent",r=>this.agent=r);S(this,"setPrompts",r=>this.prompts={...this.prompts,...r});S(this,"setAgentHasTurnedOnAudioOrVideo",r=>this.agentHasTurnedOnAudioOrVideo=r);S(this,"onSessionTerminated",()=>this.sessionTerminated=!0);S(this,"processEvent",r=>{var s,o;if(new URLSearchParams(window.location.search).get("log_events")&&fe.info("processing event",r),this.recordSessionState.loading||this.recreatingSession)return;if(this.sessionTerminated&&(fe.info(`Session terminated, recreating session ${this.sessionId}`,`event: ${JSON.stringify(r)}`),this.recreatingSession=!0,this.recordSession()),this.roomSize>0&&u4(r)&&!this.hideVisitorsReplay&&((s=H.socket)==null||s.emit("screen-event",r)),r.type===q.IncrementalSnapshot&&TF.includes(r.data.source))if(this.initialKeepAliveSent){this.currentActivityTimer||(this.currentActivityTimer=Date.now());const a=(o=this.createdSession)==null?void 0:o.createdAt,l=a?new Date>=new Date(a.getTime()+60*60*1e3):!1;this.trackActivityTimestamp(),this.keepSessionAlive(l?{event:r}:void 0)}else this.emitKeepAlive(),this.initialKeepAliveSent=!0});S(this,"sendWorkflowReply",(r,n,i)=>{var s;(s=H.socket)==null||s.emit("inbound-workflow-reply",{workflowStepId:r,answer:n,messageId:i})});S(this,"sendChatMessage",(r,n)=>{var o;if(!this.sessionId)return;const i=n||"text",s=new Date;return(o=H.socket)==null||o.emit("chat-message-sent",{content:r,sessionId:this.sessionId,type:i,agentType:"human",messageOrigin:"visitor"}),this.sendMessage({content:r,createdAt:s,type:i,sessionId:this.sessionId,agentType:"human"})});S(this,"updateHubspotUserToken",Ad(Mr.sessions.updateHubspotUserToken.mutate,{getState:()=>this.updateHubspotUserTokenState}));S(this,"recordSession",Ad(()=>{const r=new URLSearchParams(window.location.search);return Mr.sessions.createSession.mutate({clientId:Ye.clientId,utmIdentifier:r.get("w_id")||void 0,utmEmail:r.get("w_email")||void 0,recreatingSession:this.recreatingSession},{context:{target:"session-server",headers:{[Hh]:this.userIdentifier}}})},{getState:()=>this.recordSessionState,onError:r=>{fe.error(r)},onSuccess:async r=>{const n=r;let i;if(!n){fe.error("No Session Created");return}n.config.rb2bScriptId,n.config.addContactScript&&kF(n.sessionId),n.config.addLiveIntentScript&&RF(n.sessionId),this.createdSession=n;const{sessionId:s,sessionUserId:o,config:a,inboundSettings:l}=n;this.sessionId=s,this.sessionSource=n.source,Ye.setSessionId(s),this.userIdentifier=o,this.inboundSettings=l,this.sessionTerminated=!1,this.recreatingSession=!1,this.hideVisitorsReplay=a.hideVisitorsReplay;const u={onSessionEnded:this.onSessionEnded,onClientP2pNegotiation:this.onClientP2pNegotiation,onChatMessagesEnriched:this.onChatMessagesEnriched,onRemoteTypingStateChanged:this.onRemoteTypingStateChanged,onPeerConnectionEstablished:this.onPeerConnectionEstablished,onPeerConnectionEnded:this.onPeerConnectionEnded,onAgentPrompt:this.onAgentPrompt,onSetRoomSize:this.onSetRoomSize,onConversationRequest:this.onConversationRequest,onEndConversation:this.onEndConversation,onTestEvent:()=>null,onServerReady:({roomSize:c})=>{this.onSetRoomSize(c),H.setServerReady(!0),i==null||i.emit("client-socket-connected"),Ew?Vt.takeFullSnapshot():(Ew=!0,Vt(hw({config:a,emit:this.processEvent})))}};this.isLightweightSession?Vt(hw({config:a,emit:this.processEvent})):(this.getMessages({sessionId:this.sessionId}),i=await MF({createdSession:n,eventHandlers:u}),H.socket&&H.socket.emit("expire-socket"),H.setSocket(i)),this.trackActivityTimestamp()}}));S(this,"keepSessionAlive",i2(D(r=>{this.emitKeepAlive({...r,activeSeconds:Math.round((Date.now()-this.currentActivityTimer-3500)/1e3)}),this.currentActivityTimer=0}),3500));S(this,"emitKeepAlive",r=>{var i;const n=(r==null?void 0:r.activeSeconds)||0;if(!this.isLightweightSession)return(i=H.socket)==null?void 0:i.emit("keep-alive",n?{...r,activeSeconds:n}:void 0);this.sessionId&&Mr.sessions.keepAlive.mutate({sessionId:this.sessionId,activeSeconds:n},{context:{target:"session-server"}}),this.trackActivityTimestamp()});S(this,"trackActivityTimestamp",()=>{this.inactivityTimeout&&clearTimeout(this.inactivityTimeout);const r=setTimeout(()=>{var n,i;(n=this.createdSession)!=null&&n.sessionId&&(fe.info(`No activity recorded for ${IF(pw/1e3)}, terminating session`),Mr.sessions.endSession.mutate({sessionId:(i=this.createdSession)==null?void 0:i.sessionId},{context:{target:"session-server"}}),this.onSessionTerminated())},pw);this.inactivityTimeout=r});S(this,"onRemoteTypingStateChanged",({isTyping:r,origin:n})=>{this.setRemoteIsTyping(r),this.setTypingOrigin(n)});S(this,"onSetRoomSize",r=>this.roomSize=r);S(this,"onPeerConnectionEstablished",this.setAgent);S(this,"onAgentPrompt",this.setPrompts);S(this,"onPeerConnectionEnded",this.webRtcStore.closeWebRtcConnection);S(this,"onChatMessagesEnriched",this.processChatMessages);S(this,"onSessionEnded",this.onSessionTerminated);S(this,"onClientP2pNegotiation",r=>this.webRtcStore.handleP2PNegotiation({message:r,userIdentifier:this.userIdentifier}));S(this,"onEndConversation",()=>{this.setSessionIdEngagedInConversation(void 0),this.setRemoteUser(void 0)});S(this,"onConversationRequest",({remoteUser:r,reconnectionState:n})=>{var i;(i=H.socket)==null||i.emit("conversation-request-received",{agentId:r.id}),this.setSessionIdEngagedInConversation(this.sessionId),this.setRemoteUser(r),this.reconnectionState=n});Ua(this,{recordSessionState:L,updateHubspotUserTokenState:L,sessionId:L,createdSession:L,agent:L,prompts:L,roomSize:L,initialKeepAliveSent:L,currentActivityTimer:L,inboundSettings:L,agentHasTurnedOnAudioOrVideo:L,sessionTerminated:L,recreatingSession:L,reconnectionState:L,inactivityTimeout:L,widgetRootUrl:L,setAgent:D,setPrompts:D,setAgentHasTurnedOnAudioOrVideo:D,onSessionTerminated:D,processEvent:D,sendChatMessage:D,updateHubspotUserToken:D,recordSession:D,keepSessionAlive:D,emitKeepAlive:D,trackActivityTimestamp:D,onRemoteTypingStateChanged:D,onSetRoomSize:D,onPeerConnectionEstablished:D,onAgentPrompt:D,onPeerConnectionEnded:D,onChatMessagesEnriched:D,onSessionEnded:D,onClientP2pNegotiation:D,onEndConversation:D,onConversationRequest:D,config:Je,shouldDisplayFab:Je,hasInteractedWithAgent:Je,videoGreetingUrl:Je,videoGreetingType:Je,isAgentOnline:Je,isLightweightSession:Je,recentMessages:Je,receiveMessage:gv,resetState:gv}),Zm(this,{name:"ClientSessionStore",properties:["sessionId","userIdentifier","sessionSource","sessionIdEngagedByWorkflow"],storage:window.localStorage}),document.addEventListener("visibilitychange",()=>{var n;return(n=H.socket)==null?void 0:n.emit("tab-active-change",{isActive:document.visibilityState==="visible"})}),window.addEventListener("beforeunload",()=>{if(!this.isLightweightSession)return;const n=new Blob([JSON.stringify({sessionId:this.sessionId})],{type:"application/json; charset=UTF-8"});this.sessionId&&navigator.sendBeacon(_E+bE.END_SESSION,n)})}get config(){var r;return(r=this.createdSession)==null?void 0:r.config}get isEngagedByWorkflow(){return!!this.sessionId&&this.sessionIdEngagedByWorkflow===this.sessionId}get isEngagedInConversation(){return!!this.sessionId&&this.sessionIdEngagedInConversation===this.sessionId}get shouldDisplayFab(){return this.isEngagedInConversation||this.isEngagedByWorkflow}get hasInteractedWithAgent(){const r=typeof this.initialMessagesCount<"u"&&this.sortedReceivedMessages.length;return this.agentHasTurnedOnAudioOrVideo||r}get videoGreetingUrl(){var r;return((r=this.agent)==null?void 0:r.videoGreetingPersonalUrl)||this.inboundSettings.videoGreetingDefaultUrl}get videoGreetingType(){var r;return(r=this.agent)!=null&&r.videoGreetingPersonalUrl?"personal":"default"}get isAgentOnline(){return!!this.agent}get isLightweightSession(){var r;return((r=this.createdSession)==null?void 0:r.type)==="lightweight"}get recentMessages(){return[...this.receivedMessages.map(r=>({...r,origin:"other"}))].filter(r=>r.sessionId===this.sessionId).sort((r,n)=>r.createdAt.getTime()-n.createdAt.getTime()).slice(-3)}get privacyPolicyUrl(){return this.inboundSettings.customPrivacyPolicyEnabled&&this.inboundSettings.privacyPolicyUrl||Xg.PRIVACY_POLICY}get customPrivacyPolicyEnabled(){return this.inboundSettings.customPrivacyPolicyEnabled}get initialPrivacyPolicyMessage(){return this.inboundSettings.initialPrivacyPolicyMessage||"Privacy Policy"}get shortenedPrivacyPolicyMessage(){return this.inboundSettings.shortenedPrivacyPolicyMessage||"Privacy Policy"}get inboundCustomSettings(){return this.inboundSettings.inboundCustomSettings}get inboundVideoGreetingEnabled(){return this.inboundSettings.inboundVideoGreetingEnabled}get customBackgroundStyle(){var n,i;const r=(i=(n=this.inboundCustomSettings)==null?void 0:n.colors)==null?void 0:i.find(s=>s.type==="primary");return r?{backgroundColor:r.color,opacity:r.opacity,"&:hover":{backgroundColor:r.color}}:{}}get customOutlinedStyle(){var a,l;const r=(l=(a=this.inboundCustomSettings)==null?void 0:a.colors)==null?void 0:l.find(u=>u.type==="primary");if(!r)return{};const{r:n,g:i,b:s}=this.hexToRgb(r==null?void 0:r.color),o=`rgba(${n}, ${i}, ${s}, 0.1)`;return{color:r.color,borderColor:r.color,"&:hover":{color:r.color,backgroundColor:o,borderColor:r.color}}}get customBorderStyle(){var n,i;const r=(i=(n=this.inboundCustomSettings)==null?void 0:n.colors)==null?void 0:i.find(s=>s.type==="primary");return r?{borderColor:r.color,"&:hover":{borderColor:r.color}}:{}}get customForegroundStyle(){var n,i;const r=(i=(n=this.inboundCustomSettings)==null?void 0:n.colors)==null?void 0:i.find(s=>s.type==="primary");return r?{color:r.color,"&:hover":{color:r.color}}:{}}receiveMessage(r){Ye.setLightweightPanelDismissed(!1),super.receiveMessage(r)}resetState(){Object.entries(He).forEach(([r,n])=>this[r]=n),super.resetState()}}const B=new PF;$e(()=>B.webRtcStore.mediaStore.remoteVideoOn||B.webRtcStore.mediaStore.remoteMicOn,t=>{t&&(B.setAgentHasTurnedOnAudioOrVideo(!0),Ye.setLightweightPanelDismissed(!1))});$e(()=>B.webRtcStore.mediaStore.videoOn,t=>t&&B.setPrompts({promptForVideo:!1}));$e(()=>({isEngagedInConversation:B.isEngagedInConversation,reconnectionState:B.reconnectionState,isP2PConnected:B.webRtcStore.isP2PConnected}),async({isEngagedInConversation:t,reconnectionState:e,isP2PConnected:r})=>{!t||!e||!r||setTimeout(async()=>{const{videoOn:n,micOn:i}=B.webRtcStore.mediaStore,{videoOn:s,micOn:o}=e;s&&!n&&await B.toggleVideo(),o&&!i&&await B.toggleAudio()},1500)});$e(()=>B.isEngagedInConversation,t=>{t?Ye.setIsConnecting(!1):(B.setAgent(void 0),B.setPrompts(He.prompts))});$e(()=>({messages:B.sortedReceivedMessages,lastMessageId:B.webRtcStore.mediaStore.lastPlayedMessageId}),({messages:t,lastMessageId:e})=>{const r=t.filter(s=>s.sessionId===B.sessionId);if(r.length<1)return;const n=r[r.length-1];if(!n.id||n.id===e){const s=Ep(n.content);s!=null&&s.questionData&&!(s!=null&&s.existingAnswer)?B.setIsLastMessageQuestion(!0):B.setIsLastMessageQuestion(!1);return}if(n.from===B.userIdentifier)return;if(n.id&&B.webRtcStore.mediaStore.setLastPlayedMessageId(n.id),r.some(s=>s.sessionId===B.sessionId&&s.agentType==="workflow")&&B.setSessionIdEngagedByWorkflow(B.sessionId),B.setIsLastMessageQuestion(!1),n.agentType==="workflow"){const s=Ep(n.content);s!=null&&s.questionData&&B.setIsLastMessageQuestion(!0)}new Audio(h4(f4,B.widgetRootUrl)).play().catch(s=>fe.log("Error playing boop: ",s))});$e(()=>({messages:B.sortedReceivedMessages}),({messages:t})=>{const e=t.filter(n=>n.sessionId===B.sessionId),r=e[e.length-1];if(r!=null&&r.id&&r.from!==B.userIdentifier&&(e.some(n=>n.agentType==="workflow")&&B.setSessionIdEngagedByWorkflow(B.sessionId),B.setIsLastMessageQuestion(!1),r.agentType==="workflow")){const n=Ep(r.content);n!=null&&n.questionData&&!(n!=null&&n.existingAnswer)&&B.setIsLastMessageQuestion(!0)}});const VF={values:{xs:0,sm:600,md:960,lg:1280,xl:1840}},NF=em(),DF=NF.shadows,x={primary:"#6938EF",secondary:"#223354",success:"#039855",warning:"#DC6803",error:"#D92D20",info:"#33C2FF",black:"#223354",white:"#ffffff",primaryAlt:"#000C57",gray:"#faf7f9"},_={gradients:{blue1:"linear-gradient(135deg, #6B73FF 0%, #000DFF 100%)",blue2:"linear-gradient(135deg, #ABDCFF 0%, #0396FF 100%)",blue3:"linear-gradient(127.55deg, #141E30 3.73%, #243B55 92.26%)",blue4:"linear-gradient(-20deg, #2b5876 0%, #4e4376 100%)",blue5:"linear-gradient(135deg, #97ABFF 10%, #123597 100%)",orange1:"linear-gradient(135deg, #FCCF31 0%, #F55555 100%)",orange2:"linear-gradient(135deg, #FFD3A5 0%, #FD6585 100%)",orange3:"linear-gradient(120deg, #f6d365 0%, #fda085 100%)",purple1:"linear-gradient(135deg, #43CBFF 0%, #9708CC 100%)",purple3:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",pink1:"linear-gradient(135deg, #F6CEEC 0%, #D939CD 100%)",pink2:"linear-gradient(135deg, #F761A1 0%, #8C1BAB 100%)",green1:"linear-gradient(135deg, #FFF720 0%, #3CD500 100%)",green2:"linear-gradient(to bottom, #00b09b, #96c93d)",black1:"linear-gradient(100.66deg, #434343 6.56%, #000000 93.57%)",black2:"linear-gradient(60deg, #29323c 0%, #485563 100%)"},shadows:{success:"0px 1px 4px rgba(68, 214, 0, 0.25), 0px 3px 12px 2px rgba(68, 214, 0, 0.35)",error:"0px 1px 4px rgba(255, 25, 67, 0.25), 0px 3px 12px 2px rgba(255, 25, 67, 0.35)",info:"0px 1px 4px rgba(51, 194, 255, 0.25), 0px 3px 12px 2px rgba(51, 194, 255, 0.35)",primary:"0px 1px 4px rgba(85, 105, 255, 0.25), 0px 3px 12px 2px rgba(85, 105, 255, 0.35)",warning:"0px 1px 4px rgba(255, 163, 25, 0.25), 0px 3px 12px 2px rgba(255, 163, 25, 0.35)",card:"0px 9px 16px rgba(159, 162, 191, .18), 0px 2px 2px rgba(159, 162, 191, 0.32)",cardSm:"0px 2px 3px rgba(159, 162, 191, .18), 0px 1px 1px rgba(159, 162, 191, 0.32)",cardLg:"0 5rem 14rem 0 rgb(255 255 255 / 30%), 0 0.8rem 2.3rem rgb(0 0 0 / 60%), 0 0.2rem 0.3rem rgb(0 0 0 / 45%)"},layout:{general:{bodyBg:"#f2f5f9"},sidebar:{background:x.white,textColor:x.secondary,dividerBg:"rgba(145, 158, 171, 0.24)",menuItemColor:"#242E6F",menuItemColorActive:x.primary,menuItemBg:x.white,menuIconBgActive:"#f2f5f9",menuItemBgActive:Ne(x.primary,.85),menuItemIconColor:Ne(x.secondary,.3),menuItemIconColorActive:x.primary,menuItemHeadingColor:bt(x.secondary,.3)}},alpha:{white:{5:$(x.white,.02),10:$(x.white,.1),30:$(x.white,.3),50:$(x.white,.5),70:$(x.white,.7),100:x.white},trueWhite:{5:$(x.white,.02),10:$(x.white,.1),30:$(x.white,.3),50:$(x.white,.5),70:$(x.white,.7)},black:{5:$(x.black,.02),10:$(x.black,.1),30:$(x.black,.3),50:$(x.black,.5),70:$(x.black,.7),80:$(x.black,.8),90:$(x.black,.9),100:x.black},gray:{5:$(x.gray,.02),10:$(x.gray,.1),30:$(x.gray,.3),50:$(x.gray,.5),70:$(x.gray,.7)}},secondary:{lighter:Ne(x.secondary,.85),light:Ne(x.secondary,.25),main:x.secondary,dark:bt(x.secondary,.2)},primary:{lighter:Ne(x.primary,.85),light:Ne(x.primary,.3),main:x.primary,dark:bt(x.primary,.2)},success:{lighter:Ne(x.success,.85),light:Ne(x.success,.3),main:x.success,dark:bt(x.success,.2)},warning:{lighter:Ne(x.warning,.85),light:Ne(x.warning,.3),main:x.warning,dark:bt(x.warning,.2)},error:{lighter:Ne(x.error,.85),light:Ne(x.error,.3),main:x.error,dark:bt(x.error,.2)},info:{lighter:Ne(x.info,.85),light:Ne(x.info,.3),main:x.info,dark:bt(x.info,.2)}},uE=em({colors:{gradients:{blue1:_.gradients.blue1,blue2:_.gradients.blue2,blue3:_.gradients.blue3,blue4:_.gradients.blue4,blue5:_.gradients.blue5,orange1:_.gradients.orange1,orange2:_.gradients.orange2,orange3:_.gradients.orange3,purple1:_.gradients.purple1,purple3:_.gradients.purple3,pink1:_.gradients.pink1,pink2:_.gradients.pink2,green1:_.gradients.green1,green2:_.gradients.green2,black1:_.gradients.black1,black2:_.gradients.black2},shadows:{success:_.shadows.success,error:_.shadows.error,primary:_.shadows.primary,info:_.shadows.info,warning:_.shadows.warning},alpha:{white:{5:$(x.white,.02),10:$(x.white,.1),30:$(x.white,.3),50:$(x.white,.5),70:$(x.white,.7),100:x.white},trueWhite:{5:$(x.white,.02),10:$(x.white,.1),30:$(x.white,.3),50:$(x.white,.5),70:$(x.white,.7),100:x.white},black:{5:$(x.black,.02),10:$(x.black,.1),30:$(x.black,.3),50:$(x.black,.5),70:$(x.black,.7),100:x.black},gray:{5:$(x.gray,.02),10:$(x.gray,.1),30:$(x.gray,.3),50:$(x.gray,.5),70:$(x.gray,.7),100:x.gray}},secondary:{lighter:$(x.secondary,.1),light:Ne(x.secondary,.3),main:x.secondary,dark:bt(x.secondary,.2)},primary:{lighter:$(x.primary,.1),light:Ne(x.primary,.3),main:x.primary,dark:bt(x.primary,.2)},success:{lighter:$(x.success,.1),light:Ne(x.success,.3),main:x.success,dark:bt(x.success,.2)},warning:{lighter:$(x.warning,.1),light:Ne(x.warning,.3),main:x.warning,dark:bt(x.warning,.2)},error:{lighter:$(x.error,.1),light:Ne(x.error,.3),main:x.error,dark:bt(x.error,.2)},info:{lighter:$(x.info,.1),light:Ne(x.info,.3),main:x.info,dark:bt(x.info,.2)}},general:{reactFrameworkColor:"#00D8FF",borderRadiusSm:"6px",borderRadius:"10px",borderRadiusLg:"12px",borderRadiusXl:"16px"},sidebar:{background:_.layout.sidebar.background,textColor:_.layout.sidebar.textColor,dividerBg:_.layout.sidebar.dividerBg,menuItemColor:_.layout.sidebar.menuItemColor,menuItemColorActive:_.layout.sidebar.menuItemColorActive,menuItemBg:_.layout.sidebar.menuItemBg,menuIconBgActive:_.layout.sidebar.menuIconBgActive,menuItemBgActive:_.layout.sidebar.menuItemBgActive,menuItemIconColor:_.layout.sidebar.menuItemIconColor,menuItemIconColorActive:_.layout.sidebar.menuItemIconColorActive,menuItemHeadingColor:_.layout.sidebar.menuItemHeadingColor,boxShadow:"2px 0 3px rgba(159, 162, 191, .18), 1px 0 1px rgba(159, 162, 191, 0.32)",width:"100px"},header:{height:"65px",background:_.alpha.white[100],boxShadow:_.shadows.cardSm,textColor:_.secondary.main},spacing:9,palette:{common:{black:_.alpha.black[100],white:_.alpha.white[100]},mode:"light",primary:{light:_.primary.light,main:_.primary.main,dark:_.primary.dark},secondary:{light:_.secondary.light,main:_.secondary.main,dark:_.secondary.dark},error:{light:_.error.light,main:_.error.main,dark:_.error.dark,contrastText:_.alpha.white[100]},success:{light:_.success.light,main:_.success.main,dark:_.success.dark,contrastText:_.alpha.white[100]},info:{light:_.info.light,main:_.info.main,dark:_.info.dark,contrastText:_.alpha.white[100]},warning:{light:_.warning.light,main:_.warning.main,dark:_.warning.dark,contrastText:_.alpha.white[100]},text:{primary:_.alpha.black[100],secondary:_.alpha.black[70],disabled:_.alpha.black[50]},background:{paper:_.alpha.white[100],default:_.layout.general.bodyBg},action:{active:_.alpha.black[100],hover:Ne(x.primary,.85),hoverOpacity:.1,selected:_.alpha.black[10],selectedOpacity:.1,disabled:_.alpha.black[50],disabledBackground:_.alpha.black[5],disabledOpacity:.38,focus:_.alpha.black[10],focusOpacity:.05,activatedOpacity:.12},tonalOffset:.5,grey:{50:"#fafafa",100:"#f2f4f7",200:"#e4e7ec",300:"#e0e0e0",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},breakpoints:VF,components:{MuiBackdrop:{styleOverrides:{root:{backgroundColor:$(bt(x.primaryAlt,.4),.2),backdropFilter:"blur(2px)","&.MuiBackdrop-invisible":{backgroundColor:"transparent",backdropFilter:"none"}}}},MuiFormHelperText:{styleOverrides:{root:{textTransform:"none",marginLeft:8,marginRight:8,fontWeight:"bold"}}},MuiFormControlLabel:{styleOverrides:{label:{fontWeight:400,color:_.alpha.black[70]}}},MuiCssBaseline:{styleOverrides:{"html, body":{width:"100%",height:"100%"},body:{display:"flex",flexDirection:"column",minHeight:"100%",width:"100%",flex:1},"#root":{width:"100%",height:"100%",display:"flex",flex:1,flexDirection:"column"},html:{display:"flex",flexDirection:"column",minHeight:"100%",width:"100%",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased"},".child-popover .MuiPaper-root .MuiList-root":{flexDirection:"column"},"#nprogress":{pointerEvents:"none"},"#nprogress .bar":{background:_.primary.lighter},"#nprogress .spinner-icon":{borderTopColor:_.primary.lighter,borderLeftColor:_.primary.lighter},"#nprogress .peg":{boxShadow:"0 0 15px "+_.primary.lighter+", 0 0 8px"+_.primary.light},":root":{"--swiper-theme-color":_.primary.main},code:{background:_.info.lighter,color:_.info.dark,borderRadius:4,padding:4},"@keyframes pulse":{"0%":{transform:"scale(.75)"},"20%":{transform:"scale(1.1)"},"40%":{transform:"scale(.75)"},"60%":{transform:"scale(1.05)"},"80%":{transform:"scale(.75)"},"100%":{transform:"scale(.75)"}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.8)",opacity:0}},"@keyframes float":{"0%":{transform:"translate(0%, 0%)"},"100%":{transform:"translate(3%, 3%)"}}}},MuiSelect:{styleOverrides:{iconOutlined:{color:_.alpha.black[50]},icon:{top:"calc(50% - 14px)"}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiInputAdornment-positionEnd.MuiInputAdornment-outlined":{paddingRight:6},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:_.alpha.black[50]},"&.Mui-focused:hover .MuiOutlinedInput-notchedOutline":{borderColor:_.primary.main},borderRadius:6}}},MuiListSubheader:{styleOverrides:{colorPrimary:{fontWeight:"bold",lineHeight:"40px",fontSize:13,background:_.alpha.black[5],color:_.alpha.black[70]}}},MuiCard:{styleOverrides:{root:{borderRadius:6,boxShadow:"none",border:`1px solid ${_.alpha.black[10]}`}}},MuiCardHeader:{styleOverrides:{action:{marginTop:-5,marginBottom:-5},title:{fontSize:15}}},MuiRadio:{styleOverrides:{root:{borderRadius:"50px"}}},MuiChip:{styleOverrides:{colorSecondary:{background:_.alpha.black[5],color:_.alpha.black[100],"&:hover":{background:_.alpha.black[10]}}}},MuiAccordion:{styleOverrides:{root:{boxShadow:"none","&.Mui-expanded":{margin:0},"&::before":{display:"none"}}}},MuiAvatar:{defaultProps:{imgProps:{referrerPolicy:"no-referrer"}},styleOverrides:{root:{fontSize:14,fontWeight:"bold"},colorDefault:{background:_.alpha.black[30],color:_.alpha.white[100]}}},MuiAvatarGroup:{styleOverrides:{root:{alignItems:"center"},avatar:{background:_.alpha.black[10],fontSize:13,color:_.alpha.black[70],fontWeight:"bold","&:first-of-type":{border:0,background:"transparent"}}}},MuiListItemAvatar:{styleOverrides:{alignItemsFlexStart:{marginTop:0}}},MuiPaginationItem:{styleOverrides:{page:{fontSize:13,fontWeight:"bold",transition:"all .2s"},textPrimary:{"&.Mui-selected":{boxShadow:_.shadows.primary},"&.MuiButtonBase-root:hover":{background:_.alpha.black[5]},"&.Mui-selected.MuiButtonBase-root:hover":{background:_.primary.main}}}},MuiButton:{defaultProps:{disableRipple:!0},styleOverrides:{root:{boxShadow:"none",fontWeight:400,borderRadius:6,padding:"8px 17px",textTransform:"none",paddingLeft:16,paddingRight:16,"&:hover, &.MuiSelected":{boxShadow:"none"},".MuiSvgIcon-root":{transition:"all .2s"}},endIcon:{marginRight:-8},containedSecondary:{backgroundColor:_.secondary.main,color:_.alpha.white[100],border:"1px solid "+_.alpha.black[30]},outlinedSecondary:{backgroundColor:_.alpha.white[100],"&:hover, &.MuiSelected":{backgroundColor:_.alpha.black[5],color:_.alpha.black[100]}},sizeSmall:{padding:"6px 16px",lineHeight:1.5},sizeMedium:{padding:"8px 20px"},sizeLarge:{padding:"11px 24px"},textSizeSmall:{padding:"7px 12px"},textSizeMedium:{padding:"9px 16px"},textSizeLarge:{padding:"12px 16px"}}},MuiButtonBase:{defaultProps:{disableRipple:!1},styleOverrides:{root:{borderRadius:6}}},MuiToggleButton:{defaultProps:{disableRipple:!0},styleOverrides:{root:{color:_.primary.main,background:_.alpha.white[100],transition:"all .2s","&:hover, &.Mui-selected, &.Mui-selected:hover":{color:_.alpha.white[100],background:_.primary.main}}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6,padding:8,"& .MuiTouchRipple-root":{borderRadius:6}},sizeSmall:{padding:4}}},MuiListItemText:{styleOverrides:{root:{margin:0}}},MuiListItemButton:{styleOverrides:{root:{borderRadius:0,"& .MuiTouchRipple-root":{opacity:.3}}}},MuiDivider:{styleOverrides:{root:{background:_.alpha.black[10],border:0,height:1},vertical:{height:"auto",width:1,"&.MuiDivider-flexItem.MuiDivider-fullWidth":{height:"auto"},"&.MuiDivider-absolute.MuiDivider-fullWidth":{height:"100%"}},withChildren:{"&:before, &:after":{border:0}},wrapper:{background:_.alpha.white[100],fontWeight:"bold",height:24,lineHeight:"24px",marginTop:-12,color:"inherit",textTransform:"uppercase"}}},MuiPaper:{styleOverrides:{root:{padding:0},elevation0:{boxShadow:"none"},elevation:{boxShadow:_.shadows.card},elevation2:{boxShadow:_.shadows.cardSm},elevation24:{boxShadow:_.shadows.cardLg},outlined:{boxShadow:_.shadows.card}}},MuiPopover:{styleOverrides:{paper:{padding:0}}},MuiLink:{defaultProps:{underline:"hover"}},MuiLinearProgress:{styleOverrides:{root:{borderRadius:6,height:6}}},MuiSlider:{styleOverrides:{root:{"& .MuiSlider-valueLabelCircle, .MuiSlider-valueLabelLabel":{transform:"none"},"& .MuiSlider-valueLabel":{borderRadius:6,background:_.alpha.black[100],color:_.alpha.white[100]}}}},MuiList:{styleOverrides:{root:{padding:0,"& .MuiListItem-button":{transition:"all .2s","& > .MuiSvgIcon-root":{minWidth:34},"& .MuiTouchRipple-root":{opacity:.2}},"& .MuiListItem-root.MuiButtonBase-root.Mui-selected":{backgroundColor:$(_.primary.lighter,.4)},"& .MuiMenuItem-root.MuiButtonBase-root:active":{backgroundColor:$(_.primary.lighter,.4)},"& .MuiMenuItem-root.MuiButtonBase-root .MuiTouchRipple-root":{opacity:.2}},padding:{padding:"8px","& .MuiListItem-button":{borderRadius:6,margin:"1px 0"}}}},MuiTabs:{styleOverrides:{root:{height:38,minHeight:38,overflow:"visible"},indicator:{height:38,minHeight:38,borderRadius:6,border:"1px solid "+_.primary.dark,boxShadow:"0px 2px 10px "+_.primary.light},scrollableX:{overflow:"visible !important"}}},MuiTab:{styleOverrides:{root:{padding:0,height:38,minHeight:38,borderRadius:6,transition:"color .2s",textTransform:"capitalize","&.MuiButtonBase-root":{minWidth:"auto",paddingLeft:20,paddingRight:20,marginRight:4},"&.Mui-selected, &.Mui-selected:hover":{color:_.alpha.white[100],zIndex:5},"&:hover":{color:_.alpha.black[100]}}}},MuiMenu:{defaultProps:{BackdropProps:{style:{backgroundColor:"transparent !important",backdropFilter:"none !important"}}},styleOverrides:{paper:{padding:6},list:{padding:6,"& .MuiMenuItem-root.MuiButtonBase-root":{fontSize:14,marginTop:1,marginBottom:1,transition:"all .2s",color:_.alpha.black[70],"& .MuiTouchRipple-root":{opacity:.2},"&:hover, &:active, &.active, &.Mui-selected":{color:_.alpha.black[100],background:$(_.primary.lighter,.4)}}}}},MuiMenuItem:{styleOverrides:{root:{background:"transparent",transition:"all .2s","&:hover, &:active, &.active, &.Mui-selected":{color:_.alpha.black[100],background:$(_.primary.lighter,.4)},"&.Mui-selected:hover":{background:$(_.primary.lighter,.4)}}}},MuiListItem:{styleOverrides:{root:{"&.MuiButtonBase-root":{color:_.secondary.main,"&:hover, &:active, &.active, &.Mui-selected":{color:_.alpha.black[100],background:Ne(_.primary.lighter,.5)}}}}},MuiAutocomplete:{styleOverrides:{tag:{margin:1},root:{".MuiAutocomplete-inputRoot.MuiOutlinedInput-root .MuiAutocomplete-endAdornment":{right:14}},clearIndicator:{background:_.error.lighter,color:_.error.main,marginRight:8,"&:hover":{background:_.error.lighter,color:_.error.dark}},popupIndicator:{color:_.alpha.black[50],"&:hover":{background:_.primary.lighter,color:_.primary.main}}}},MuiTablePagination:{styleOverrides:{toolbar:{"& .MuiIconButton-root":{padding:8}},select:{"&:focus":{backgroundColor:"transparent"}}}},MuiToolbar:{styleOverrides:{root:{minHeight:"0 !important",padding:"0 !important"}}},MuiTableRow:{styleOverrides:{head:{background:_.alpha.black[5]},root:{transition:"background-color .2s","&.MuiTableRow-hover:hover":{backgroundColor:_.alpha.black[5]}}}},MuiTableCell:{styleOverrides:{root:{borderBottomColor:_.alpha.black[10],color:_.alpha.black[90],fontSize:14},body:{textShadow:"rgba(0,0,0,.25) 0 0 1px"},head:{textTransform:"uppercase",fontSize:13,fontWeight:"bold",color:_.alpha.black[70]}}},MuiAlert:{styleOverrides:{message:{lineHeight:1.5,fontSize:14},standardInfo:{color:_.info.main},action:{color:_.alpha.black[70]}}},MuiTimelineDot:{styleOverrides:{root:{margin:0,zIndex:5,position:"absolute",top:"50%",marginTop:-6,left:-6},outlined:{backgroundColor:_.alpha.white[100],boxShadow:"0 0 0 6px "+_.alpha.white[100]},outlinedPrimary:{backgroundColor:_.alpha.white[100],boxShadow:"0 0 0 6px "+_.alpha.white[100]}}},MuiTimelineConnector:{styleOverrides:{root:{position:"absolute",height:"100%",top:0,borderRadius:50,backgroundColor:_.alpha.black[10]}}},MuiTimelineItem:{styleOverrides:{root:{minHeight:0,padding:"8px 0","&:before":{display:"none"}},missingOppositeContent:{"&:before":{display:"none"}}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:$(_.alpha.black[100],.95),padding:"8px 16px",fontSize:13},arrow:{color:$(_.alpha.black[100],.95)}}},MuiSwitch:{styleOverrides:{root:{height:33,overflow:"visible","& .MuiButtonBase-root":{position:"absolute",padding:6,transition:"left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"& .MuiIconButton-root":{borderRadius:100},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{opacity:.3},"& .MuiSwitch-switchBase.Mui-disabled + .MuiSwitch-track":{opacity:.5}},thumb:{border:"1px solid "+_.alpha.black[30],boxShadow:"0px 9px 14px "+_.alpha.black[10]+", 0px 2px 2px "+_.alpha.black[10]},track:{backgroundColor:_.alpha.black[5],border:"1px solid "+_.alpha.black[10],boxShadow:"inset 0px 1px 1px "+_.alpha.black[10],opacity:1},colorPrimary:{}}},MuiStepper:{styleOverrides:{root:{paddingTop:20,paddingBottom:20,background:_.alpha.black[5]}}},MuiStepIcon:{styleOverrides:{root:{"&.MuiStepIcon-completed":{color:_.success.main}}}},MuiDialog:{styleOverrides:{root:{zIndex:1400},paper:{borderRadius:6,boxShadow:"none"}}},MuiDialogTitle:{styleOverrides:{root:{fontWeight:700,fontSize:16,color:_.alpha.black[90]}}},MuiDialogActions:{styleOverrides:{root:{"> button":{height:38,fontWeight:600,borderRadius:8}}}},MuiTypography:{defaultProps:{variantMapping:{h1:"h1",h2:"h2",h3:"div",h4:"div",h5:"div",h6:"div",subtitle1:"div",subtitle2:"div",body1:"div",body2:"div"}},styleOverrides:{gutterBottom:{marginBottom:4},paragraph:{fontSize:17,lineHeight:1.7}}}},shape:{borderRadius:10},typography:{fontFamily:'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',h1:{fontWeight:700,fontSize:35},h2:{fontWeight:700,fontSize:30},h3:{fontWeight:700,fontSize:25,lineHeight:1.4,color:_.alpha.black[90]},h4:{fontWeight:700,fontSize:16,color:_.alpha.black[90]},h5:{fontWeight:700,fontSize:14,color:_.alpha.black[90]},h6:{fontSize:15},body1:{fontSize:14},body2:{fontSize:14},button:{fontWeight:600},caption:{fontSize:13,textTransform:"uppercase",color:_.alpha.black[70]},subtitle1:{fontSize:13,color:_.alpha.black[70]},subtitle2:{fontWeight:400,fontSize:14,color:_.alpha.black[80]},overline:{fontSize:13,fontWeight:700,textTransform:"uppercase"}},shadows:DF});let Dp=[],Hl;const Sc=t=>{const e=t;if(!e.target)return;const{type:r,name:n,value:i,className:s,id:o}=e.target,a=B.sessionId;if(!a){fe.warn("Form fill captured, no sessionId");return}Mr.sessions.formFill.mutate({sessionId:a,type:r,name:n,value:i,class:s,elementId:o,page:window.location.href},{context:{target:"session-server"}})},Ow=()=>{document.querySelectorAll("iframe").forEach(t=>{var e,r;(r=(e=t==null?void 0:t.contentDocument)==null?void 0:e.querySelectorAll("input:not([type=password])"))==null||r.forEach(n=>{Dp.includes(t.src)||(Dp.push(t.src),n.addEventListener("change",Sc))})})},LF=()=>{document.querySelectorAll("input:not([type=password])").forEach(t=>t.addEventListener("change",Sc)),Ow(),Hl||(Hl=setInterval(Ow,1e3)),setTimeout(()=>{clearInterval(Hl),Hl=void 0},2e4)},zU=()=>{document.querySelectorAll("input:not([type=password])").forEach(t=>t.removeEventListener("change",Sc)),document.querySelectorAll("iframe").forEach(t=>{var e,r;(r=(e=t==null?void 0:t.contentDocument)==null?void 0:e.querySelectorAll("input:not([type=password])"))==null||r.forEach(n=>n.removeEventListener("change",Sc))}),Dp=[]},$F=()=>{const t=window.history.pushState;window.history.pushState=function(...e){Sf(),t.apply(this,e)}},BF=()=>{const t=window.history.replaceState;window.history.replaceState=function(...e){Sf(),t.apply(this,e)}},Sf=()=>{setTimeout(()=>Ye.setPage(window.location.pathname))},FF=()=>{$F(),BF(),window.addEventListener("popstate",Sf)},jU=()=>{window.removeEventListener("popstate",Sf)};var cE,xw=nb;cE=xw.createRoot,xw.hydrateRoot;const UF=Hn.lazy(()=>Rw(()=>import("./WidgetApp-T8GHz28r.js").then(t=>t.W),[])),zF=()=>{const t=document.createElement("div");t.id=kw,t.style.zIndex="2147483647",t.style.position="fixed";const e=document.createElement("div");e.style.display="none";const r=t.attachShadow({mode:"open"}),n=document.createElement("div");return n.id="widget-root",r.appendChild(n),t.appendChild(e),document.body.append(t),{shadowRootElement:n,shadowContainer:r}},jF=({shadowRootElement:t,shadowContainer:e})=>{const r=document.createElement("style");r.innerHTML=".calendly-overlay { z-index: 1000002; }",document.head.append(r),cE(t).render(ty.jsx(Hn.Suspense,{children:ty.jsx(UF,{shadowContainer:e})}));const i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("async","true"),i.setAttribute("defer","true"),i.src="https://widget.cloudinary.com/v2.0/global/all.js",document.head.append(i)},fE={sessionId:void 0,panelShown:!1,isFullScreen:!1,isFullScreenClosing:!1,lightweightPanelDismissed:!1},dt={appRendered:!1,isConnecting:!1,outgoingMessage:"",messages:[],dismissedMessages:[],theme:uE,shadowDom:{shadowRootElement:document.createElement("div"),shadowContainer:{}},sessionJoinedMessage:"",shouldRecord:!0,clientId:"",hubspotCookie:"",currentPage:window.location.pathname,sessionState:fE};class WF{constructor(){S(this,"appRendered",dt.appRendered);S(this,"isConnecting",dt.isConnecting);S(this,"outgoingMessage",dt.outgoingMessage);S(this,"shouldRecord",dt.shouldRecord);S(this,"messages",dt.messages);S(this,"dismissedMessages",dt.dismissedMessages);S(this,"theme",dt.theme);S(this,"shadowDom",dt.shadowDom);S(this,"sessionJoinedMessage",dt.sessionJoinedMessage);S(this,"clientId",dt.clientId);S(this,"hubspotCookie",dt.hubspotCookie);S(this,"currentPage",dt.currentPage);S(this,"sessionState",dt.sessionState);S(this,"initialize",(e,r=!0)=>{this.clientId=e;const n=this.shadowDom.shadowRootElement;this.getHubspotCookie();const i={components:{MuiPopper:{defaultProps:{container:n}},MuiMenu:{defaultProps:{container:n}},MuiModal:{defaultProps:{container:n}}}};this.theme=em(l2(uE,i)),this.shouldRecord=r,LF(),FF(),r&&B.recordSession()});S(this,"renderApp",()=>{this.appRendered||(jF(this.shadowDom),this.appRendered=!0)});S(this,"hide",()=>{this.closePanel()});S(this,"show",()=>{this.sessionState.panelShown=!0});S(this,"setOutgoingMessage",e=>this.outgoingMessage=e);S(this,"sendOutgoingMessage",()=>{this.outgoingMessage&&(Ha.emit("sendMessageFromWidget",this.outgoingMessage),this.outgoingMessage="")});S(this,"toggleFullScreen",()=>this.sessionState.isFullScreen=!this.sessionState.isFullScreen);S(this,"addMessage",e=>{this.messages=this.messages.concat(e),this.sessionState.panelShown||(this.sessionState.panelShown=!0)});S(this,"onSessionJoined",e=>{this.sessionState.panelShown=!0,this.sessionJoinedMessage=e,setTimeout(D(()=>this.sessionJoinedMessage=""),2500)});S(this,"openPanel",()=>{this.sessionState.panelShown=!0});S(this,"closePanel",()=>{this.sessionState.panelShown=!1,this.sessionState.lightweightPanelDismissed=!0,this.dismissMessages(),this.sessionState.isFullScreen&&(this.sessionState.isFullScreenClosing=!0),setTimeout(D(()=>{this.sessionState.isFullScreen=!1,this.sessionState.isFullScreenClosing=!1}),750)});S(this,"togglePanelOpen",()=>{this.sessionState.panelShown?this.closePanel():this.openPanel()});S(this,"setIsConnecting",e=>{this.isConnecting=e});S(this,"connectWithAgent",e=>{var r;this.isConnecting||(B.setCallType(e),this.setIsConnecting(!0),(r=H.socket)==null||r.emit("connect-with-agent",{type:e}))});S(this,"setLightweightPanelDismissed",e=>this.sessionState.lightweightPanelDismissed=e);S(this,"dismissMessages",()=>{this.dismissedMessages=[...B.recentMessages.map(e=>e.id||"")]});S(this,"dismissLightweightPanel",()=>{this.dismissMessages(),this.sessionState.lightweightPanelDismissed=!0});S(this,"getHubspotCookie",()=>{if(!this.hubspotCookie){let e=0;const r=setInterval(()=>{var s,o;const n=(s=document==null?void 0:document.cookie)==null?void 0:s.split("; ").find(a=>a.startsWith("hubspotutk=")),i=(o=n==null?void 0:n.split("="))==null?void 0:o[1];i&&(this.hubspotCookie=i,clearInterval(r)),e++,e>=3&&clearInterval(r)},2e3)}});S(this,"setSessionId",e=>{this.sessionState.sessionId!==e&&(this.sessionState={...fE,sessionId:e})});S(this,"resetState",()=>{Object.entries(dt).forEach(([e,r])=>this[e]=r),Xb(this)});zb(this),Zm(this,{name:"WidgetStore",properties:["sessionState","dismissedMessages"],storage:window.localStorage}),this.shadowDom=zF(),B.shouldDisplayFab&&!this.appRendered&&this.renderApp()}setPage(e){const{sessionId:r}=B;r&&this.currentPage!==e&&(this.currentPage=e,Mr.sessions.trackPageVisit.mutate({sessionId:r,url:window.location.href}))}get showLightweightPanel(){return!this.sessionState.lightweightPanelDismissed&&!this.sessionState.panelShown&&(B.isEngagedInConversation||B.isEngagedByWorkflow)}get receivedMessages(){return B.recentMessages}get newlyReceivedMessages(){return this.receivedMessages.filter(e=>!this.dismissedMessages.includes(e.id||""))}get widgetSessionState(){const e=this.sessionState.sessionId,r=B.sessionId;return e&&e===r?this.sessionState:dt.sessionState}}const Ye=new WF;$e(()=>({hubspotCookie:Ye.hubspotCookie,recordingSession:B.recordSessionState.loading||B.recreatingSession}),({hubspotCookie:t,recordingSession:e})=>{!B.sessionId||!t||e||B.updateHubspotUserToken({sessionId:B.sessionId,hubspotCookie:t},{context:{target:"session-server"}})});$e(()=>B.shouldDisplayFab||Ye.sessionState.panelShown,t=>{var n,i;const e=(i=(n=B.recordSessionState.value)==null?void 0:n.config)==null?void 0:i.hideElementsOnShow;if(!e)return;e.split(",").forEach(s=>{const o=document.querySelector(s);o&&(o.style.setProperty("display",t?"none":"block",t?"important":void 0),o.style.setProperty("visibility",t?"hidden":"visible",t?"important":void 0))})});$e(()=>Ye.receivedMessages,()=>{Ye.receivedMessages.length&&Ye.setLightweightPanelDismissed(!1)});$e(()=>B.shouldDisplayFab,t=>{t&&!Ye.appRendered&&Ye.renderApp()});const ii=mE,Kg=`${ii}-config`,HF={logs:!1,record:!0};let di;function GF(t){if(fe.initializeSentry("widget"),YF(),!t[ii]){const r=document.getElementById(ii);if(!r)throw Error("Cannot find script tag with id {$widgetName}-Script");let n=r.getAttribute("data-config");n=n==null?void 0:n.replace(/'/g,'"');const i=JSON.parse(n);t[ii]=i.name;const s={};(s.q=[]).push(["init",i.config]),t[t[ii]]=s}const e=t[t[ii]];if(t[t[ii]]=Iw,t[Kg]=HF,e){const r=e.q;if(r)for(const n of r)Iw(n[0],n[1])}}const KF=()=>{let t=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(e==="x"?r:r&3|8).toString(16)})},YF=()=>{if(window.warmly_fingerprint)return;const e=localStorage.getItem("warmly_fingerprint");if(e){window.warmly_fingerprint=e;return}const r=KF();localStorage.setItem("warmly_fingerprint",r),window.warmly_fingerprint=r},XF=(...t)=>{di!=null&&di.logs&&fe.log(...t)},qF=t=>{const e=t==null?void 0:t.clientId;if(!e){fe.error("No Client ID provided");return}di=Object.assign({},di,t),window[Kg]=di;const r=typeof(t==null?void 0:t.record)>"u"?!0:t.record;Ye.initialize(e,r),XF("Widget initialization complete!")},Iw=(t,e)=>{if(!t)throw Error("API method required");switch(di=window[Kg],t){case"init":qF(e);break;case"sendMessage":Ye.addMessage(e);break;case"hide":Ye.hide();break;case"show":Ye.show();break;case"onSessionJoined":Ye.onSessionJoined(e);break;case"makeWidgetFullScreen":Ye.toggleFullScreen();break;default:throw Error(`Method ${t} is not supported`)}};GF(window);export{sU as A,un as B,Ye as C,B as D,zb as E,Mr as F,_E as G,fe as H,Ha as I,$ as J,zU as K,jU as L,$p as M,Tx as N,eU as O,uE as P,i2 as Q,tU as R,D as S,ZF as T,wE as U,JF as V,kw as W,bE as X,$e as Y,Rw as _,YE as a,qe as b,jw as c,Jr as d,XO as e,nO as f,KO as g,js as h,Gi as i,ty as j,Kp as k,em as l,Mw as m,ZO as n,nU as o,rU as p,nb as q,Hn as r,Yp as s,hi as t,GO as u,Cc as v,ix as w,rx as x,Ua as y,iU as z};