@astropay/payments-lib 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astropay-payments-lib.es.js +1 -1
- package/dist/astropay-payments-lib.umd.js +156 -139
- package/dist/main-BIfFvI__.js +27482 -0
- package/dist/{profiler-CVMzUp0S.js → profiler-CxLdnpFk.js} +1 -1
- package/dist/{startRecording-DlN4lIUz.js → startRecording-CL6q7wlP.js} +1 -1
- package/package.json +2 -1
- package/dist/main-DhA4kci7.js +0 -19587
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ge,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(Ge=typeof globalThis<"u"?globalThis:Ge||self,A(Ge.AstroPay={}))})(this,(function(Ge){"use strict";var g8=Object.defineProperty;var m8=(Ge,A,on)=>A in Ge?g8(Ge,A,{enumerable:!0,configurable:!0,writable:!0,value:on}):Ge[A]=on;var S=(Ge,A,on)=>m8(Ge,typeof A!="symbol"?A+"":A,on);const A={transparent:"transparent",surface_dark:"#041311",surface_light:"#FFFFFF",neutral_lightest:"#FFFFFF",neutral_light:"#F3F6F6",neutral_lighter:"#E2E9E8",neutral_base:"#B4C5C3",neutral_darker:"#7C9995",neutral_dark:"#536663",neutral_darkest:"#151E1D",primary_lightest:"#DBFFFB",primary_light:"#AAF6EC",primary_base:"#00DBBF",primary_darker:"#0FC3AC",primary_dark:"#059986",primary_darkest:"#07544A",warning_lightest:"#FFF7DB",warning_light:"#FFEBA8",warning_darker:"#DBA800",warning_darkest:"#755A00",error_lightest:"#FFDCD6",error_light:"#FFB0A3",error_lighter:"#FF8470",error_base:"#FF2C0A",error_dark:"#A31600",error_darkest:"#700F00",success_lightest:"#F0FAEB",success_light:"#D3EFC2",success_base:"#7CD049",success_darker:"#62B52F",success_dark:"#4D8E25",success_darkest:"#37651A"},on={poppins:"Poppins"},V1=async()=>{try{const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap",e.rel="stylesheet",document.head.appendChild(e),await document.fonts.ready}catch(e){console.error("Font loading failed:",e)}},z1={backgroundColor:A.surface_dark,fontFamily:on.poppins,textColor:A.neutral_light,primaryColor:A.primary_base,secondaryColor:A.primary_darkest,textPrimaryColor:A.neutral_lightest,textSecondaryColor:A.neutral_base,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:A.success_base,textSize:12},error:{textColor:A.error_lighter,textSize:12}},input:{normal:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_dark,borderColor:A.transparent,borderRadius:8,borderWidth:3},focus:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_darker,borderColor:A.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:A.neutral_darker,backgroundColor:A.neutral_dark,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_base,borderColor:A.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.error_base,placeholderTextColor:A.neutral_darker,borderColor:A.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:A.neutral_lightest,backgroundColor:A.primary_base,borderColor:A.transparent,borderWidth:0},secondary:{textColor:A.primary_lightest,backgroundColor:A.primary_darkest,borderColor:A.transparent,borderWidth:0},text:{textColor:A.primary_base,backgroundColor:"unset",borderColor:A.primary_base,borderWidth:1},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,borderColor:A.transparent,borderWidth:0}},divider:{color:A.neutral_darker,variant:"dashed",size:1},card:{padding:12,backgroundColor:A.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:A.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:A.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:A.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:A.neutral_light,backgroundColor:A.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:A.primary_light,backgroundColor:A.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:A.error_light,backgroundColor:A.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:A.success_light,backgroundColor:A.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:A.warning_light,backgroundColor:A.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:A.error_lightest,backgroundColor:A.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:on.poppins,apPrimaryColor:A.primary_base,apButtonPrimaryBgColor:A.primary_base,apButtonPrimaryTxtColor:A.neutral_darkest,apButtonSecondaryBgColor:A.primary_darkest,apButtonSecondaryTxtColor:A.primary_base,apButtonTextTxtColor:A.primary_base,apButtonDisableBgColor:A.neutral_base,apButtonDisableTextColor:A.neutral_dark},Id={backgroundColor:A.surface_light,fontFamily:on.poppins,textColor:A.neutral_darkest,primaryColor:A.primary_base,secondaryColor:A.primary_lightest,textPrimaryColor:A.neutral_darkest,textSecondaryColor:A.neutral_dark,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:A.success_darker,textSize:12},error:{textColor:A.error_dark,textSize:12}},input:{normal:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_dark,borderColor:A.transparent,borderRadius:8,borderWidth:3},focus:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_dark,borderColor:A.primary_darker,borderRadius:8,borderWidth:3},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_darker,borderColor:A.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.error_dark,placeholderTextColor:A.neutral_dark,borderColor:A.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:A.neutral_darkest,backgroundColor:A.primary_base,borderColor:A.transparent,borderWidth:0},secondary:{textColor:A.primary_darker,backgroundColor:A.primary_lightest,borderColor:A.transparent,borderWidth:0},text:{textColor:A.primary_base,backgroundColor:"unset",borderColor:A.primary_base,borderWidth:1},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,borderColor:A.transparent,borderWidth:0}},divider:{color:A.neutral_lighter,variant:"dashed",size:1},card:{padding:12,backgroundColor:A.neutral_light,borderWidth:0,borderStyle:"none",borderColor:A.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:A.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:A.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:A.neutral_dark,backgroundColor:A.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:A.primary_dark,backgroundColor:A.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:A.error_dark,backgroundColor:A.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:A.success_dark,backgroundColor:A.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:A.warning_darker,backgroundColor:A.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:A.error_dark,backgroundColor:A.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:on.poppins,apPrimaryColor:A.primary_base,apButtonPrimaryBgColor:A.primary_base,apButtonPrimaryTxtColor:A.neutral_darkest,apButtonSecondaryBgColor:A.primary_lightest,apButtonSecondaryTxtColor:A.primary_dark,apButtonTextTxtColor:A.primary_dark,apButtonDisableBgColor:A.neutral_base,apButtonDisableTextColor:A.neutral_dark},H1=["production","sandbox"],j1=["light","dark"],q1=["en","pt","es"],W1=["iso","symbol"],Js=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).catch(t=>{console.error("Error to copy:",t)}):new Promise((t,n)=>{const r=document.createElement("textarea");r.value=e,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?t():n(new Error("Failed to copy text using execCommand"))}catch(i){n(i)}finally{document.body.removeChild(r)}}),G1=async(e,t,n)=>{if(navigator.share)try{const r={title:e,text:t,...n&&{url:n}};await navigator.share(r)}catch(r){console.error("Failed to share information:",r)}else{console.warn("Web Share API not supported");const r=`${e}
|
|
2
2
|
${t}${n?`
|
|
3
|
-
${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),rm=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),tl=e=>{const t=JSON.stringify(e);return btoa(t)},sm=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.replace(/[^A-Za-z0-9]/g,"");let s="",i=0,o=!1;for(const a of n){if(o){s+=a,o=!1;continue}if(a==="\\"){o=!0;continue}if(i>=r.length)break;switch(a){case"#":if(/\d/.test(r[i]))s+=r[i++];else{i++;continue}break;case"A":if(/[A-Za-z]/.test(r[i]))s+=r[i++];else{i++;continue}break;case"*":if(/[A-Za-z0-9]/.test(r[i]))s+=r[i++];else{i++;continue}break;default:s+=a,r[i]===a&&i++;break}}return s},im=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.split("");let s="",i=!1,o=0;for(const a of n){if(i){i=!1,r[o]===a&&o++;continue}if(a==="\\"){i=!0;continue}if(o>=r.length)break;switch(a){case"#":/\d/.test(r[o])&&(s+=r[o]),o++;break;case"A":/[A-Za-z]/.test(r[o])&&(s+=r[o]),o++;break;case"*":/[A-Za-z0-9]/.test(r[o])&&(s+=r[o]),o++;break;default:r[o]===a&&o++;break}}return s},om=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3||8).toString(16)}),am=e=>e?e.startsWith("+")?e:`+${e}`:"",vn=Array.isArray,xt=e=>e!==null&&typeof e=="object"&&!vn(e),Kr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[nm(n)]:xt(r)?Kr(r):vn(r)?r.map(s=>xt(s)?Kr(s):s):r}),{}),cm=e=>{if(vn(e))return e.map(t=>xt(t)?Kr(t):t);throw new Error("Input is not an array")},Yr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[rm(n)]:xt(r)?Yr(r):vn(r)?r.map(s=>xt(s)?Yr(s):s):r}),{}),lm=e=>{if(vn(e))return e.map(t=>xt(t)?Yr(t):t);throw new Error("Input is not an array")},mi=(e,t)=>vn(e)?t==="snake_case-to-camelCase"?cm(e):lm(e):xt(e)?t==="snake_case-to-camelCase"?Kr(e):Yr(e):e,nl=(e,t)=>{if(!t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=t[r],i=e[r];xt(s)&&xt(i)?n[r]=nl(i,s):s!==void 0&&(n[r]=s)}return n},um={light:el,dark:Zh},Yt=class Yt{static init(t){const n=Gr(t==null?void 0:t.theme,Xh,"light");Yt.currentTheme=n,Yt.styles=nl(um[n],t==null?void 0:t.styles)}static getStyles(){return Yt.styles}static getTheme(){return Yt.currentTheme}};S(Yt,"currentTheme","light"),S(Yt,"styles",el);let z=Yt;class se{constructor({tag:t,elementId:n,styles:r}){S(this,"element");if(this.element=document.createElement(t),n&&this.element.setAttribute("id",n),r){const s=z.getStyles(),i=r(s);this.element.className=i}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof se?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function dm(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function pm(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fm=(function(){function e(n){var r=this;this._insertTag=function(s){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,i),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(pm(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=dm(s);try{i.insertRule(r,i.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Ae="-ms-",Zr="-moz-",K="-webkit-",rl="comm",gi="rule",bi="decl",hm="@import",sl="@keyframes",mm="@layer",gm=Math.abs,Jr=String.fromCharCode,bm=Object.assign;function ym(e,t){return _e(e,0)^45?(((t<<2^_e(e,0))<<2^_e(e,1))<<2^_e(e,2))<<2^_e(e,3):0}function il(e){return e.trim()}function wm(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,n){return e.replace(t,n)}function yi(e,t){return e.indexOf(t)}function _e(e,t){return e.charCodeAt(t)|0}function ir(e,t,n){return e.slice(t,n)}function ft(e){return e.length}function wi(e){return e.length}function Xr(e,t){return t.push(e),e}function vm(e,t){return e.map(t).join("")}var Qr=1,Sn=1,ol=0,Fe=0,me=0,_n="";function es(e,t,n,r,s,i,o){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Qr,column:Sn,length:o,return:""}}function or(e,t){return bm(es("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sm(){return me}function _m(){return me=Fe>0?_e(_n,--Fe):0,Sn--,me===10&&(Sn=1,Qr--),me}function We(){return me=Fe<ol?_e(_n,Fe++):0,Sn++,me===10&&(Sn=1,Qr++),me}function ht(){return _e(_n,Fe)}function ts(){return Fe}function ar(e,t){return ir(_n,e,t)}function cr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function al(e){return Qr=Sn=1,ol=ft(_n=e),Fe=0,[]}function cl(e){return _n="",e}function ns(e){return il(ar(Fe-1,vi(e===91?e+2:e===40?e+1:e)))}function Cm(e){for(;(me=ht())&&me<33;)We();return cr(e)>2||cr(me)>3?"":" "}function Em(e,t){for(;--t&&We()&&!(me<48||me>102||me>57&&me<65||me>70&&me<97););return ar(e,ts()+(t<6&&ht()==32&&We()==32))}function vi(e){for(;We();)switch(me){case e:return Fe;case 34:case 39:e!==34&&e!==39&&vi(me);break;case 40:e===41&&vi(e);break;case 92:We();break}return Fe}function xm(e,t){for(;We()&&e+me!==57;)if(e+me===84&&ht()===47)break;return"/*"+ar(t,Fe-1)+"*"+Jr(e===47?e:We())}function Im(e){for(;!cr(ht());)We();return ar(e,Fe)}function Tm(e){return cl(rs("",null,null,null,[""],e=al(e),0,[0],e))}function rs(e,t,n,r,s,i,o,a,c){for(var l=0,u=0,d=o,p=0,h=0,f=0,m=1,g=1,_=1,x=0,w="",C=s,N=i,A=r,b=w;g;)switch(f=x,x=We()){case 40:if(f!=108&&_e(b,d-1)==58){yi(b+=Y(ns(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:b+=ns(x);break;case 9:case 10:case 13:case 32:b+=Cm(f);break;case 92:b+=Em(ts()-1,7);continue;case 47:switch(ht()){case 42:case 47:Xr(Am(xm(We(),ts()),t,n),c);break;default:b+="/"}break;case 123*m:a[l++]=ft(b)*_;case 125*m:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+u:_==-1&&(b=Y(b,/\f/g,"")),h>0&&ft(b)-d&&Xr(h>32?ul(b+";",r,n,d-1):ul(Y(b," ","")+";",r,n,d-2),c);break;case 59:b+=";";default:if(Xr(A=ll(b,t,n,l,u,s,a,w,C=[],N=[],d),i),x===123)if(u===0)rs(b,t,A,A,C,i,d,a,N);else switch(p===99&&_e(b,3)===110?100:p){case 100:case 108:case 109:case 115:rs(e,A,A,r&&Xr(ll(e,A,A,0,0,s,a,w,s,C=[],d),N),s,N,d,a,r?C:N);break;default:rs(b,A,A,A,[""],N,0,a,N)}}l=u=h=0,m=_=1,w=b="",d=o;break;case 58:d=1+ft(b),h=f;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&_m()==125)continue}switch(b+=Jr(x),x*m){case 38:_=u>0?1:(b+="\f",-1);break;case 44:a[l++]=(ft(b)-1)*_,_=1;break;case 64:ht()===45&&(b+=ns(We())),p=ht(),u=d=ft(w=b+=Im(ts())),x++;break;case 45:f===45&&ft(b)==2&&(m=0)}}return i}function ll(e,t,n,r,s,i,o,a,c,l,u){for(var d=s-1,p=s===0?i:[""],h=wi(p),f=0,m=0,g=0;f<r;++f)for(var _=0,x=ir(e,d+1,d=gm(m=o[f])),w=e;_<h;++_)(w=il(m>0?p[_]+" "+x:Y(x,/&\f/g,p[_])))&&(c[g++]=w);return es(e,t,n,s===0?gi:a,c,l,u)}function Am(e,t,n){return es(e,t,n,rl,Jr(Sm()),ir(e,2,-2),0)}function ul(e,t,n,r){return es(e,t,n,bi,ir(e,0,r),ir(e,r+1,-1),r)}function Cn(e,t){for(var n="",r=wi(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function km(e,t,n,r){switch(e.type){case mm:if(e.children.length)break;case hm:case bi:return e.return=e.return||e.value;case rl:return"";case sl:return e.return=e.value+"{"+Cn(e.children,r)+"}";case gi:e.value=e.props.join(",")}return ft(n=Cn(e.children,r))?e.return=e.value+"{"+n+"}":""}function Rm(e){var t=wi(e);return function(n,r,s,i){for(var o="",a=0;a<t;a++)o+=e[a](n,r,s,i)||"";return o}}function Pm(e){return function(t){t.root||(t=t.return)&&e(t)}}function Om(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Lm=function(t,n,r){for(var s=0,i=0;s=i,i=ht(),s===38&&i===12&&(n[r]=1),!cr(i);)We();return ar(t,Fe)},Nm=function(t,n){var r=-1,s=44;do switch(cr(s)){case 0:s===38&&ht()===12&&(n[r]=1),t[r]+=Lm(Fe-1,n,r);break;case 2:t[r]+=ns(s);break;case 4:if(s===44){t[++r]=ht()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jr(s)}while(s=We());return t},Mm=function(t,n){return cl(Nm(al(t),n))},dl=new WeakMap,Dm=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!dl.get(r))&&!s){dl.set(t,!0);for(var i=[],o=Mm(n,i),a=r.props,c=0,l=0;c<o.length;c++)for(var u=0;u<a.length;u++,l++)t.props[l]=i[c]?o[c].replace(/&\f/g,a[u]):a[u]+" "+o[c]}}},Fm=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function pl(e,t){switch(ym(e,t)){case 5103:return K+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return K+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return K+e+Zr+e+Ae+e+e;case 6828:case 4268:return K+e+Ae+e+e;case 6165:return K+e+Ae+"flex-"+e+e;case 5187:return K+e+Y(e,/(\w+).+(:[^]+)/,K+"box-$1$2"+Ae+"flex-$1$2")+e;case 5443:return K+e+Ae+"flex-item-"+Y(e,/flex-|-self/,"")+e;case 4675:return K+e+Ae+"flex-line-pack"+Y(e,/align-content|flex-|-self/,"")+e;case 5548:return K+e+Ae+Y(e,"shrink","negative")+e;case 5292:return K+e+Ae+Y(e,"basis","preferred-size")+e;case 6060:return K+"box-"+Y(e,"-grow","")+K+e+Ae+Y(e,"grow","positive")+e;case 4554:return K+Y(e,/([^-])(transform)/g,"$1"+K+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,K+"$1"),/(image-set)/,K+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,K+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,K+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+K+e+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,K+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ft(e)-1-t>6)switch(_e(e,t+1)){case 109:if(_e(e,t+4)!==45)break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+K+"$2-$3$1"+Zr+(_e(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yi(e,"stretch")?pl(Y(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(_e(e,t+1)!==115)break;case 6444:switch(_e(e,ft(e)-3-(~yi(e,"!important")&&10))){case 107:return Y(e,":",":"+K)+e;case 101:return Y(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+K+(_e(e,14)===45?"inline-":"")+"box$3$1"+K+"$2$3$1"+Ae+"$2box$3")+e}break;case 5936:switch(_e(e,t+11)){case 114:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return K+e+Ae+e+e}return e}var Bm=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case bi:t.return=pl(t.value,t.length);break;case sl:return Cn([or(t,{value:Y(t.value,"@","@"+K)})],s);case gi:if(t.length)return vm(t.props,function(i){switch(wm(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cn([or(t,{props:[Y(i,/:(read-\w+)/,":"+Zr+"$1")]})],s);case"::placeholder":return Cn([or(t,{props:[Y(i,/:(plac\w+)/,":"+K+"input-$1")]}),or(t,{props:[Y(i,/:(plac\w+)/,":"+Zr+"$1")]}),or(t,{props:[Y(i,/:(plac\w+)/,Ae+"input-$1")]})],s)}return""})}},Um=[Bm],$m=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var s=t.stylisPlugins||Um,i={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var c,l=[Dm,Fm];{var u,d=[km,Pm(function(m){u.insert(m)})],p=Rm(l.concat(s,d)),h=function(g){return Cn(Tm(g),p)};c=function(g,_,x,w){u=x,h(g?g+"{"+_.styles+"}":_.styles),w&&(f.inserted[_.name]=!0)}}var f={key:n,sheet:new fm({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return f.sheet.hydrate(a),f};function Vm(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var zm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Hm=/[A-Z]|^ms/g,jm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fl=function(t){return t.charCodeAt(1)===45},hl=function(t){return t!=null&&typeof t!="boolean"},Si=Om(function(e){return fl(e)?e:e.replace(Hm,"-$&").toLowerCase()}),ml=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jm,function(r,s,i){return Nt={name:s,styles:i,next:Nt},s})}return zm[t]!==1&&!fl(t)&&typeof n=="number"&&n!==0?n+"px":n};function ss(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Nt={name:s.name,styles:s.styles,next:Nt},s.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Nt={name:o.name,styles:o.styles,next:Nt},o=o.next;var a=i.styles+";";return a}return Wm(e,t,n)}}var c=n;if(t==null)return c;var l=t[c];return l!==void 0?l:c}function Wm(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=ss(e,t,n[s])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var a=o;t!=null&&t[a]!==void 0?r+=i+"{"+t[a]+"}":hl(a)&&(r+=Si(i)+":"+ml(i,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)hl(o[c])&&(r+=Si(i)+":"+ml(i,o[c])+";");else{var l=ss(e,t,o);switch(i){case"animation":case"animationName":{r+=Si(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var gl=/label:\s*([^\s;{]+)\s*(;|$)/g,Nt;function _i(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";Nt=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,s+=ss(n,t,i);else{var o=i;s+=o[0]}for(var a=1;a<e.length;a++)if(s+=ss(n,t,e[a]),r){var c=i;s+=c[a]}gl.lastIndex=0;for(var l="",u;(u=gl.exec(s))!==null;)l+="-"+u[1];var d=Vm(s)+l;return{name:d,styles:s,next:Nt}}function bl(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var qm=function(t,n,r){var s=t.key+"-"+n.name;t.registered[s]===void 0&&(t.registered[s]=n.styles)},Gm=function(t,n,r){qm(t,n);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+s:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function yl(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function wl(e,t,n){var r=[],s=bl(e,r,n);return r.length<2?n:s+t(r)}var Km=function(t){var n=$m(t);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered,void 0);return Gm(n,d),n.key+"-"+d.name},s=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered),p="animation-"+d.name;return yl(n,{name:d.name,styles:"@keyframes "+p+"{"+d.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered);yl(n,d)},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return wl(n.registered,r,Ym(l))};return{css:r,cx:o,injectGlobal:i,keyframes:s,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:bl.bind(null,n.registered),merge:wl.bind(null,n.registered,r)}},Ym=function e(t){for(var n="",r=0;r<t.length;r++){var s=t[r];if(s!=null){var i=void 0;switch(typeof s){case"boolean":break;case"object":{if(Array.isArray(s))i=e(s);else{i="";for(var o in s)s[o]&&o&&(i&&(i+=" "),i+=o)}break}default:i=s}i&&(n&&(n+=" "),n+=i)}}return n},Ci=Km({key:"css"}),Zm=Ci.cx,lr=Ci.keyframes,j=Ci.css;const Jm=lr`
|
|
3
|
+
${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),Y1=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),xd=e=>{const t=JSON.stringify(e);return btoa(t)},J1=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.replace(/[^A-Za-z0-9]/g,"");let i="",o=0,s=!1;for(const a of n){if(s){i+=a,s=!1;continue}if(a==="\\"){s=!0;continue}if(o>=r.length)break;switch(a){case"#":if(/\d/.test(r[o]))i+=r[o++];else{o++;continue}break;case"A":if(/[A-Za-z]/.test(r[o]))i+=r[o++];else{o++;continue}break;case"*":if(/[A-Za-z0-9]/.test(r[o]))i+=r[o++];else{o++;continue}break;default:i+=a,r[o]===a&&o++;break}}return i},Z1=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.split("");let i="",o=!1,s=0;for(const a of n){if(o){o=!1,r[s]===a&&s++;continue}if(a==="\\"){o=!0;continue}if(s>=r.length)break;switch(a){case"#":/\d/.test(r[s])&&(i+=r[s]),s++;break;case"A":/[A-Za-z]/.test(r[s])&&(i+=r[s]),s++;break;case"*":/[A-Za-z0-9]/.test(r[s])&&(i+=r[s]),s++;break;default:r[s]===a&&s++;break}}return i},X1=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3||8).toString(16)}),Q1=e=>e?e.startsWith("+")?e:`+${e}`:"",sr=Array.isArray,sn=e=>e!==null&&typeof e=="object"&&!sr(e),oo=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[K1(n)]:sn(r)?oo(r):sr(r)?r.map(i=>sn(i)?oo(i):i):r}),{}),ey=e=>{if(sr(e))return e.map(t=>sn(t)?oo(t):t);throw new Error("Input is not an array")},so=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[Y1(n)]:sn(r)?so(r):sr(r)?r.map(i=>sn(i)?so(i):i):r}),{}),ty=e=>{if(sr(e))return e.map(t=>sn(t)?so(t):t);throw new Error("Input is not an array")},Zs=(e,t)=>sr(e)?t==="snake_case-to-camelCase"?ey(e):ty(e):sn(e)?t==="snake_case-to-camelCase"?oo(e):so(e):e,Ad=(e,t)=>{if(!t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const i=t[r],o=e[r];sn(i)&&sn(o)?n[r]=Ad(o,i):i!==void 0&&(n[r]=i)}return n},ny={light:Id,dark:z1},Nn=class Nn{static init(t){const n=io(t==null?void 0:t.theme,j1,"light");Nn.currentTheme=n,Nn.styles=Ad(ny[n],t==null?void 0:t.styles)}static getStyles(){return Nn.styles}static getTheme(){return Nn.currentTheme}};S(Nn,"currentTheme","light"),S(Nn,"styles",Id);let Z=Nn;class be{constructor({tag:t,elementId:n,styles:r}){S(this,"element");if(this.element=document.createElement(t),n&&this.element.setAttribute("id",n),r){const i=Z.getStyles(),o=r(i);this.element.className=o}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof be?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function ry(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function iy(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var oy=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(iy(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ry(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Ke="-ms-",ao="-moz-",ue="-webkit-",kd="comm",Xs="rule",Qs="decl",sy="@import",Rd="@keyframes",ay="@layer",cy=Math.abs,co=String.fromCharCode,uy=Object.assign;function ly(e,t){return Ve(e,0)^45?(((t<<2^Ve(e,0))<<2^Ve(e,1))<<2^Ve(e,2))<<2^Ve(e,3):0}function Pd(e){return e.trim()}function dy(e,t){return(e=t.exec(e))?e[0]:e}function le(e,t,n){return e.replace(t,n)}function ea(e,t){return e.indexOf(t)}function Ve(e,t){return e.charCodeAt(t)|0}function Zr(e,t,n){return e.slice(t,n)}function zt(e){return e.length}function ta(e){return e.length}function uo(e,t){return t.push(e),e}function fy(e,t){return e.map(t).join("")}var lo=1,ar=1,Od=0,st=0,Le=0,cr="";function fo(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:lo,column:ar,length:s,return:""}}function Xr(e,t){return uy(fo("",null,null,"",null,null,0),e,{length:-e.length},t)}function py(){return Le}function hy(){return Le=st>0?Ve(cr,--st):0,ar--,Le===10&&(ar=1,lo--),Le}function gt(){return Le=st<Od?Ve(cr,st++):0,ar++,Le===10&&(ar=1,lo++),Le}function Ht(){return Ve(cr,st)}function po(){return st}function Qr(e,t){return Zr(cr,e,t)}function ei(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ld(e){return lo=ar=1,Od=zt(cr=e),st=0,[]}function Nd(e){return cr="",e}function ho(e){return Pd(Qr(st-1,na(e===91?e+2:e===40?e+1:e)))}function gy(e){for(;(Le=Ht())&&Le<33;)gt();return ei(e)>2||ei(Le)>3?"":" "}function my(e,t){for(;--t&>()&&!(Le<48||Le>102||Le>57&&Le<65||Le>70&&Le<97););return Qr(e,po()+(t<6&&Ht()==32&>()==32))}function na(e){for(;gt();)switch(Le){case e:return st;case 34:case 39:e!==34&&e!==39&&na(Le);break;case 40:e===41&&na(e);break;case 92:gt();break}return st}function vy(e,t){for(;gt()&&e+Le!==57;)if(e+Le===84&&Ht()===47)break;return"/*"+Qr(t,st-1)+"*"+co(e===47?e:gt())}function yy(e){for(;!ei(Ht());)gt();return Qr(e,st)}function by(e){return Nd(go("",null,null,null,[""],e=Ld(e),0,[0],e))}function go(e,t,n,r,i,o,s,a,c){for(var u=0,l=0,d=s,f=0,h=0,p=0,g=1,m=1,v=1,y=0,b="",w=i,C=o,_=r,E=b;m;)switch(p=y,y=gt()){case 40:if(p!=108&&Ve(E,d-1)==58){ea(E+=le(ho(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=ho(y);break;case 9:case 10:case 13:case 32:E+=gy(p);break;case 92:E+=my(po()-1,7);continue;case 47:switch(Ht()){case 42:case 47:uo(wy(vy(gt(),po()),t,n),c);break;default:E+="/"}break;case 123*g:a[u++]=zt(E)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:v==-1&&(E=le(E,/\f/g,"")),h>0&&zt(E)-d&&uo(h>32?Dd(E+";",r,n,d-1):Dd(le(E," ","")+";",r,n,d-2),c);break;case 59:E+=";";default:if(uo(_=Md(E,t,n,u,l,i,a,b,w=[],C=[],d),o),y===123)if(l===0)go(E,t,_,_,w,o,d,a,C);else switch(f===99&&Ve(E,3)===110?100:f){case 100:case 108:case 109:case 115:go(e,_,_,r&&uo(Md(e,_,_,0,0,i,a,b,i,w=[],d),C),i,C,d,a,r?w:C);break;default:go(E,_,_,_,[""],C,0,a,C)}}u=l=h=0,g=v=1,b=E="",d=s;break;case 58:d=1+zt(E),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&hy()==125)continue}switch(E+=co(y),y*g){case 38:v=l>0?1:(E+="\f",-1);break;case 44:a[u++]=(zt(E)-1)*v,v=1;break;case 64:Ht()===45&&(E+=ho(gt())),f=Ht(),l=d=zt(b=E+=yy(po())),y++;break;case 45:p===45&&zt(E)==2&&(g=0)}}return o}function Md(e,t,n,r,i,o,s,a,c,u,l){for(var d=i-1,f=i===0?o:[""],h=ta(f),p=0,g=0,m=0;p<r;++p)for(var v=0,y=Zr(e,d+1,d=cy(g=s[p])),b=e;v<h;++v)(b=Pd(g>0?f[v]+" "+y:le(y,/&\f/g,f[v])))&&(c[m++]=b);return fo(e,t,n,i===0?Xs:a,c,u,l)}function wy(e,t,n){return fo(e,t,n,kd,co(py()),Zr(e,2,-2),0)}function Dd(e,t,n,r){return fo(e,t,n,Qs,Zr(e,0,r),Zr(e,r+1,-1),r)}function ur(e,t){for(var n="",r=ta(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Ey(e,t,n,r){switch(e.type){case ay:if(e.children.length)break;case sy:case Qs:return e.return=e.return||e.value;case kd:return"";case Rd:return e.return=e.value+"{"+ur(e.children,r)+"}";case Xs:e.value=e.props.join(",")}return zt(n=ur(e.children,r))?e.return=e.value+"{"+n+"}":""}function Sy(e){var t=ta(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function _y(e){return function(t){t.root||(t=t.return)&&e(t)}}function Cy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ty=function(t,n,r){for(var i=0,o=0;i=o,o=Ht(),i===38&&o===12&&(n[r]=1),!ei(o);)gt();return Qr(t,st)},Iy=function(t,n){var r=-1,i=44;do switch(ei(i)){case 0:i===38&&Ht()===12&&(n[r]=1),t[r]+=Ty(st-1,n,r);break;case 2:t[r]+=ho(i);break;case 4:if(i===44){t[++r]=Ht()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=co(i)}while(i=gt());return t},xy=function(t,n){return Nd(Iy(Ld(t),n))},Fd=new WeakMap,Ay=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Fd.get(r))&&!i){Fd.set(t,!0);for(var o=[],s=xy(n,o),a=r.props,c=0,u=0;c<s.length;c++)for(var l=0;l<a.length;l++,u++)t.props[u]=o[c]?s[c].replace(/&\f/g,a[l]):a[l]+" "+s[c]}}},ky=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ud(e,t){switch(ly(e,t)){case 5103:return ue+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ue+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ue+e+ao+e+Ke+e+e;case 6828:case 4268:return ue+e+Ke+e+e;case 6165:return ue+e+Ke+"flex-"+e+e;case 5187:return ue+e+le(e,/(\w+).+(:[^]+)/,ue+"box-$1$2"+Ke+"flex-$1$2")+e;case 5443:return ue+e+Ke+"flex-item-"+le(e,/flex-|-self/,"")+e;case 4675:return ue+e+Ke+"flex-line-pack"+le(e,/align-content|flex-|-self/,"")+e;case 5548:return ue+e+Ke+le(e,"shrink","negative")+e;case 5292:return ue+e+Ke+le(e,"basis","preferred-size")+e;case 6060:return ue+"box-"+le(e,"-grow","")+ue+e+Ke+le(e,"grow","positive")+e;case 4554:return ue+le(e,/([^-])(transform)/g,"$1"+ue+"$2")+e;case 6187:return le(le(le(e,/(zoom-|grab)/,ue+"$1"),/(image-set)/,ue+"$1"),e,"")+e;case 5495:case 3959:return le(e,/(image-set\([^]*)/,ue+"$1$`$1");case 4968:return le(le(e,/(.+:)(flex-)?(.*)/,ue+"box-pack:$3"+Ke+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ue+e+e;case 4095:case 3583:case 4068:case 2532:return le(e,/(.+)-inline(.+)/,ue+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(zt(e)-1-t>6)switch(Ve(e,t+1)){case 109:if(Ve(e,t+4)!==45)break;case 102:return le(e,/(.+:)(.+)-([^]+)/,"$1"+ue+"$2-$3$1"+ao+(Ve(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ea(e,"stretch")?Ud(le(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ve(e,t+1)!==115)break;case 6444:switch(Ve(e,zt(e)-3-(~ea(e,"!important")&&10))){case 107:return le(e,":",":"+ue)+e;case 101:return le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(Ve(e,14)===45?"inline-":"")+"box$3$1"+ue+"$2$3$1"+Ke+"$2box$3")+e}break;case 5936:switch(Ve(e,t+11)){case 114:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+Ke+e+e}return e}var Ry=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Qs:t.return=Ud(t.value,t.length);break;case Rd:return ur([Xr(t,{value:le(t.value,"@","@"+ue)})],i);case Xs:if(t.length)return fy(t.props,function(o){switch(dy(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ur([Xr(t,{props:[le(o,/:(read-\w+)/,":"+ao+"$1")]})],i);case"::placeholder":return ur([Xr(t,{props:[le(o,/:(plac\w+)/,":"+ue+"input-$1")]}),Xr(t,{props:[le(o,/:(plac\w+)/,":"+ao+"$1")]}),Xr(t,{props:[le(o,/:(plac\w+)/,Ke+"input-$1")]})],i)}return""})}},Py=[Ry],Oy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||Py,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(g)});var c,u=[Ay,ky];{var l,d=[Ey,_y(function(g){l.insert(g)})],f=Sy(u.concat(i,d)),h=function(m){return ur(by(m),f)};c=function(m,v,y,b){l=y,h(m?m+"{"+v.styles+"}":v.styles),b&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new oy({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return p.sheet.hydrate(a),p};function Ly(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ny={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},My=/[A-Z]|^ms/g,Dy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bd=function(t){return t.charCodeAt(1)===45},$d=function(t){return t!=null&&typeof t!="boolean"},ra=Cy(function(e){return Bd(e)?e:e.replace(My,"-$&").toLowerCase()}),Vd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Dy,function(r,i,o){return hn={name:i,styles:o,next:hn},i})}return Ny[t]!==1&&!Bd(t)&&typeof n=="number"&&n!==0?n+"px":n};function mo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return hn={name:i.name,styles:i.styles,next:hn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)hn={name:s.name,styles:s.styles,next:hn},s=s.next;var a=o.styles+";";return a}return Fy(e,t,n)}}var c=n;if(t==null)return c;var u=t[c];return u!==void 0?u:c}function Fy(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=mo(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":$d(a)&&(r+=ra(o)+":"+Vd(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)$d(s[c])&&(r+=ra(o)+":"+Vd(o,s[c])+";");else{var u=mo(e,t,s);switch(o){case"animation":case"animationName":{r+=ra(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var zd=/label:\s*([^\s;{]+)\s*(;|$)/g,hn;function ia(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";hn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=mo(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=mo(n,t,e[a]),r){var c=o;i+=c[a]}zd.lastIndex=0;for(var u="",l;(l=zd.exec(i))!==null;)u+="-"+l[1];var d=Ly(i)+u;return{name:d,styles:i,next:hn}}function Hd(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Uy=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},By=function(t,n,r){Uy(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function jd(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function qd(e,t,n){var r=[],i=Hd(e,r,n);return r.length<2?n:i+t(r)}var $y=function(t){var n=Oy(t);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var r=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=ia(u,n.registered,void 0);return By(n,d),n.key+"-"+d.name},i=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=ia(u,n.registered),f="animation-"+d.name;return jd(n,{name:d.name,styles:"@keyframes "+f+"{"+d.styles+"}"}),f},o=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=ia(u,n.registered);jd(n,d)},s=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];return qd(n.registered,r,Vy(u))};return{css:r,cx:s,injectGlobal:o,keyframes:i,hydrate:function(c){c.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Hd.bind(null,n.registered),merge:qd.bind(null,n.registered,r)}},Vy=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var s in i)i[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},oa=$y({key:"css"}),zy=oa.cx,ti=oa.keyframes,ne=oa.css;const Hy=ti`
|
|
4
4
|
100% {
|
|
5
5
|
transform: rotate(360deg);
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,jy=ti`
|
|
8
8
|
0% {
|
|
9
9
|
clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
|
|
10
10
|
}
|
|
@@ -20,16 +20,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
20
20
|
100% {
|
|
21
21
|
clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,qy=ti`
|
|
24
24
|
100% {
|
|
25
25
|
transform: rotate(1turn);
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,Wy=(e,t)=>ne`
|
|
28
28
|
width: ${e}px;
|
|
29
29
|
height: ${e}px;
|
|
30
30
|
border-radius: 50%;
|
|
31
31
|
position: relative;
|
|
32
|
-
animation: ${
|
|
32
|
+
animation: ${Hy} 1s linear infinite;
|
|
33
33
|
|
|
34
34
|
&::before {
|
|
35
35
|
content: '';
|
|
@@ -38,9 +38,9 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
38
38
|
inset: 0px;
|
|
39
39
|
border-radius: 50%;
|
|
40
40
|
border: 2.5px solid ${t};
|
|
41
|
-
animation: ${
|
|
41
|
+
animation: ${jy} 2s linear infinite;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,Gy=(e,t)=>ne`
|
|
44
44
|
width: ${e}px;
|
|
45
45
|
aspect-ratio: 1;
|
|
46
46
|
border-radius: 50%;
|
|
@@ -48,8 +48,8 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
48
48
|
radial-gradient(farthest-side, ${t} 94%, transparent) top/8px 8px no-repeat,
|
|
49
49
|
conic-gradient(transparent 30%, ${t});
|
|
50
50
|
mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
|
|
51
|
-
animation: ${
|
|
52
|
-
`;class
|
|
51
|
+
animation: ${qy} 1s infinite linear;
|
|
52
|
+
`;class an extends be{constructor({size:t=24,color:n="currentColor",variant:r="inline"}){super({tag:r==="inline"?"span":"div",styles:()=>r==="inline"?Wy(t,n):Gy(t,n)})}}const Ky=(e,t)=>ne`
|
|
53
53
|
font-family: ${e.fontFamily};
|
|
54
54
|
color: ${(t==null?void 0:t.color)||e.textColor};
|
|
55
55
|
|
|
@@ -59,25 +59,25 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
59
59
|
|
|
60
60
|
line-height: ${t.lineHeight}px;
|
|
61
61
|
text-transform: ${t.uppercase?"uppercase":"none"};
|
|
62
|
-
`;class H extends se{constructor({text:t,variant:n="span",weight:r=500,size:s=12,lineHeight:i=18,align:o="left",color:a,uppercase:c=!1}){const l={size:s,weight:r,lineHeight:i,align:o,color:a,uppercase:c};super({tag:n,styles:u=>ng(u,l)}),this.element.textContent=t}}const F=e=>typeof e=="string",ur=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},vl=e=>e==null?"":""+e,rg=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},sg=/###/g,Sl=e=>e&&e.indexOf("###")>-1?e.replace(sg,"."):e,_l=e=>!e||F(e),dr=(e,t,n)=>{const r=F(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(_l(e))return{};const i=Sl(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return _l(e)?{}:{obj:e,k:Sl(r[s])}},Cl=(e,t,n)=>{const{obj:r,k:s}=dr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=dr(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=dr(e,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ig=(e,t,n,r)=>{const{obj:s,k:i}=dr(e,t,Object);s[i]=s[i]||[],s[i].push(n)},is=(e,t)=>{const{obj:n,k:r}=dr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},og=(e,t,n)=>{const r=is(e,n);return r!==void 0?r:is(t,n)},El=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?F(e[r])||e[r]instanceof String||F(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):El(e[r],t[r],n):e[r]=t[r]);return e},En=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ag={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const cg=e=>F(e)?e.replace(/[&<>"'\/]/g,t=>ag[t]):e;class lg{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ug=[" ",",","?","!",";"],dg=new lg(20),pg=(e,t,n)=>{t=t||"",n=n||"";const r=ug.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=dg.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},Ei=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let s=e;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let c=i;c<r.length;++c)if(c!==i&&(a+=n),a+=r[c],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<r.length-1)continue;i+=c-i+1;break}s=o}return s},os=e=>e==null?void 0:e.replace("_","-"),fg={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class as{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||fg,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(F(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new as(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new as(this.logger,t)}}var mt=new as;class cs{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[a,c]=o;for(let l=0;l<c;l++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,c]=o;for(let l=0;l<c;l++)a.apply(a,[t,...r])})}}class xl extends cs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var l,u;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):F(r)&&i?a.push(...r.split(i)):a.push(r)));const c=is(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||!F(r)?c:Ei((u=(l=this.data)==null?void 0:l[t])==null?void 0:u[n],r,i)}addResource(t,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),Cl(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(F(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=is(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?El(c,r,i):c={...c,...r},Cl(this.data,a,c),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Il={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{var o;t=((o=this.processors[i])==null?void 0:o.process(t,n,r,s))??t}),t}};const Tl={},Al=e=>!F(e)&&typeof e!="boolean"&&typeof e!="number";class ls extends cs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),rg(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!pg(t,r,s);if(o&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:F(i)?[i]:i};const l=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(s)}return{key:t,namespaces:F(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],l=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((l==null?void 0:l.toLowerCase())==="cimode"){if(u){const k=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${k}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${k}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const d=this.resolve(t,n);let p=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||o,f=(d==null?void 0:d.exactUsedKey)||o,m=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!F(n.count),w=ls.hasDefaultValue(n),C=x?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&x?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",A=x&&!n.ordinal&&n.count===0,b=A&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${C}`]||n[`defaultValue${N}`]||n.defaultValue;let P=p;_&&!p&&w&&(P=b);const T=Al(P),R=Object.prototype.toString.apply(P);if(_&&P&&T&&m.indexOf(R)<0&&!(F(g)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,P,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(d.res=k,d.usedParams=this.getUsedParamsDetails(n),d):k}if(i){const k=Array.isArray(P),O=k?[]:{},L=k?f:h;for(const M in P)if(Object.prototype.hasOwnProperty.call(P,M)){const ie=`${L}${i}${M}`;w&&!p?O[M]=this.translate(ie,{...n,defaultValue:Al(b)?b[M]:void 0,joinArrays:!1,ns:a}):O[M]=this.translate(ie,{...n,joinArrays:!1,ns:a}),O[M]===ie&&(O[M]=P[M])}p=O}}else if(_&&F(g)&&Array.isArray(p))p=p.join(g),p&&(p=this.extendTranslation(p,t,n,r));else{let k=!1,O=!1;!this.isValidLookup(p)&&w&&(k=!0,p=b),this.isValidLookup(p)||(O=!0,p=o);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:p,ie=w&&b!==p&&this.options.updateMissing;if(O||k||ie){if(this.logger.log(ie?"updateKey":"missingKey",l,c,o,ie?b:p),i){const re=this.resolve(o,{...n,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const Pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Pe&&Pe[0])for(let re=0;re<Pe.length;re++)ee.push(Pe[re]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(n.lng||this.language):ee.push(n.lng||this.language);const he=(re,ae,G)=>{var ge;const ue=w&&G!==p?G:M;this.options.missingKeyHandler?this.options.missingKeyHandler(re,c,ae,ue,ie,n):(ge=this.backendConnector)!=null&&ge.saveMissing&&this.backendConnector.saveMissing(re,c,ae,ue,ie,n),this.emit("missingKey",re,c,ae,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?ee.forEach(re=>{const ae=this.pluralResolver.getSuffixes(re,n);A&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&ae.push(`${this.options.pluralSeparator}zero`),ae.forEach(G=>{he([re],o+G,n[`defaultValue${G}`]||b)})}):he(ee,o,b))}p=this.extendTranslation(p,t,n,d,r),O&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${o}`),(O||k)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,k?p:void 0))}return s?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,n,r,s,i){var l,u;var o=this;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=F(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(d){const f=t.match(this.interpolator.nestingRegexp);p=f&&f.length}let h=r.replace&&!F(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||s.usedLng,r),d){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;p<m&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(i==null?void 0:i[0])===m[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):o.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=F(a)?[a]:a;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=Il.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return F(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(c,n),u=l.key;s=u;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const p=n.count!==void 0&&!F(n.count),h=p&&!n.ordinal&&n.count===0,f=n.context!==void 0&&(F(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(g=>{var _,x;this.isValidLookup(r)||(a=g,!Tl[`${m[0]}-${g}`]&&((_=this.utils)!=null&&_.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(a))&&(Tl[`${m[0]}-${g}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(w=>{var A;if(this.isValidLookup(r))return;o=w;const C=[u];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,w,g,n);else{let b;p&&(b=this.pluralResolver.getSuffix(w,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(C.push(u+b),n.ordinal&&b.indexOf(T)===0&&C.push(u+b.replace(T,this.options.pluralSeparator)),h&&C.push(u+P)),f){const R=`${u}${this.options.contextSeparator}${n.context}`;C.push(R),p&&(C.push(R+b),n.ordinal&&b.indexOf(T)===0&&C.push(R+b.replace(T,this.options.pluralSeparator)),h&&C.push(R+P))}}let N;for(;N=C.pop();)this.isValidLookup(r)||(i=N,r=this.getResource(w,g,N,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!F(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class kl{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mt.create("languageUtils")}getScriptPartFromCode(t){if(t=os(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=os(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(F(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),F(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return F(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):F(t)&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Rl={zero:0,one:1,two:2,few:3,many:4,other:5},Pl={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=mt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=os(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Pl;if(!t.match(/-|_/))return Pl;const c=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(c,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Rl[s]-Rl[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Ol=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=og(e,t,n);return!i&&s&&F(n)&&(i=Ei(e,n,r),i===void 0&&(i=Ei(t,n,r))),i},xi=e=>e.replace(/\$/g,"$$$$");class mg{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:g,maxReplaces:_,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:cg,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?En(i):o||"{{",this.suffix=a?En(a):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?En(p):h||En("$t("),this.nestingSuffix=f?En(f):m||En(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=_||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){var h;let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=f=>{if(f.indexOf(this.formatSeparator)<0){const x=Ol(n,c,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...s,...n,interpolationkey:f}):x}const m=f.split(this.formatSeparator),g=m.shift().trim(),_=m.join(this.formatSeparator).trim();return this.format(Ol(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),_,r,{...s,...n,interpolationkey:g})};this.resetRegExp();const u=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>xi(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?xi(this.escape(f)):xi(f)}].forEach(f=>{for(a=0;i=f.regex.exec(t);){const m=i[1].trim();if(o=l(m),o===void 0)if(typeof u=="function"){const _=u(t,i,s);o=F(_)?_:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),o="";else!F(o)&&!this.useRawValueToEscape&&(o=vl(o));const g=f.safeValue(o);if(t=t.replace(i[0],g),d?(f.regex.lastIndex+=o.length,f.regex.lastIndex-=i[0].length):f.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(c,l)=>{const u=this.nestingOptionsSeparator;if(c.indexOf(u)<0)return c;const d=c.split(new RegExp(`${u}[ ]*{`));let p=`{${d[1]}`;c=d[0],p=this.interpolate(p,o);const h=p.match(/'/g),f=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!f||f.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),l&&(o={...l,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${u}${p}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];o={...r},o=o.replace&&!F(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const u=s[1].split(this.formatSeparator).map(d=>d.trim());s[1]=u.shift(),c=u,l=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&!F(i))return i;F(i)||(i=vl(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),l&&(i=c.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const gg=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=l),l==="false"&&(n[u]=!1),l==="true"&&(n[u]=!0),isNaN(l)||(n[u]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},xn=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(os(r),s),t[o]=a),a(n)}};class bg{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mt.create("formatter"),this.options=t,this.formats={number:xn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:xn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:xn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:xn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:xn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=xn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,c)=>{var d;const{formatName:l,formatOptions:u}=gg(c);if(this.formats[l]){let p=a;try{const h=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},f=h.locale||h.lng||s.locale||s.lng||r;p=this.formats[l](a,f,{...u,...s,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${l}`);return a},t)}}const yg=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wg extends cs{constructor(t,n,r){var i,o;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=mt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},c={};return t.forEach(l=>{let u=!0;n.forEach(d=>{const p=`${l}|${d}`;!r.reload&&this.store.hasResourceBundle(l,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,u=!1,o[p]===void 0&&(o[p]=!0),i[p]===void 0&&(i[p]=!0),c[d]===void 0&&(c[d]=!0)))}),u||(a[l]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{ig(c.loaded,[i],o),yg(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{a[l]||(a[l]={});const u=c.loaded[l];u.length&&u.forEach(d=>{a[l][d]===void 0&&(a[l][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(l,u)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const l=c(t,n);l&&typeof l.then=="function"?l.then(u=>a(null,u)).catch(a):a(null,l)}catch(l){a(l)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();F(t)&&(t=this.languageUtils.toResolveHierarchy(t)),F(n)&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i){var c,l,u,d,p;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const h={...o,isUpdate:i},f=this.backend.create.bind(this.backend);if(f.length<6)try{let m;f.length===5?m=f(t,n,r,s,h):m=f(t,n,r,s),m&&typeof m.then=="function"?m.then(g=>a(null,g)).catch(a):a(null,m)}catch(m){a(m)}else f(t,n,r,s,a,h)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Ll=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),F(e[1])&&(t.defaultValue=e[1]),F(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nl=e=>{var t,n;return F(e.ns)&&(e.ns=[e.ns]),F(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),F(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},us=()=>{},vg=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class pr extends cs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nl(t),this.services={},this.logger=mt,this.modules={external:[]},vg(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(F(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Ll();this.options={...s,...this.options,...Nl(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mt.init(i(this.modules.logger),this.options):mt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=bg;const d=new kl(this.options);this.store=new xl(this.options.resources,this.options);const p=this.services;p.logger=mt,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new hg(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=i(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new mg(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new wg(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(h){for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];t.emit(h,...m)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ls(this.services,this.options),this.translator.on("*",function(h){for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];t.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=us),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const c=ur(),l=()=>{const u=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(p),r(d,p)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),c}loadResources(t){var i,o;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:us;const s=F(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>c(u)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,l=>c(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=ur();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=us),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Il.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=ur();this.emit("languageChanging",t);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{var u,d;!t&&!c&&this.services.languageDetector&&(c=[]);const l=F(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,l)),this.loadResources(l,p=>{o(p,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const i=function(o,a){let c;if(typeof a!="object"){for(var l=arguments.length,u=new Array(l>2?l-2:0),d=2;d<l;d++)u[d-2]=arguments[d];c=s.options.overloadTranslationOptionHandler([o,a].concat(u))}else c={...a};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);const p=s.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(o)?h=o.map(f=>`${c.keyPrefix}${p}${f}`):h=c.keyPrefix?`${c.keyPrefix}${p}${o}`:o,s.t(h,c)};return F(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){var s;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...n)}exists(){var s;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const l=this.services.backendConnector.state[`${a}|${c}`];return l===-1||l===0||l===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=ur();return this.options.ns?(F(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ur();F(t)&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){var s,i;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new kl(Ll());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new pr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:us;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new pr(s);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},Object.keys(c[l]).reduce((u,d)=>(u[d]={...c[l][d]},u),{})),{});i.store=new xl(a,s),i.services.resourceStore=i.store}return i.translator=new ls(i.services,s),i.translator.on("*",function(a){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const be=pr.createInstance();be.createInstance=pr.createInstance,be.createInstance,be.dir,be.init,be.loadResources,be.reloadResources,be.use,be.changeLanguage,be.getFixedT,be.t,be.exists,be.setDefaultNamespace,be.hasLoadedNamespace,be.loadNamespaces,be.loadLanguages;const Sg={en:{translation:{additional_information:"Additional information",almost_done:"Almost done...",astro_express_checkout:"Express checkout",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",push_notification_sent:"We sent a push notification to your app",qr_code:"QR code",required_field:"Required Field",scan_qr_copy_link:"Scan the QR code or copy the link.",select:"Select",select_item:"Select an item",time_up:"Time's up!",try_again:"Try again",waiting_confirmation:"Waiting for confirmation...",card_holder_label:"Cardholder name",card_holder_placeholder:"Full name as on card",card_number:"Card number",card_exp_date:"Expiration date",card_tokenization_error:"We couldn't process your card. Please check your details and try again."}},es:{translation:{additional_information:"Información adicional",almost_done:"Casi listo...",astro_express_checkout:"Pago express",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",push_notification_sent:"Enviamos una notificación push a tu app",qr_code:"código QR",required_field:"Campo Requerido",scan_qr_copy_link:"Escaneá el código QR o copiá el enlace.",select:"Seleccionar",select_item:"Selecciona una opción",time_up:"Se acabó el tiempo!",try_again:"Inténtalo de nuevo",waiting_confirmation:"Esperando confirmación...",card_holder_label:"Nombre del titular",card_holder_placeholder:"Nombre completo en la tarjeta",card_number:"Número de tarjeta",card_exp_date:"Fecha de vencimiento",card_tokenization_error:"No pudimos procesar tu tarjeta. Verificá los datos y volvé a intentarlo."}},pt:{translation:{additional_information:"Informações adicionais",almost_done:"Finalizando...",astro_express_checkout:"Pagamento expresso",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",push_notification_sent:"Enviamos uma notificação push para seu app",qr_code:"QR code",required_field:"Campo Obrigatório",scan_qr_copy_link:"Escaneie o QR code ou copie o link.",select:"Selecione",select_item:"Selecione um item",time_up:"Tempo esgotado!",try_again:"Tente novamente",waiting_confirmation:"Aguardando confirmação...",card_holder_label:"Nome do titular",card_holder_placeholder:"Nome completo no cartão",card_number:"Número do cartão",card_exp_date:"Data de validade",card_tokenization_error:"Não foi possível processar o seu cartão. Verifique os dados e tente novamente."}}};class V{static init(t){const n=Gr(t==null?void 0:t.language,Qh,"en");return be.init({lng:n,fallbackLng:"en",resources:Sg,interpolation:{escapeValue:!1}})}static getCurrent(){return be.language}static translate(t,n){return be.t(t,n??{})}}const _g=()=>j`
|
|
62
|
+
`;class X extends be{constructor({text:t,variant:n="span",weight:r=500,size:i=12,lineHeight:o=18,align:s="left",color:a,uppercase:c=!1}){const u={size:i,weight:r,lineHeight:o,align:s,color:a,uppercase:c};super({tag:n,styles:l=>Ky(l,u)}),this.element.textContent=t}}const j=e=>typeof e=="string",ni=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Wd=e=>e==null?"":""+e,Yy=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Jy=/###/g,Gd=e=>e&&e.indexOf("###")>-1?e.replace(Jy,"."):e,Kd=e=>!e||j(e),ri=(e,t,n)=>{const r=j(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Kd(e))return{};const o=Gd(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Kd(e)?{}:{obj:e,k:Gd(r[i])}},Yd=(e,t,n)=>{const{obj:r,k:i}=ri(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=ri(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=ri(e,s,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},Zy=(e,t,n,r)=>{const{obj:i,k:o}=ri(e,t,Object);i[o]=i[o]||[],i[o].push(n)},vo=(e,t)=>{const{obj:n,k:r}=ri(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Xy=(e,t,n)=>{const r=vo(e,n);return r!==void 0?r:vo(t,n)},Jd=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?j(e[r])||e[r]instanceof String||j(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Jd(e[r],t[r],n):e[r]=t[r]);return e},lr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qy={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const eb=e=>j(e)?e.replace(/[&<>"'\/]/g,t=>Qy[t]):e;class tb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const nb=[" ",",","?","!",";"],rb=new tb(20),ib=(e,t,n)=>{t=t||"",n=n||"";const r=nb.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=rb.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},sa=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&c<r.length-1)continue;o+=c-o+1;break}i=s}return i},yo=e=>e==null?void 0:e.replace("_","-"),ob={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};let sb=class Td{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ob,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(j(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Td(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Td(this.logger,t)}};var jt=new sb;class bo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}class Zd extends bo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var u,l;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):j(r)&&o?a.push(...r.split(o)):a.push(r)));const c=vo(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!s||!j(r)?c:sa((l=(u=this.data)==null?void 0:u[t])==null?void 0:l[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Yd(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(j(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let c=vo(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Jd(c,r,o):c={...c,...r},Yd(this.data,a,c),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Xd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const Qd={},ef=e=>!j(e)&&typeof e!="boolean"&&typeof e!="number";class wo extends bo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Yy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=jt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ib(t,r,i);if(s&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:j(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:j(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,l=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(l){const k=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${k}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${k}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||s,p=(d==null?void 0:d.exactUsedKey)||s,g=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=n.count!==void 0&&!j(n.count),b=wo.hasDefaultValue(n),w=y?this.pluralResolver.getSuffix(u,n.count,n):"",C=n.ordinal&&y?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",_=y&&!n.ordinal&&n.count===0,E=_&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${C}`]||n.defaultValue;let P=f;v&&!f&&b&&(P=E);const T=ef(P),I=Object.prototype.toString.apply(P);if(v&&P&&T&&g.indexOf(I)<0&&!(j(m)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,P,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=k,d.usedParams=this.getUsedParamsDetails(n),d):k}if(o){const k=Array.isArray(P),O=k?[]:{},D=k?p:h;for(const F in P)if(Object.prototype.hasOwnProperty.call(P,F)){const V=`${D}${o}${F}`;b&&!f?O[F]=this.translate(V,{...n,defaultValue:ef(E)?E[F]:void 0,joinArrays:!1,ns:a}):O[F]=this.translate(V,{...n,joinArrays:!1,ns:a}),O[F]===V&&(O[F]=P[F])}f=O}}else if(v&&j(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let k=!1,O=!1;!this.isValidLookup(f)&&b&&(k=!0,f=E),this.isValidLookup(f)||(O=!0,f=s);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:f,V=b&&E!==f&&this.options.updateMissing;if(O||k||V){if(this.logger.log(V?"updateKey":"missingKey",u,c,s,V?E:f),o){const J=this.resolve(s,{...n,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let z=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let J=0;J<ye.length;J++)z.push(ye[J]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(n.lng||this.language):z.push(n.lng||this.language);const oe=(J,re,W)=>{var te;const ce=b&&W!==f?W:F;this.options.missingKeyHandler?this.options.missingKeyHandler(J,c,re,ce,V,n):(te=this.backendConnector)!=null&&te.saveMissing&&this.backendConnector.saveMissing(J,c,re,ce,V,n),this.emit("missingKey",J,c,re,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?z.forEach(J=>{const re=this.pluralResolver.getSuffixes(J,n);_&&n[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(W=>{oe([J],s+W,n[`defaultValue${W}`]||E)})}):oe(z,s,E))}f=this.extendTranslation(f,t,n,d,r),O&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${s}`),(O||k)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,k?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var u,l;var s=this;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=j(t)&&(((l=r==null?void 0:r.interpolation)==null?void 0:l.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let h=r.replace&&!j(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||i.usedLng,r),d){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;f<g&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return(o==null?void 0:o[0])===g[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):s.translate(...g,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=j(a)?[a]:a;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=Xd.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return j(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),l=u.key;i=l;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!j(n.count),h=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(j(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(m=>{var v,y;this.isValidLookup(r)||(a=m,!Qd[`${g[0]}-${m}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Qd[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{var _;if(this.isValidLookup(r))return;s=b;const w=[l];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(w,l,b,m,n);else{let E;f&&(E=this.pluralResolver.getSuffix(b,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(l+E),n.ordinal&&E.indexOf(T)===0&&w.push(l+E.replace(T,this.options.pluralSeparator)),h&&w.push(l+P)),p){const I=`${l}${this.options.contextSeparator}${n.context}`;w.push(I),f&&(w.push(I+E),n.ordinal&&E.indexOf(T)===0&&w.push(I+E.replace(T,this.options.pluralSeparator)),h&&w.push(I+P))}}let C;for(;C=w.pop();)this.isValidLookup(r)||(o=C,r=this.getResource(b,m,C,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var o;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!j(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class tf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}getScriptPartFromCode(t){if(t=yo(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=yo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(j(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),j(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return j(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):j(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ab{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=jt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=yo(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rf;if(!t.match(/-|_/))return rf;const c=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(c,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>nf[i]-nf[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const of=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Xy(e,t,n);return!o&&i&&j(n)&&(o=sa(e,n,r),o===void 0&&(o=sa(t,n,r))),o},aa=e=>e.replace(/\$/g,"$$$$");class cb{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:v,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:eb,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?lr(o):s||"{{",this.suffix=a?lr(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?lr(f):h||lr("$t("),this.nestingSuffix=p?lr(p):g||lr(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var h;let o,s,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=of(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),m=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format(of(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...i,...n,interpolationkey:m})};this.resetRegExp();const l=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>aa(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?aa(this.escape(p)):aa(p)}].forEach(p=>{for(a=0;o=p.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof l=="function"){const v=l(t,o,i);s=j(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(d){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!j(s)&&!this.useRawValueToEscape&&(s=Wd(s));const m=p.safeValue(s);if(t=t.replace(o[0],m),d?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(c,u)=>{const l=this.nestingOptionsSeparator;if(c.indexOf(l)<0)return c;const d=c.split(new RegExp(`${l}[ ]*{`));let f=`{${d[1]}`;c=d[0],f=this.interpolate(f,s);const h=f.match(/'/g),p=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${l}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&!j(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const l=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=l.shift(),c=l,u=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&!j(o))return o;j(o)||(o=Wd(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const ub=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...c]=s.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=u),u==="false"&&(n[l]=!1),u==="true"&&(n[l]=!0),isNaN(u)||(n[l]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},dr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(yo(r),i),t[s]=a),a(n)}};class lb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("formatter"),this.options=t,this.formats={number:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:dr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:dr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:dr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=dr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{var d;const{formatName:u,formatOptions:l}=ub(c);if(this.formats[u]){let f=a;try{const h=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[u](a,p,{...l,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const db=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class fb extends bo{constructor(t,n,r){var o,s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=jt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},c={};return t.forEach(u=>{let l=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),c[d]===void 0&&(c[d]=!0)))}),l||(a[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{Zy(c.loaded,[o],s),db(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const l=c.loaded[u];l.length&&l.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(u,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&l&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,l)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(l=>a(null,l)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();j(t)&&(t=this.languageUtils.toResolveHierarchy(t)),j(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){var c,u,l,d,f;let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((d=(l=this.services)==null?void 0:l.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...s,isUpdate:o},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,n,r,i,h):g=p(t,n,r,i),g&&typeof g.then=="function"?g.then(m=>a(null,m)).catch(a):a(null,g)}catch(g){a(g)}else p(t,n,r,i,a,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const sf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),j(e[1])&&(t.defaultValue=e[1]),j(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),af=e=>{var t,n;return j(e.ns)&&(e.ns=[e.ns]),j(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),j(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Eo=()=>{},pb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ii extends bo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(t),this.services={},this.logger=jt,this.modules={external:[]},pb(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(j(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=sf();this.options={...i,...this.options,...af(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?jt.init(o(this.modules.logger),this.options):jt.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=lb;const d=new tf(this.options);this.store=new Zd(this.options.resources,this.options);const f=this.services;f.logger=jt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new ab(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new cb(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fb(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),m=1;m<p;m++)g[m-1]=arguments[m];t.emit(h,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new wo(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),m=1;m<p;m++)g[m-1]=arguments[m];t.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Eo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return t.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return t.store[l](...arguments),t}});const c=ni(),u=()=>{const l=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),c}loadResources(t){var o,s;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eo;const i=j(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>c(l)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>c(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ni();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Eo),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Xd.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=ni();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},s=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{var l,d;!t&&!c&&this.services.languageDetector&&(c=[]);const u=j(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),(d=(l=this.services.languageDetector)==null?void 0:l.cacheUserLanguage)==null||d.call(l,u)),this.loadResources(u,f=>{s(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let c;if(typeof a!="object"){for(var u=arguments.length,l=new Array(u>2?u-2:0),d=2;d<u;d++)l[d-2]=arguments[d];c=i.options.overloadTranslationOptionHandler([s,a].concat(l))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const f=i.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(s)?h=s.map(p=>`${c.keyPrefix}${f}${p}`):h=c.keyPrefix?`${c.keyPrefix}${f}${s}`:s,i.t(h,c)};return j(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){var i;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(i=this.translator)==null?void 0:i.translate(...n)}exists(){var i;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(i=this.translator)==null?void 0:i.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ni();return this.options.ns?(j(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ni();j(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new tf(sf());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ii(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eo;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ii(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const a=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},Object.keys(c[u]).reduce((l,d)=>(l[d]={...c[u][d]},l),{})),{});o.store=new Zd(a,i),o.services.resourceStore=o.store}return o.translator=new wo(o.services,i),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),l=1;l<c;l++)u[l-1]=arguments[l];o.emit(a,...u)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const De=ii.createInstance();De.createInstance=ii.createInstance,De.createInstance,De.dir,De.init,De.loadResources,De.reloadResources,De.use,De.changeLanguage,De.getFixedT,De.t,De.exists,De.setDefaultNamespace,De.hasLoadedNamespace,De.loadNamespaces,De.loadLanguages;const hb={en:{translation:{additional_information:"Additional information",almost_done:"Almost done...",astro_express_checkout:"Express checkout",checkout_method:"Checkout method",or:"OR",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",push_notification_sent:"We sent a push notification to your app",qr_code:"QR code",required_field:"Required Field",scan_qr_copy_link:"Scan the QR code or copy the link.",select:"Select",select_item:"Select an item",time_up:"Time's up!",try_again:"Try again",waiting_confirmation:"Waiting for confirmation...",card_holder_label:"Cardholder name",card_holder_placeholder:"Full name as on card",card_number:"Card number",card_exp_date:"Expiration date",card_tokenization_error:"We couldn't process your card. Please check your details and try again."}},es:{translation:{additional_information:"Información adicional",almost_done:"Casi listo...",astro_express_checkout:"Pago express",checkout_method:"Método de pago",or:"O",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",push_notification_sent:"Enviamos una notificación push a tu app",qr_code:"código QR",required_field:"Campo Requerido",scan_qr_copy_link:"Escaneá el código QR o copiá el enlace.",select:"Seleccionar",select_item:"Selecciona una opción",time_up:"Se acabó el tiempo!",try_again:"Inténtalo de nuevo",waiting_confirmation:"Esperando confirmación...",card_holder_label:"Nombre del titular",card_holder_placeholder:"Nombre completo en la tarjeta",card_number:"Número de tarjeta",card_exp_date:"Fecha de vencimiento",card_tokenization_error:"No pudimos procesar tu tarjeta. Verificá los datos y volvé a intentarlo."}},pt:{translation:{additional_information:"Informações adicionais",almost_done:"Finalizando...",astro_express_checkout:"Pagamento expresso",checkout_method:"Método de pagamento",or:"OU",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",push_notification_sent:"Enviamos uma notificação push para seu app",qr_code:"QR code",required_field:"Campo Obrigatório",scan_qr_copy_link:"Escaneie o QR code ou copie o link.",select:"Selecione",select_item:"Selecione um item",time_up:"Tempo esgotado!",try_again:"Tente novamente",waiting_confirmation:"Aguardando confirmação...",card_holder_label:"Nome do titular",card_holder_placeholder:"Nome completo no cartão",card_number:"Número do cartão",card_exp_date:"Data de validade",card_tokenization_error:"Não foi possível processar o seu cartão. Verifique os dados e tente novamente."}}};class q{static init(t){const n=io(t==null?void 0:t.language,q1,"en");return De.init({lng:n,fallbackLng:"en",resources:hb,interpolation:{escapeValue:!1}})}static getCurrent(){return De.language}static translate(t,n){return De.t(t,n??{})}}const gb=()=>ne`
|
|
63
63
|
display: flex;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
66
66
|
gap: 8px;
|
|
67
|
-
`;class Ii extends se{constructor({text:t,delay:n,onSuccess:r}){super({tag:"div",styles:()=>_g()});const s=new It({size:12,color:z.getStyles().textPrimaryColor}).element,i=new H({text:t??V.translate("almost_done"),size:12}).element;this.element.append(s,i),setTimeout(()=>{r(),this.element.remove()},n??5e3)}}const Cg={astropay_logo:{svg:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Logo"><path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M15.166 10.7383C16.0308 10.7383 16.8793 10.8059 17.7074 10.9372L19.7866 16.0843C18.3684 15.4763 16.8067 15.1396 15.166 15.1396C11.4591 15.1396 8.154 16.8578 6.00304 19.541H0.786621C3.45841 14.3156 8.8949 10.7383 15.166 10.7383Z" fill="#143534"/><path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M13.3258 0.101402L17.0783 9.37359C16.4499 9.30594 15.8109 9.27089 15.1645 9.27089C14.2199 9.27089 13.2932 9.34506 12.3884 9.48851L10.9588 5.95031L9.19826 10.3068C6.78974 11.1741 4.62493 12.5515 2.83423 14.3088L8.57474 0.100586H13.3258V0.101402Z" fill="#151E1D"/></g></svg>'},alert_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 8C12.5523 8 13 8.44772 13 9V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V9C11 8.44772 11.4477 8 12 8Z" fill="currentColor"/><path d="M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7009 3.14771C11.2783 2.14771 12.7217 2.1477 13.299 3.1477L21.933 18.1022C22.5103 19.1022 21.7887 20.3522 20.634 20.3522H3.36601C2.21131 20.3522 1.48962 19.1022 2.06697 18.1022L10.7009 3.14771ZM12 4.8977L4.23203 18.3522H19.7679L12 4.8977Z" fill="currentColor"/></svg>'},arrow_right_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0626 5.63603L20.7194 11.2929C21.1099 11.6834 21.1099 12.3166 20.7194 12.7071L15.0626 18.364C14.672 18.7545 14.0389 18.7545 13.6483 18.364C13.2578 17.9734 13.2578 17.3403 13.6483 16.9497L17.5981 13H4.35547C3.80318 13 3.35547 12.5523 3.35547 12C3.35547 11.4477 3.80318 11 4.35547 11H17.5981L13.6483 7.05025C13.2578 6.65972 13.2578 6.02656 13.6483 5.63603C14.0389 5.24551 14.672 5.24551 15.0626 5.63603Z" fill="currentColor"/></svg>'},arrow_down_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.0626 15.7071C12.6721 16.0976 12.0389 16.0976 11.6484 15.7071L5.99151 10.0502C5.60098 9.6597 5.60098 9.02653 5.99151 8.63601C6.38203 8.24549 7.0152 8.24549 7.40572 8.63601L12.3555 13.5858L17.3052 8.63601C17.6957 8.24549 18.3289 8.24549 18.7194 8.63601C19.11 9.02653 19.11 9.6597 18.7194 10.0502L13.0626 15.7071Z" fill="currentColor"/></svg>'},bank_card_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.3555 13C13.8032 13 13.3555 13.4477 13.3555 14C13.3555 14.5523 13.8032 15 14.3555 15H17.3555C17.9078 15 18.3555 14.5523 18.3555 14C18.3555 13.4477 17.9078 13 17.3555 13H14.3555Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.35547 7C2.35547 5.34315 3.69861 4 5.35547 4H19.3555C21.0123 4 22.3555 5.34315 22.3555 7V17C22.3555 18.6569 21.0123 20 19.3555 20H5.35547C3.69861 20 2.35547 18.6569 2.35547 17V7ZM5.35547 6C4.80318 6 4.35547 6.44772 4.35547 7V8H20.3555V7C20.3555 6.44772 19.9078 6 19.3555 6H5.35547ZM4.35547 17V10H20.3555V17C20.3555 17.5523 19.9078 18 19.3555 18H5.35547C4.80318 18 4.35547 17.5523 4.35547 17Z" fill="currentColor"/></svg>'},check_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.9496 9.79545C17.3401 9.40493 17.3401 8.77176 16.9496 8.38124C16.5591 7.99071 15.9259 7.99071 15.5354 8.38124L10.5856 13.331L8.46431 11.2097C8.07379 10.8191 7.44063 10.8191 7.0501 11.2097C6.65958 11.6002 6.65958 12.2334 7.0501 12.6239L9.80782 15.3816C10.2374 15.8112 10.9339 15.8112 11.3635 15.3816L16.9496 9.79545Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z" fill="currentColor"/></svg>'},close_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.46452 8.46443C8.85505 8.07391 9.48821 8.07391 9.87874 8.46443L12 10.5857L14.1213 8.46441C14.5118 8.07388 15.145 8.07388 15.5355 8.46441C15.926 8.85493 15.926 9.4881 15.5355 9.87862L13.4142 11.9999L15.5356 14.1213C15.9261 14.5118 15.9261 15.145 15.5356 15.5355C15.1451 15.926 14.5119 15.926 14.1214 15.5355L12 13.4141L9.87864 15.5355C9.48812 15.926 8.85496 15.926 8.46443 15.5355C8.07391 15.145 8.07391 14.5118 8.46443 14.1213L10.5858 11.9999L8.46452 9.87864C8.074 9.48812 8.074 8.85496 8.46452 8.46443Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" fill="currentColor"/></svg>'},copy_2_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.3555 2C20.46 2 21.3555 2.89543 21.3555 4V16C21.3555 17.1046 20.46 18 19.3555 18H17.3555V20C17.3555 21.1046 16.46 22 15.3555 22H5.35547C4.2509 22 3.35547 21.1046 3.35547 20V8C3.35547 6.89543 4.2509 6 5.35547 6H7.35547V4C7.35547 2.89543 8.2509 2 9.35547 2H19.3555ZM9.35547 6H15.3555C16.46 6 17.3555 6.89543 17.3555 8V16H19.3555V4L9.35547 4V6ZM5.35547 8L15.3555 8V20H5.35547V8Z" fill="currentColor"/></svg>'},lock_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C11.4477 12 11 12.4477 11 13V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V13C13 12.4477 12.5523 12 12 12Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 8C6 4.68629 8.68629 2 12 2C15.3137 2 18 4.68629 18 8H19C20.1046 8 21 8.89543 21 10V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V10C3 8.89543 3.89543 8 5 8H6ZM12 4C14.2091 4 16 5.79086 16 8H8C8 5.79086 9.79086 4 12 4ZM5 10H19V20H5V10Z" fill="currentColor"/></svg>'},notification_fill:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.9998 19C15 19.5046 14.8094 19.9906 14.4664 20.3605C14.1233 20.7305 13.653 20.9572 13.1498 20.995L12.9998 21H10.9998C10.4953 21.0002 10.0093 20.8096 9.6393 20.4665C9.26932 20.1234 9.04269 19.6532 9.00485 19.15L8.99985 19H14.9998ZM11.9998 2C13.8148 1.99997 15.5589 2.70489 16.8641 3.96607C18.1693 5.22726 18.9336 6.94609 18.9958 8.76L18.9998 9V12.764L20.8218 16.408C20.9014 16.567 20.9412 16.7429 20.9378 16.9206C20.9345 17.0984 20.8881 17.2727 20.8027 17.4286C20.7173 17.5845 20.5953 17.7174 20.4473 17.8158C20.2993 17.9143 20.1297 17.9754 19.9528 17.994L19.8378 18H4.16185C3.98401 18.0001 3.80882 17.957 3.65127 17.8745C3.49372 17.792 3.35853 17.6725 3.25727 17.5264C3.156 17.3802 3.0917 17.2116 3.06985 17.0351C3.04801 16.8586 3.06928 16.6795 3.13185 16.513L3.17785 16.408L4.99985 12.764V9C4.99985 7.14348 5.73735 5.36301 7.0501 4.05025C8.36286 2.7375 10.1433 2 11.9998 2Z" fill="currentColor"/></svg>'},pay_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.2473 1.60389C23.2424 1.36545 23.143 1.13872 22.9709 0.973519C22.7989 0.808319 22.5684 0.718154 22.3299 0.722829L17.5303 0.818649C17.2916 0.823478 17.0646 0.922941 16.8992 1.09516C16.7338 1.26738 16.6436 1.49824 16.6484 1.73696C16.6532 1.97568 16.7527 2.20271 16.9249 2.3681C17.0971 2.53349 17.328 2.62369 17.5667 2.61886L20.1937 2.56614L16.7022 6.25555C16.5369 6.42771 16.4467 6.6585 16.4515 6.89714C16.4564 7.13579 16.5558 7.36274 16.728 7.52808C16.9001 7.69341 17.1309 7.78358 17.3696 7.77876C17.6082 7.77393 17.8352 7.6745 18.0005 7.50234L21.4919 3.81293L21.5451 6.43944C21.5475 6.55764 21.5731 6.67421 21.6206 6.7825C21.668 6.89079 21.7363 6.98868 21.8216 7.07057C21.9069 7.15246 22.0074 7.21676 22.1175 7.25978C22.2277 7.30281 22.3452 7.32372 22.4634 7.32133C22.5816 7.31894 22.6982 7.29329 22.8064 7.24585C22.9147 7.1984 23.0126 7.1301 23.0945 7.04482C23.1764 6.95955 23.2407 6.85898 23.2837 6.74886C23.3268 6.63874 23.3477 6.52122 23.3453 6.40302L23.2473 1.60389Z" fill="currentColor"/><path d="M13.9007 5.74528C13.0603 5.88939 12.6821 6.04597 11.807 6.43486C8.461 7.92184 5.74102 7.59582 4 7.26583V18.2248C5.39102 18.5318 8.50887 18.9511 11.5938 17.5812C14.9397 16.0942 18.259 16.3958 20 16.7258V10.4956C20 10.4956 20 9.49596 21 9.49596C22 9.49596 22 10.4956 22 10.4956V17.301C22 18.3278 21.0243 19.0019 20.1064 18.7902C18.7765 18.4822 15.5732 18.0015 12.4062 19.4094C8.68025 21.0654 4.98673 20.5026 3.46973 20.1546C2.55195 19.9445 2.0001 19.1245 2 18.2746V6.68965C2 5.66281 2.97468 4.9877 3.89355 5.2004C5.22353 5.50839 7.8275 6.01465 10.9945 4.60674C12.1546 4.09113 12.8117 3.87593 13.9007 3.71696C13.9007 3.71696 14.777 3.60629 14.9007 4.60661C15.0244 5.60692 13.9007 5.74528 13.9007 5.74528Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.49564C13.933 8.49564 15.5 10.0626 15.5 11.9956C15.5 13.9286 13.933 15.4956 12 15.4956C10.067 15.4956 8.5 13.9286 8.5 11.9956C8.5 10.0626 10.067 8.49564 12 8.49564ZM12 10.2456C11.0335 10.2456 10.25 11.0291 10.25 11.9956C10.25 12.9621 11.0335 13.7456 12 13.7456C12.9665 13.7456 13.75 12.9621 13.75 11.9956C13.75 11.0291 12.9665 10.2456 12 10.2456Z" fill="currentColor"/></svg>'},payment_master:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 7.2832H9.75V16.7176H15V7.2832Z" fill="#FF5F00"/><path d="M10.0842 12C10.0833 11.0914 10.2892 10.1945 10.6862 9.37725C11.0833 8.55999 11.661 7.84377 12.3758 7.2828C11.4907 6.58708 10.4277 6.15441 9.30827 6.03427C8.18888 5.91412 7.05827 6.11134 6.04566 6.60338C5.03305 7.09542 4.17931 7.86244 3.58201 8.81675C2.98471 9.77107 2.66797 10.8742 2.66797 12C2.66797 13.1258 2.98471 14.2289 3.58201 15.1832C4.17931 16.1376 5.03305 16.9046 6.04566 17.3966C7.05827 17.8887 8.18888 18.0859 9.30827 17.9657C10.4277 17.8456 11.4907 17.4129 12.3758 16.7172C11.661 16.1562 11.0833 15.44 10.6863 14.6227C10.2892 13.8055 10.0833 12.9086 10.0842 12Z" fill="#EB001B"/><path d="M22.0825 12C22.0826 13.1258 21.7659 14.2289 21.1686 15.1832C20.5713 16.1375 19.7176 16.9046 18.705 17.3966C17.6924 17.8887 16.5618 18.0859 15.4425 17.9657C14.3231 17.8456 13.2601 17.4129 12.375 16.7172C13.0891 16.1557 13.6664 15.4393 14.0634 14.6222C14.4604 13.8051 14.6666 12.9085 14.6666 12C14.6666 11.0915 14.4604 10.1949 14.0634 9.37781C13.6664 8.56067 13.0891 7.84433 12.375 7.2828C13.2601 6.58707 14.3231 6.15441 15.4425 6.03427C16.5618 5.91412 17.6924 6.11135 18.705 6.60339C19.7176 7.09544 20.5713 7.86246 21.1686 8.81677C21.7659 9.77109 22.0826 10.8742 22.0825 12Z" fill="#F79E1B"/><path d="M21.5111 15.7173V15.5241H21.589V15.4848H21.3906V15.5241H21.4685V15.7173H21.5111ZM21.8962 15.7173V15.4844H21.8354L21.7654 15.6446L21.6955 15.4844H21.6347V15.7173H21.6776V15.5416L21.7432 15.693H21.7877L21.8533 15.5412V15.7173H21.8962Z" fill="#F79E1B"/></svg>'},payment_visa:{svg:'<svg width="35" height="12" viewBox="0 0 35 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.0517 0.694249L8.55127 11.3334H5.61509L3.40042 2.84288C3.26597 2.31991 3.14906 2.12832 2.74014 1.908C2.07252 1.54912 0.970015 1.21242 0 1.00345L0.0658851 0.694249H4.79224C5.3947 0.694249 5.93628 1.09162 6.07306 1.77903L7.2427 7.93539L10.1334 0.694072H13.0517V0.694249ZM24.5562 7.86C24.568 5.05199 20.6374 4.8973 20.6645 3.64293C20.6729 3.26118 21.0397 2.85529 21.8427 2.75169C22.2407 2.70007 23.3373 2.66069 24.581 3.22783L25.0689 0.971697C24.4006 0.731325 23.5407 0.5 22.4707 0.5C19.7252 0.5 17.7931 1.94614 17.7768 4.01688C17.7591 5.54853 19.1559 6.40322 20.2083 6.91217C21.2909 7.43336 21.6542 7.76829 21.6501 8.23449C21.6424 8.94815 20.7866 9.26321 19.9868 9.27563C18.5907 9.29691 17.7806 8.90132 17.1348 8.60382L16.6313 10.9346C17.2803 11.2296 18.4783 11.4871 19.7202 11.5C22.6383 11.5 24.5472 10.0718 24.5562 7.86ZM31.806 11.3336H34.375L32.1326 0.694249H29.7614C29.2283 0.694249 28.7785 1.00185 28.5794 1.47479L24.4113 11.3334H27.328L27.907 9.74431H31.4707L31.806 11.3334V11.3336ZM28.7067 7.56393L30.1687 3.56931L31.0102 7.56393H28.7067ZM17.0204 0.694249L14.7235 11.3334H11.946L14.2437 0.694249H17.0204Z" fill="#B4C5C3"/></svg>'},refresh_2_fill:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.4981 12.184C1.4881 10.917 2.8451 10.197 3.8771 10.778L3.9901 10.848L6.6681 12.652C8.0921 13.612 7.2061 15.798 5.5681 15.567L5.4311 15.542L5.3221 15.518C5.93702 16.7185 6.86412 17.731 8.00586 18.4491C9.1476 19.1671 10.4618 19.5642 11.8101 19.5985C13.1584 19.6327 14.4911 19.303 15.6679 18.6439C16.8446 17.9848 17.822 17.0207 18.4971 15.853C18.5955 15.6823 18.7265 15.5326 18.8827 15.4126C19.0389 15.2925 19.2172 15.2043 19.4075 15.1532C19.5978 15.102 19.7962 15.0888 19.9916 15.1144C20.187 15.1399 20.3754 15.2037 20.5461 15.302C20.7168 15.4004 20.8665 15.5314 20.9866 15.6876C21.1067 15.8438 21.1948 16.0222 21.246 16.2124C21.2971 16.4027 21.3103 16.6012 21.2848 16.7965C21.2592 16.9919 21.1955 17.1803 21.0971 17.351C18.7801 21.371 13.9781 23.503 9.2821 22.244C7.06294 21.6494 5.09998 20.3434 3.69403 18.5264C2.28808 16.7093 1.5167 14.4814 1.4981 12.184ZM2.9041 6.85404C5.2201 2.83304 10.0221 0.70204 14.7181 1.95904C16.9373 2.55373 18.9002 3.85965 20.3062 5.67669C21.7121 7.49373 22.4835 9.72165 22.5021 12.019C22.5121 13.286 21.1551 14.006 20.1231 13.426L20.0101 13.356L17.3321 11.551C15.9081 10.592 16.7941 8.40604 18.4311 8.63704L18.5691 8.66204L18.6771 8.68504C18.062 7.48471 17.1347 6.47234 15.9929 5.75447C14.8511 5.03659 13.5368 4.63973 12.1885 4.60565C10.8402 4.57158 9.50758 4.90153 8.33093 5.56081C7.15427 6.22009 6.17706 7.18431 5.5021 8.35204C5.40669 8.52821 5.27695 8.68348 5.12054 8.80868C4.96414 8.93389 4.78423 9.02649 4.59145 9.08103C4.39867 9.13556 4.19692 9.15093 3.9981 9.12621C3.79928 9.1015 3.60743 9.03721 3.43387 8.93713C3.26031 8.83706 3.10855 8.70323 2.98756 8.54354C2.86656 8.38385 2.77879 8.20154 2.72941 8.00738C2.68003 7.81321 2.67005 7.61112 2.70005 7.41303C2.73005 7.21494 2.79944 7.02487 2.9041 6.85404Z" fill="currentColor"/></svg>'},system_pix:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.4579 17.1678C16.6929 17.1678 15.9733 16.8699 15.4322 16.3291L12.5074 13.4042C12.302 13.1983 11.9441 13.1989 11.7388 13.4042L8.80326 16.3398C8.26223 16.8806 7.54264 17.1785 6.77758 17.1785H6.20117L9.90564 20.8829C11.0625 22.0398 12.9383 22.0398 14.0952 20.8829L17.8102 17.1678H17.4579Z" fill="currentColor"/><path d="M6.77747 6.822C7.54253 6.822 8.26212 7.11989 8.80315 7.66066L11.7387 10.5967C11.9501 10.8082 12.2953 10.809 12.5073 10.5965L15.4321 7.67136C15.9732 7.1306 16.6927 6.83271 17.4578 6.83271H17.8101L14.0952 3.11772C12.9382 1.96076 11.0624 1.96076 9.90553 3.11772L6.20123 6.82202L6.77747 6.822Z" fill="currentColor"/><path d="M20.883 9.90625L18.638 7.66128C18.5886 7.68108 18.5351 7.69344 18.4785 7.69344H17.4578C16.9301 7.69344 16.4135 7.90748 16.0406 8.28063L13.1159 11.2055C12.8422 11.4792 12.4825 11.6162 12.1232 11.6162C11.7635 11.6162 11.4041 11.4792 11.1305 11.2058L8.19468 8.26995C7.82179 7.8967 7.30521 7.68275 6.7775 7.68275H5.52241C5.46888 7.68275 5.41885 7.67013 5.37163 7.65234L3.11772 9.90625C1.96076 11.0632 1.96076 12.9389 3.11772 14.0959L5.37154 16.3497C5.41885 16.3319 5.46888 16.3193 5.52241 16.3193H6.7775C7.30521 16.3193 7.82179 16.1053 8.19468 15.7322L11.1302 12.7966C11.6608 12.2664 12.5858 12.2663 13.1159 12.7968L16.0406 15.7215C16.4135 16.0946 16.9301 16.3087 17.4578 16.3087H18.4785C18.5351 16.3087 18.5886 16.321 18.638 16.3408L20.883 14.0958C22.0399 12.9389 22.0399 11.0632 20.883 9.90625Z" fill="currentColor"/></svg>'}},Eg={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Ml={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},le={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Oe={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Mt={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const s=I.getVersionPrecision(t),i=I.getVersionPrecision(n);let o=Math.max(s,i),a=0;const c=I.map([t,n],l=>{const u=o-I.getVersionPrecision(l),d=l+new Array(u+1).join(".0");return I.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}}static map(t,n){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(s=0;s<t.length;s+=1)r.push(n(t[s]));return r}static find(t,n){let r,s;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,s=t.length;r<s;r+=1){const i=t[r];if(n(i,r))return i}}static assign(t,...n){const r=t;let s,i;if(Object.assign)return Object.assign(t,...n);for(s=0,i=n.length;s<i;s+=1){const o=n[s];typeof o=="object"&&o!==null&&Object.keys(o).forEach(c=>{r[c]=o[c]})}return t}static getBrowserAlias(t){return Eg[t]}static getBrowserTypeByAlias(t){return Ml[t]||""}}const te=/version\/(\d+(\.?_?\d+)+)/i,xg=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,s=e.search("\\(")!==-1?n:t;return{name:I.getFirstMatch(s,e),version:I.getSecondMatch(s,e)}}}],Ig=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Oe.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Oe.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=I.getWindowsVersionName(t);return{name:Oe.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Oe.iOS},n=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=I.getMacOSVersionName(t),r={name:Oe.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Oe.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=I.getAndroidVersionName(t),r={name:Oe.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Oe.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||I.getFirstMatch(/\bbb(\d+)/i,e);return{name:Oe.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Oe.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Oe.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Oe.Linux}}},{test:[/CrOS/],describe(){return{name:Oe.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Oe.PlayStation4,version:t}}}],Tg=[{test:[/googlebot/i],describe(){return{type:le.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:le.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:le.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:le.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:le.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:le.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:le.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:le.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=I.getFirstMatch(/(ipod|iphone)/i,e);return{type:le.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:le.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=I.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:le.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:le.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:le.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:le.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:le.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:le.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:le.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:le.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:le.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:le.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:le.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:le.tv}}}],Ag=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Mt.Blink};const n=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Mt.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Mt.Trident},n=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Mt.Presto},n=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Mt.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Mt.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Mt.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Dl{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=I.find(xg,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=I.find(Ig,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=I.find(Tg,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=I.find(Ag,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const s={};let i=0;if(Object.keys(t).forEach(a=>{const c=t[a];typeof c=="string"?(s[a]=c,i+=1):typeof c=="object"&&(n[a]=c,r+=1)}),r>0){const a=Object.keys(n),c=I.find(a,u=>this.isOS(u));if(c){const u=this.satisfies(n[c]);if(u!==void 0)return u}const l=I.find(a,u=>this.isPlatform(u));if(l){const u=this.satisfies(n[l]);if(u!==void 0)return u}}if(i>0){const a=Object.keys(s),c=I.find(a,l=>this.isBrowser(l,!0));if(c!==void 0)return this.compareVersion(s[c])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let s=t.toLowerCase();const i=I.getBrowserTypeByAlias(s);return n&&i&&(s=i.toLowerCase()),s===r}compareVersion(t){let n=[0],r=t,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(s=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(s=!0,r=t.substr(1)),n.indexOf(I.compareVersions(i,r,s))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*!
|
|
67
|
+
`;class ca extends be{constructor({text:t,delay:n,onSuccess:r}){super({tag:"div",styles:()=>gb()});const i=new an({size:12,color:Z.getStyles().textPrimaryColor}).element,o=new X({text:t??q.translate("almost_done"),size:12}).element;this.element.append(i,o),setTimeout(()=>{r(),this.element.remove()},n??5e3)}}const mb={astropay_logo:{svg:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Logo"><path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M15.166 10.7383C16.0308 10.7383 16.8793 10.8059 17.7074 10.9372L19.7866 16.0843C18.3684 15.4763 16.8067 15.1396 15.166 15.1396C11.4591 15.1396 8.154 16.8578 6.00304 19.541H0.786621C3.45841 14.3156 8.8949 10.7383 15.166 10.7383Z" fill="#143534"/><path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M13.3258 0.101402L17.0783 9.37359C16.4499 9.30594 15.8109 9.27089 15.1645 9.27089C14.2199 9.27089 13.2932 9.34506 12.3884 9.48851L10.9588 5.95031L9.19826 10.3068C6.78974 11.1741 4.62493 12.5515 2.83423 14.3088L8.57474 0.100586H13.3258V0.101402Z" fill="#151E1D"/></g></svg>'},astropay_payment_method:{svg:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1869 1L12.8888 7.67847C12.4359 7.62964 11.9767 7.60471 11.5113 7.60471C10.8309 7.60471 10.164 7.65873 9.51268 7.76157L8.48323 5.21339L7.21589 8.35161C5.48212 8.97594 3.92392 9.96799 2.63477 11.2343L6.76712 1.00104H10.1869V1Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.5118 8.66016C12.1341 8.66016 12.7449 8.70898 13.3412 8.80351L14.8381 12.51C13.8169 12.0726 12.693 11.8295 11.5118 11.8295C8.84315 11.8295 6.46428 13.0668 4.91543 15H1.16016C3.08402 11.2374 6.99719 8.66016 11.5118 8.66016Z" fill="#00DBBF"/></svg>'},alert_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 8C12.5523 8 13 8.44772 13 9V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V9C11 8.44772 11.4477 8 12 8Z" fill="currentColor"/><path d="M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7009 3.14771C11.2783 2.14771 12.7217 2.1477 13.299 3.1477L21.933 18.1022C22.5103 19.1022 21.7887 20.3522 20.634 20.3522H3.36601C2.21131 20.3522 1.48962 19.1022 2.06697 18.1022L10.7009 3.14771ZM12 4.8977L4.23203 18.3522H19.7679L12 4.8977Z" fill="currentColor"/></svg>'},arrow_right_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0626 5.63603L20.7194 11.2929C21.1099 11.6834 21.1099 12.3166 20.7194 12.7071L15.0626 18.364C14.672 18.7545 14.0389 18.7545 13.6483 18.364C13.2578 17.9734 13.2578 17.3403 13.6483 16.9497L17.5981 13H4.35547C3.80318 13 3.35547 12.5523 3.35547 12C3.35547 11.4477 3.80318 11 4.35547 11H17.5981L13.6483 7.05025C13.2578 6.65972 13.2578 6.02656 13.6483 5.63603C14.0389 5.24551 14.672 5.24551 15.0626 5.63603Z" fill="currentColor"/></svg>'},arrow_down_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.0626 15.7071C12.6721 16.0976 12.0389 16.0976 11.6484 15.7071L5.99151 10.0502C5.60098 9.6597 5.60098 9.02653 5.99151 8.63601C6.38203 8.24549 7.0152 8.24549 7.40572 8.63601L12.3555 13.5858L17.3052 8.63601C17.6957 8.24549 18.3289 8.24549 18.7194 8.63601C19.11 9.02653 19.11 9.6597 18.7194 10.0502L13.0626 15.7071Z" fill="currentColor"/></svg>'},bank_card_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.3555 13C13.8032 13 13.3555 13.4477 13.3555 14C13.3555 14.5523 13.8032 15 14.3555 15H17.3555C17.9078 15 18.3555 14.5523 18.3555 14C18.3555 13.4477 17.9078 13 17.3555 13H14.3555Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.35547 7C2.35547 5.34315 3.69861 4 5.35547 4H19.3555C21.0123 4 22.3555 5.34315 22.3555 7V17C22.3555 18.6569 21.0123 20 19.3555 20H5.35547C3.69861 20 2.35547 18.6569 2.35547 17V7ZM5.35547 6C4.80318 6 4.35547 6.44772 4.35547 7V8H20.3555V7C20.3555 6.44772 19.9078 6 19.3555 6H5.35547ZM4.35547 17V10H20.3555V17C20.3555 17.5523 19.9078 18 19.3555 18H5.35547C4.80318 18 4.35547 17.5523 4.35547 17Z" fill="currentColor"/></svg>'},check_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.9496 9.79545C17.3401 9.40493 17.3401 8.77176 16.9496 8.38124C16.5591 7.99071 15.9259 7.99071 15.5354 8.38124L10.5856 13.331L8.46431 11.2097C8.07379 10.8191 7.44063 10.8191 7.0501 11.2097C6.65958 11.6002 6.65958 12.2334 7.0501 12.6239L9.80782 15.3816C10.2374 15.8112 10.9339 15.8112 11.3635 15.3816L16.9496 9.79545Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z" fill="currentColor"/></svg>'},close_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.46452 8.46443C8.85505 8.07391 9.48821 8.07391 9.87874 8.46443L12 10.5857L14.1213 8.46441C14.5118 8.07388 15.145 8.07388 15.5355 8.46441C15.926 8.85493 15.926 9.4881 15.5355 9.87862L13.4142 11.9999L15.5356 14.1213C15.9261 14.5118 15.9261 15.145 15.5356 15.5355C15.1451 15.926 14.5119 15.926 14.1214 15.5355L12 13.4141L9.87864 15.5355C9.48812 15.926 8.85496 15.926 8.46443 15.5355C8.07391 15.145 8.07391 14.5118 8.46443 14.1213L10.5858 11.9999L8.46452 9.87864C8.074 9.48812 8.074 8.85496 8.46452 8.46443Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" fill="currentColor"/></svg>'},copy_2_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.3555 2C20.46 2 21.3555 2.89543 21.3555 4V16C21.3555 17.1046 20.46 18 19.3555 18H17.3555V20C17.3555 21.1046 16.46 22 15.3555 22H5.35547C4.2509 22 3.35547 21.1046 3.35547 20V8C3.35547 6.89543 4.2509 6 5.35547 6H7.35547V4C7.35547 2.89543 8.2509 2 9.35547 2H19.3555ZM9.35547 6H15.3555C16.46 6 17.3555 6.89543 17.3555 8V16H19.3555V4L9.35547 4V6ZM5.35547 8L15.3555 8V20H5.35547V8Z" fill="currentColor"/></svg>'},lock_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C11.4477 12 11 12.4477 11 13V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V13C13 12.4477 12.5523 12 12 12Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 8C6 4.68629 8.68629 2 12 2C15.3137 2 18 4.68629 18 8H19C20.1046 8 21 8.89543 21 10V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V10C3 8.89543 3.89543 8 5 8H6ZM12 4C14.2091 4 16 5.79086 16 8H8C8 5.79086 9.79086 4 12 4ZM5 10H19V20H5V10Z" fill="currentColor"/></svg>'},notification_fill:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.9998 19C15 19.5046 14.8094 19.9906 14.4664 20.3605C14.1233 20.7305 13.653 20.9572 13.1498 20.995L12.9998 21H10.9998C10.4953 21.0002 10.0093 20.8096 9.6393 20.4665C9.26932 20.1234 9.04269 19.6532 9.00485 19.15L8.99985 19H14.9998ZM11.9998 2C13.8148 1.99997 15.5589 2.70489 16.8641 3.96607C18.1693 5.22726 18.9336 6.94609 18.9958 8.76L18.9998 9V12.764L20.8218 16.408C20.9014 16.567 20.9412 16.7429 20.9378 16.9206C20.9345 17.0984 20.8881 17.2727 20.8027 17.4286C20.7173 17.5845 20.5953 17.7174 20.4473 17.8158C20.2993 17.9143 20.1297 17.9754 19.9528 17.994L19.8378 18H4.16185C3.98401 18.0001 3.80882 17.957 3.65127 17.8745C3.49372 17.792 3.35853 17.6725 3.25727 17.5264C3.156 17.3802 3.0917 17.2116 3.06985 17.0351C3.04801 16.8586 3.06928 16.6795 3.13185 16.513L3.17785 16.408L4.99985 12.764V9C4.99985 7.14348 5.73735 5.36301 7.0501 4.05025C8.36286 2.7375 10.1433 2 11.9998 2Z" fill="currentColor"/></svg>'},pay_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.2473 1.60389C23.2424 1.36545 23.143 1.13872 22.9709 0.973519C22.7989 0.808319 22.5684 0.718154 22.3299 0.722829L17.5303 0.818649C17.2916 0.823478 17.0646 0.922941 16.8992 1.09516C16.7338 1.26738 16.6436 1.49824 16.6484 1.73696C16.6532 1.97568 16.7527 2.20271 16.9249 2.3681C17.0971 2.53349 17.328 2.62369 17.5667 2.61886L20.1937 2.56614L16.7022 6.25555C16.5369 6.42771 16.4467 6.6585 16.4515 6.89714C16.4564 7.13579 16.5558 7.36274 16.728 7.52808C16.9001 7.69341 17.1309 7.78358 17.3696 7.77876C17.6082 7.77393 17.8352 7.6745 18.0005 7.50234L21.4919 3.81293L21.5451 6.43944C21.5475 6.55764 21.5731 6.67421 21.6206 6.7825C21.668 6.89079 21.7363 6.98868 21.8216 7.07057C21.9069 7.15246 22.0074 7.21676 22.1175 7.25978C22.2277 7.30281 22.3452 7.32372 22.4634 7.32133C22.5816 7.31894 22.6982 7.29329 22.8064 7.24585C22.9147 7.1984 23.0126 7.1301 23.0945 7.04482C23.1764 6.95955 23.2407 6.85898 23.2837 6.74886C23.3268 6.63874 23.3477 6.52122 23.3453 6.40302L23.2473 1.60389Z" fill="currentColor"/><path d="M13.9007 5.74528C13.0603 5.88939 12.6821 6.04597 11.807 6.43486C8.461 7.92184 5.74102 7.59582 4 7.26583V18.2248C5.39102 18.5318 8.50887 18.9511 11.5938 17.5812C14.9397 16.0942 18.259 16.3958 20 16.7258V10.4956C20 10.4956 20 9.49596 21 9.49596C22 9.49596 22 10.4956 22 10.4956V17.301C22 18.3278 21.0243 19.0019 20.1064 18.7902C18.7765 18.4822 15.5732 18.0015 12.4062 19.4094C8.68025 21.0654 4.98673 20.5026 3.46973 20.1546C2.55195 19.9445 2.0001 19.1245 2 18.2746V6.68965C2 5.66281 2.97468 4.9877 3.89355 5.2004C5.22353 5.50839 7.8275 6.01465 10.9945 4.60674C12.1546 4.09113 12.8117 3.87593 13.9007 3.71696C13.9007 3.71696 14.777 3.60629 14.9007 4.60661C15.0244 5.60692 13.9007 5.74528 13.9007 5.74528Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.49564C13.933 8.49564 15.5 10.0626 15.5 11.9956C15.5 13.9286 13.933 15.4956 12 15.4956C10.067 15.4956 8.5 13.9286 8.5 11.9956C8.5 10.0626 10.067 8.49564 12 8.49564ZM12 10.2456C11.0335 10.2456 10.25 11.0291 10.25 11.9956C10.25 12.9621 11.0335 13.7456 12 13.7456C12.9665 13.7456 13.75 12.9621 13.75 11.9956C13.75 11.0291 12.9665 10.2456 12 10.2456Z" fill="currentColor"/></svg>'},payment_master:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 7.2832H9.75V16.7176H15V7.2832Z" fill="#FF5F00"/><path d="M10.0842 12C10.0833 11.0914 10.2892 10.1945 10.6862 9.37725C11.0833 8.55999 11.661 7.84377 12.3758 7.2828C11.4907 6.58708 10.4277 6.15441 9.30827 6.03427C8.18888 5.91412 7.05827 6.11134 6.04566 6.60338C5.03305 7.09542 4.17931 7.86244 3.58201 8.81675C2.98471 9.77107 2.66797 10.8742 2.66797 12C2.66797 13.1258 2.98471 14.2289 3.58201 15.1832C4.17931 16.1376 5.03305 16.9046 6.04566 17.3966C7.05827 17.8887 8.18888 18.0859 9.30827 17.9657C10.4277 17.8456 11.4907 17.4129 12.3758 16.7172C11.661 16.1562 11.0833 15.44 10.6863 14.6227C10.2892 13.8055 10.0833 12.9086 10.0842 12Z" fill="#EB001B"/><path d="M22.0825 12C22.0826 13.1258 21.7659 14.2289 21.1686 15.1832C20.5713 16.1375 19.7176 16.9046 18.705 17.3966C17.6924 17.8887 16.5618 18.0859 15.4425 17.9657C14.3231 17.8456 13.2601 17.4129 12.375 16.7172C13.0891 16.1557 13.6664 15.4393 14.0634 14.6222C14.4604 13.8051 14.6666 12.9085 14.6666 12C14.6666 11.0915 14.4604 10.1949 14.0634 9.37781C13.6664 8.56067 13.0891 7.84433 12.375 7.2828C13.2601 6.58707 14.3231 6.15441 15.4425 6.03427C16.5618 5.91412 17.6924 6.11135 18.705 6.60339C19.7176 7.09544 20.5713 7.86246 21.1686 8.81677C21.7659 9.77109 22.0826 10.8742 22.0825 12Z" fill="#F79E1B"/><path d="M21.5111 15.7173V15.5241H21.589V15.4848H21.3906V15.5241H21.4685V15.7173H21.5111ZM21.8962 15.7173V15.4844H21.8354L21.7654 15.6446L21.6955 15.4844H21.6347V15.7173H21.6776V15.5416L21.7432 15.693H21.7877L21.8533 15.5412V15.7173H21.8962Z" fill="#F79E1B"/></svg>'},payment_visa:{svg:'<svg width="35" height="12" viewBox="0 0 35 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.0517 0.694249L8.55127 11.3334H5.61509L3.40042 2.84288C3.26597 2.31991 3.14906 2.12832 2.74014 1.908C2.07252 1.54912 0.970015 1.21242 0 1.00345L0.0658851 0.694249H4.79224C5.3947 0.694249 5.93628 1.09162 6.07306 1.77903L7.2427 7.93539L10.1334 0.694072H13.0517V0.694249ZM24.5562 7.86C24.568 5.05199 20.6374 4.8973 20.6645 3.64293C20.6729 3.26118 21.0397 2.85529 21.8427 2.75169C22.2407 2.70007 23.3373 2.66069 24.581 3.22783L25.0689 0.971697C24.4006 0.731325 23.5407 0.5 22.4707 0.5C19.7252 0.5 17.7931 1.94614 17.7768 4.01688C17.7591 5.54853 19.1559 6.40322 20.2083 6.91217C21.2909 7.43336 21.6542 7.76829 21.6501 8.23449C21.6424 8.94815 20.7866 9.26321 19.9868 9.27563C18.5907 9.29691 17.7806 8.90132 17.1348 8.60382L16.6313 10.9346C17.2803 11.2296 18.4783 11.4871 19.7202 11.5C22.6383 11.5 24.5472 10.0718 24.5562 7.86ZM31.806 11.3336H34.375L32.1326 0.694249H29.7614C29.2283 0.694249 28.7785 1.00185 28.5794 1.47479L24.4113 11.3334H27.328L27.907 9.74431H31.4707L31.806 11.3334V11.3336ZM28.7067 7.56393L30.1687 3.56931L31.0102 7.56393H28.7067ZM17.0204 0.694249L14.7235 11.3334H11.946L14.2437 0.694249H17.0204Z" fill="#B4C5C3"/></svg>'},refresh_2_fill:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.4981 12.184C1.4881 10.917 2.8451 10.197 3.8771 10.778L3.9901 10.848L6.6681 12.652C8.0921 13.612 7.2061 15.798 5.5681 15.567L5.4311 15.542L5.3221 15.518C5.93702 16.7185 6.86412 17.731 8.00586 18.4491C9.1476 19.1671 10.4618 19.5642 11.8101 19.5985C13.1584 19.6327 14.4911 19.303 15.6679 18.6439C16.8446 17.9848 17.822 17.0207 18.4971 15.853C18.5955 15.6823 18.7265 15.5326 18.8827 15.4126C19.0389 15.2925 19.2172 15.2043 19.4075 15.1532C19.5978 15.102 19.7962 15.0888 19.9916 15.1144C20.187 15.1399 20.3754 15.2037 20.5461 15.302C20.7168 15.4004 20.8665 15.5314 20.9866 15.6876C21.1067 15.8438 21.1948 16.0222 21.246 16.2124C21.2971 16.4027 21.3103 16.6012 21.2848 16.7965C21.2592 16.9919 21.1955 17.1803 21.0971 17.351C18.7801 21.371 13.9781 23.503 9.2821 22.244C7.06294 21.6494 5.09998 20.3434 3.69403 18.5264C2.28808 16.7093 1.5167 14.4814 1.4981 12.184ZM2.9041 6.85404C5.2201 2.83304 10.0221 0.70204 14.7181 1.95904C16.9373 2.55373 18.9002 3.85965 20.3062 5.67669C21.7121 7.49373 22.4835 9.72165 22.5021 12.019C22.5121 13.286 21.1551 14.006 20.1231 13.426L20.0101 13.356L17.3321 11.551C15.9081 10.592 16.7941 8.40604 18.4311 8.63704L18.5691 8.66204L18.6771 8.68504C18.062 7.48471 17.1347 6.47234 15.9929 5.75447C14.8511 5.03659 13.5368 4.63973 12.1885 4.60565C10.8402 4.57158 9.50758 4.90153 8.33093 5.56081C7.15427 6.22009 6.17706 7.18431 5.5021 8.35204C5.40669 8.52821 5.27695 8.68348 5.12054 8.80868C4.96414 8.93389 4.78423 9.02649 4.59145 9.08103C4.39867 9.13556 4.19692 9.15093 3.9981 9.12621C3.79928 9.1015 3.60743 9.03721 3.43387 8.93713C3.26031 8.83706 3.10855 8.70323 2.98756 8.54354C2.86656 8.38385 2.77879 8.20154 2.72941 8.00738C2.68003 7.81321 2.67005 7.61112 2.70005 7.41303C2.73005 7.21494 2.79944 7.02487 2.9041 6.85404Z" fill="currentColor"/></svg>'},system_pix:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.4579 17.1678C16.6929 17.1678 15.9733 16.8699 15.4322 16.3291L12.5074 13.4042C12.302 13.1983 11.9441 13.1989 11.7388 13.4042L8.80326 16.3398C8.26223 16.8806 7.54264 17.1785 6.77758 17.1785H6.20117L9.90564 20.8829C11.0625 22.0398 12.9383 22.0398 14.0952 20.8829L17.8102 17.1678H17.4579Z" fill="currentColor"/><path d="M6.77747 6.822C7.54253 6.822 8.26212 7.11989 8.80315 7.66066L11.7387 10.5967C11.9501 10.8082 12.2953 10.809 12.5073 10.5965L15.4321 7.67136C15.9732 7.1306 16.6927 6.83271 17.4578 6.83271H17.8101L14.0952 3.11772C12.9382 1.96076 11.0624 1.96076 9.90553 3.11772L6.20123 6.82202L6.77747 6.822Z" fill="currentColor"/><path d="M20.883 9.90625L18.638 7.66128C18.5886 7.68108 18.5351 7.69344 18.4785 7.69344H17.4578C16.9301 7.69344 16.4135 7.90748 16.0406 8.28063L13.1159 11.2055C12.8422 11.4792 12.4825 11.6162 12.1232 11.6162C11.7635 11.6162 11.4041 11.4792 11.1305 11.2058L8.19468 8.26995C7.82179 7.8967 7.30521 7.68275 6.7775 7.68275H5.52241C5.46888 7.68275 5.41885 7.67013 5.37163 7.65234L3.11772 9.90625C1.96076 11.0632 1.96076 12.9389 3.11772 14.0959L5.37154 16.3497C5.41885 16.3319 5.46888 16.3193 5.52241 16.3193H6.7775C7.30521 16.3193 7.82179 16.1053 8.19468 15.7322L11.1302 12.7966C11.6608 12.2664 12.5858 12.2663 13.1159 12.7968L16.0406 15.7215C16.4135 16.0946 16.9301 16.3087 17.4578 16.3087H18.4785C18.5351 16.3087 18.5886 16.321 18.638 16.3408L20.883 14.0958C22.0399 12.9389 22.0399 11.0632 20.883 9.90625Z" fill="currentColor"/></svg>'}},vb={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},cf={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ce={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},tt={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},gn={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class L{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=L.getVersionPrecision(t),o=L.getVersionPrecision(n);let s=Math.max(i,o),a=0;const c=L.map([t,n],u=>{const l=s-L.getVersionPrecision(u),d=u+new Array(l+1).join(".0");return L.map(d.split("."),f=>new Array(20-f.length).join("0")+f).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const s=n[i];typeof s=="object"&&s!==null&&Object.keys(s).forEach(c=>{r[c]=s[c]})}return t}static getBrowserAlias(t){return vb[t]}static getBrowserTypeByAlias(t){return cf[t]||""}}const me=/version\/(\d+(\.?_?\d+)+)/i,yb=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=L.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=L.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=L.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=L.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=L.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=L.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=L.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=L.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=L.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=L.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=L.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=L.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=L.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=L.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=L.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=L.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=L.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=L.getFirstMatch(me,e)||L.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=L.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=L.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=L.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=L.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=L.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=L.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=L.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=L.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=L.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:L.getFirstMatch(i,e),version:L.getSecondMatch(i,e)}}}],bb=[{test:[/Roku\/DVP/],describe(e){const t=L.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:tt.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=L.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:tt.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=L.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=L.getWindowsVersionName(t);return{name:tt.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:tt.iOS},n=L.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=L.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=L.getMacOSVersionName(t),r={name:tt.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=L.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:tt.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=L.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=L.getAndroidVersionName(t),r={name:tt.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=L.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:tt.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=L.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||L.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||L.getFirstMatch(/\bbb(\d+)/i,e);return{name:tt.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=L.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:tt.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=L.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:tt.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:tt.Linux}}},{test:[/CrOS/],describe(){return{name:tt.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=L.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:tt.PlayStation4,version:t}}}],wb=[{test:[/googlebot/i],describe(){return{type:Ce.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=L.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ce.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ce.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ce.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ce.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ce.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ce.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ce.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=L.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ce.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ce.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=L.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:Ce.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:Ce.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ce.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ce.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ce.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ce.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ce.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ce.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ce.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ce.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ce.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ce.tv}}}],Eb=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:gn.Blink};const n=L.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:gn.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:gn.Trident},n=L.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:gn.Presto},n=L.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:gn.Gecko},n=L.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:gn.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:gn.WebKit},n=L.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class uf{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=L.find(yb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=L.find(bb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=L.find(wb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=L.find(Eb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return L.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const c=t[a];typeof c=="string"?(i[a]=c,o+=1):typeof c=="object"&&(n[a]=c,r+=1)}),r>0){const a=Object.keys(n),c=L.find(a,l=>this.isOS(l));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}const u=L.find(a,l=>this.isPlatform(l));if(u){const l=this.satisfies(n[u]);if(l!==void 0)return l}}if(o>0){const a=Object.keys(i),c=L.find(a,u=>this.isBrowser(u,!0));if(c!==void 0)return this.compareVersion(i[c])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=L.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(L.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*!
|
|
68
68
|
* Bowser - a browser detector
|
|
69
69
|
* https://github.com/lancedikson/bowser
|
|
70
70
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
71
71
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
72
|
-
*/class
|
|
73
|
-
hue-rotate(${
|
|
72
|
+
*/class lf{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new uf(t,n)}static parse(t){return new uf(t).getResult()}static get BROWSER_MAP(){return cf}static get ENGINE_MAP(){return gn}static get OS_MAP(){return tt}static get PLATFORMS_MAP(){return Ce}}var oi=(e=>(e.IOS="IOS",e.ANDROID="ANDROID",e.DESKTOP="DESKTOP",e))(oi||{}),df=(e=>(e.FIREFOX="Firefox",e.CHROME="Chrome",e.SAFARI="Safari",e.EDGE="Edge",e.OPERA="Opera",e))(df||{});const ff=()=>{const t=lf.getParser(window.navigator.userAgent).getOSName().toUpperCase();return t&&Object.values(oi).includes(t)?t:oi.DESKTOP},Sb=()=>{const e=ff();return e===oi.ANDROID||e===oi.IOS},_b=e=>{const t=lf.getParser(window.navigator.userAgent).getBrowserName();return Array.isArray(e)?e.includes(t):t===e},si=(e,t)=>{let n=e;return Object.keys(t).forEach(r=>{const i=t[r];n=n.replace(new RegExp(`:${r}\\b`,"g"),i),n=n.replace(new RegExp(`\\{${r}\\}`,"g"),i)}),n},Cb=(e,t,n)=>{const r=new URL(e);return t&&(r.pathname=t),n&&Object.entries(n).forEach(([i,o])=>{r.searchParams.append(i,o)}),r},Tb=e=>{try{return new URL(e).pathname.toLowerCase().endsWith(".svg")}catch{return!1}},Ib=e=>{if(/^#/.test(e)){const t=e.substring(1),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16),o=t.length===8?parseInt(t.substring(6,8),16)/255:1,s=o%1===0?o:+o.toFixed(2);return{r:n,g:r,b:i,a:s}}return e},ua=(e,t)=>{if(/^#/.test(e)){const n=Ib(e);return typeof n=="string"?n:`rgba(${n.r}, ${n.g}, ${n.b}, ${t})`}else if(/^rgb/.test(e)){const n=e.replace(/^rgba?\(|\s+|\)$/g,"").split(",");return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t})`}else return e},pf=e=>["#ffffff","#fff","white","#000000","#000","black","#808080","gray","grey"].includes(e.toLowerCase()),xb=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),i=Math.min(e,t,n);let o=0;if(r!==i){const s=r-i;switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return Math.round(o*360)},Ab=e=>{if(!e||e==="currentColor"||pf(e))return 0;const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color;document.body.removeChild(t);const r=n.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r)return 0;const[i,o,s,a]=r.map(Number);return xb(o,s,a)},kb=e=>!e||e==="currentColor"?"none":pf(e)?e.toLowerCase().includes("fff")||e==="white"?"brightness(0) invert(100%)":"brightness(0)":`brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(4299%)
|
|
73
|
+
hue-rotate(${Ab(e)}deg) brightness(97%) contrast(113%)`,Rb=e=>ne`
|
|
74
74
|
background-image: var(--icon-url);
|
|
75
75
|
background-repeat: no-repeat;
|
|
76
76
|
background-size: contain;
|
|
77
77
|
background-position: center;
|
|
78
78
|
background-color: transparent;
|
|
79
|
-
filter: ${
|
|
80
|
-
`,
|
|
79
|
+
filter: ${kb(e)};
|
|
80
|
+
`,Pb=e=>ne`
|
|
81
81
|
background-color: ${e};
|
|
82
82
|
-webkit-mask-box-image: var(--icon-url);
|
|
83
83
|
-webkit-mask-image: var(--icon-url);
|
|
@@ -88,7 +88,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
88
88
|
mask-repeat: no-repeat;
|
|
89
89
|
mask-size: contain;
|
|
90
90
|
mask-position: center;
|
|
91
|
-
`,
|
|
91
|
+
`,Ob=({size:e,color:t,isSvgResource:n,isAlternativeStyles:r})=>ne`
|
|
92
92
|
display: inline-flex;
|
|
93
93
|
align-items: center;
|
|
94
94
|
justify-content: center;
|
|
@@ -111,70 +111,70 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
111
111
|
height: ${e}px;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
${n&&
|
|
114
|
+
${n&&ne`
|
|
115
115
|
width: ${e}px;
|
|
116
116
|
height: ${e}px;
|
|
117
117
|
|
|
118
|
-
${r?
|
|
118
|
+
${r?Rb(t):Pb(t)}
|
|
119
119
|
`}
|
|
120
|
-
`;class
|
|
120
|
+
`;class mt extends be{constructor({name:t,color:n="currentColor",size:r=16,alt:i}){const o=Tb(t),s=_b(df.FIREFOX);super({tag:"span",styles:()=>Ob({size:r,color:n,isSvgResource:o,isAlternativeStyles:s})});const a=mb[t];if(a)this.element.innerHTML=a.svg;else if(o){const c=document.createElement("div");c.classList.add("icon"),this.element.append(c),this.element.style.setProperty("--icon-url",`url(${t})`)}else{const c=document.createElement("img");c.src=t,c.alt=i??"icon",this.element.append(c)}}}const ai={small:"32px",medium:"40px",large:"48px"},Lb=(e="medium")=>`calc(${ai[e]} + 8px * 2 )`,Nb=ti`
|
|
121
121
|
0% { transform: none; }
|
|
122
122
|
12.5% { transform: none; }
|
|
123
123
|
25% { transform: scale(1.1); }
|
|
124
124
|
37.5% { transform: scale(1.1); }
|
|
125
125
|
50% { transform: none; }
|
|
126
126
|
100% { transform: none; }
|
|
127
|
-
`,
|
|
127
|
+
`,Mb=(e="medium")=>{const t=ai[e],n=`calc(${t} * -1)`,r=`calc(${t} * -2)`;return ti`
|
|
128
128
|
0% { transform: translateY(0); }
|
|
129
129
|
12.5% { transform: translateY(${n}); }
|
|
130
130
|
25% { transform: translateY(${n}); }
|
|
131
131
|
37.5% { transform: translateY(${r}); }
|
|
132
132
|
87.5% { transform: translateY(${r}); }
|
|
133
133
|
100% { transform: translateY(0); }
|
|
134
|
-
`},
|
|
134
|
+
`},Db=(e,t="medium")=>{switch(t){case"small":return ne`
|
|
135
135
|
padding: 8px;
|
|
136
|
-
height: ${
|
|
136
|
+
height: ${ai[t]};
|
|
137
137
|
font-size: 12px;
|
|
138
138
|
line-height: 16px;
|
|
139
139
|
border-radius: ${e.button.small.borderRadius}px;
|
|
140
140
|
font-weight: 600;
|
|
141
|
-
`;case"medium":return
|
|
141
|
+
`;case"medium":return ne`
|
|
142
142
|
padding: 8px 16px;
|
|
143
|
-
height: ${
|
|
143
|
+
height: ${ai[t]};
|
|
144
144
|
line-height: 24px;
|
|
145
145
|
border-radius: ${e.button.medium.borderRadius}px;
|
|
146
146
|
font-size: 14px;
|
|
147
|
-
`;case"large":default:return
|
|
147
|
+
`;case"large":default:return ne`
|
|
148
148
|
padding: 8px 16px;
|
|
149
|
-
height: ${
|
|
149
|
+
height: ${ai[t]};
|
|
150
150
|
line-height: 32px;
|
|
151
151
|
border-radius: ${e.button.large.borderRadius}px;
|
|
152
152
|
font-size: 16px;
|
|
153
|
-
`}},
|
|
153
|
+
`}},la=(e,t)=>ne`
|
|
154
154
|
cursor: not-allowed;
|
|
155
155
|
background-color: ${t?e.apButtonDisableBgColor:e.button.disabled.backgroundColor};
|
|
156
156
|
color: ${t?e.apButtonDisableTextColor:e.button.disabled.textColor};
|
|
157
|
-
`,
|
|
157
|
+
`,Fb=(e,t,n)=>{switch(e){case"primary":return ne`
|
|
158
158
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
159
159
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
160
160
|
border: ${n.isApTheme?"unset":`${t.button.primary.borderWidth}px solid ${t.button.primary.borderColor}`};
|
|
161
161
|
&:hover {
|
|
162
|
-
background-color: ${
|
|
162
|
+
background-color: ${ua(n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor,.7)};
|
|
163
163
|
}
|
|
164
164
|
&:disabled {
|
|
165
|
-
${
|
|
165
|
+
${la(t,n.isApTheme)}
|
|
166
166
|
}
|
|
167
|
-
`;case"secondary":return
|
|
167
|
+
`;case"secondary":return ne`
|
|
168
168
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
169
169
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
170
170
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
171
171
|
&:hover {
|
|
172
|
-
background-color: ${
|
|
172
|
+
background-color: ${ua(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
173
173
|
}
|
|
174
174
|
&:disabled {
|
|
175
|
-
${
|
|
175
|
+
${la(t,n.isApTheme)}
|
|
176
176
|
}
|
|
177
|
-
`;case"text":return
|
|
177
|
+
`;case"text":return ne`
|
|
178
178
|
background-color: ${n.isApTheme?"unset":t.button.text.backgroundColor};
|
|
179
179
|
color: ${n.isApTheme?t.apButtonTextTxtColor:t.button.text.textColor};
|
|
180
180
|
border: ${n.isApTheme?1:t.button.text.borderWidth}px solid
|
|
@@ -185,23 +185,23 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
185
185
|
background-color: ${n.isApTheme?"unset":t.button.disabled.backgroundColor};
|
|
186
186
|
cursor: not-allowed;
|
|
187
187
|
}
|
|
188
|
-
`;case"copy-to-clipboard":return
|
|
188
|
+
`;case"copy-to-clipboard":return ne`
|
|
189
189
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
190
190
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
191
191
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
192
192
|
&:hover {
|
|
193
|
-
background-color: ${
|
|
193
|
+
background-color: ${ua(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
194
194
|
}
|
|
195
195
|
&:disabled {
|
|
196
|
-
${
|
|
196
|
+
${la(t,n.isApTheme)}
|
|
197
197
|
}
|
|
198
198
|
&[data-is-copied='true'] {
|
|
199
199
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
200
200
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
201
201
|
box-shadow: none;
|
|
202
|
-
animation: ${
|
|
202
|
+
animation: ${Nb} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
203
203
|
}
|
|
204
|
-
`;default:return
|
|
204
|
+
`;default:return ne``}},Ub=(e,t)=>{const{size:n,variant:r,isFullWidth:i}=t,o=ne`
|
|
205
205
|
border: none;
|
|
206
206
|
cursor: pointer;
|
|
207
207
|
display: inline-flex;
|
|
@@ -213,7 +213,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
213
213
|
font-family: ${t.isApTheme?e.apFontFamily:e.fontFamily};
|
|
214
214
|
font-weight: 600;
|
|
215
215
|
|
|
216
|
-
width: ${
|
|
216
|
+
width: ${i?"100%":"fit-content"};
|
|
217
217
|
|
|
218
218
|
transition:
|
|
219
219
|
background-color 0.3s,
|
|
@@ -243,7 +243,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
243
243
|
opacity 0.3s ease,
|
|
244
244
|
visibility 0.3s ease;
|
|
245
245
|
|
|
246
|
-
margin-top: ${
|
|
246
|
+
margin-top: ${Lb(n)};
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
&:focus-visible {
|
|
@@ -252,7 +252,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
252
252
|
|
|
253
253
|
&[data-is-copied='true'] {
|
|
254
254
|
.content-wrapper {
|
|
255
|
-
animation: ${
|
|
255
|
+
animation: ${Mb(n)} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
.content-copy {
|
|
@@ -260,7 +260,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
260
260
|
opacity: 1;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
`;return
|
|
263
|
+
`;return zy(o,Db(e,n),Fb(r,e,t))};class mn extends be{constructor({text:n,size:r="large",variant:i="primary",iconLeft:o,iconRight:s,isLoading:a=!1,isDisabled:c=!1,isFullWidth:u=!1,onClick:l,copyText:d=q.translate("copied"),isApTheme:f=!1}){const h={size:r,variant:i,isFullWidth:u,isApTheme:f};super({tag:"button",styles:p=>Ub(p,h)});S(this,"isLoading");S(this,"isDisabled");S(this,"iconLeft");S(this,"iconRight");S(this,"originalText");S(this,"originalIconLeft");S(this,"originalIconRight");S(this,"variant");S(this,"copyText");S(this,"onClick");this.isLoading=a,this.isDisabled=c,this.onClick=l,this.copyText=d,this.element.disabled=c,this.originalText=n,this.originalIconLeft=o,this.originalIconRight=s,this.variant=i,this.updateContent({text:n,iconLeft:o,iconRight:s}),this.element.addEventListener("click",this.handleClick.bind(this))}updateContent({text:n,iconLeft:r,iconRight:i}){this.element.innerHTML="";const o=document.createElement("div");if(o.classList.add("content-wrapper"),this.isLoading){const s=new an({size:16}).element;s.style.margin="auto",o.append(s),this.element.append(o)}else{const s=document.createElement("div");if(s.classList.add("content-info"),r&&(this.iconLeft=new mt({name:r}),s.append(this.iconLeft.element)),n&&s.appendChild(document.createTextNode(n)),i&&(this.iconRight=new mt({name:i}),s.append(this.iconRight.element)),o.append(s),this.variant==="copy-to-clipboard"){const a=document.createElement("div");a.classList.add("content-copy"),a.append(document.createTextNode(this.copyText)),o.append(a)}this.element.append(o)}}handleClick(n){this.variant==="copy-to-clipboard"&&this.copyText&&(this.element.setAttribute("data-is-copied","true"),setTimeout(()=>{this.element.setAttribute("data-is-copied","false")},3e3)),this.onClick&&!this.isLoading&&!this.isDisabled&&this.onClick(n)}setLoading(n){this.isLoading=n,this.updateContent({text:this.originalText,iconLeft:this.originalIconLeft,iconRight:this.originalIconRight})}setDisabled(n){this.isDisabled=n,this.element.disabled=n}}const he=(e,t,n)=>{const r=Z.getStyles();return t?r.input.disabled:e?r.input.error:r.input.normal},Mn=(e,t,n)=>({label:{size:12,lineHeight:16,weight:500,color:he(e,t).textColor},helperText:{size:12,lineHeight:16,weight:400,color:he(e,t).hintTextColor}}),Bb=e=>ne`
|
|
264
264
|
display: flex;
|
|
265
265
|
align-items: center;
|
|
266
266
|
gap: 10px;
|
|
@@ -274,7 +274,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
274
274
|
border-top-style: ${e.divider.variant};
|
|
275
275
|
margin: 0;
|
|
276
276
|
}
|
|
277
|
-
`;class
|
|
277
|
+
`;class hf extends be{constructor({text:t}){super({tag:"div",styles:r=>Bb(r)});const n=document.createElement("hr");if(n.classList.add("divider-line"),this.element.appendChild(n),t){const r=new X({text:t,size:16,weight:600,lineHeight:24}),i=document.createElement("hr");i.classList.add("divider-line"),r.render(this.element),this.element.appendChild(i)}}}const gf=(e,{error:t,disabled:n,maxWidth:r})=>ne`
|
|
278
278
|
display: flex;
|
|
279
279
|
flex-direction: column;
|
|
280
280
|
gap: 4px;
|
|
@@ -289,17 +289,17 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
289
289
|
display: flex;
|
|
290
290
|
align-items: center;
|
|
291
291
|
|
|
292
|
-
background-color: ${
|
|
293
|
-
color: ${
|
|
292
|
+
background-color: ${he(t,n).backgroundColor};
|
|
293
|
+
color: ${he(t,n).textColor};
|
|
294
294
|
|
|
295
|
-
border: ${
|
|
296
|
-
${
|
|
295
|
+
border: ${he(t,n).borderWidth}px solid
|
|
296
|
+
${he(t,n).borderColor};
|
|
297
297
|
transition: border-color 0.3s ease;
|
|
298
298
|
cursor: pointer;
|
|
299
299
|
|
|
300
300
|
height: 40px;
|
|
301
301
|
padding: 0px;
|
|
302
|
-
border-radius: ${
|
|
302
|
+
border-radius: ${he(t,n).borderRadius}px;
|
|
303
303
|
|
|
304
304
|
:hover,
|
|
305
305
|
:focus-within {
|
|
@@ -338,16 +338,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
338
338
|
|
|
339
339
|
&::placeholder {
|
|
340
340
|
font-size: 16px;
|
|
341
|
-
color: ${
|
|
341
|
+
color: ${he(t,n).placeholderTextColor};
|
|
342
342
|
opacity: 1;
|
|
343
343
|
}
|
|
344
344
|
&:-ms-input-placeholder {
|
|
345
345
|
font-size: 16px;
|
|
346
|
-
color: ${
|
|
346
|
+
color: ${he(t,n).placeholderTextColor};
|
|
347
347
|
}
|
|
348
348
|
&::-ms-input-placeholder {
|
|
349
349
|
font-size: 16px;
|
|
350
|
-
color: ${
|
|
350
|
+
color: ${he(t,n).placeholderTextColor};
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
&::-webkit-contacts-auto-fill-button {
|
|
@@ -381,14 +381,14 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
381
381
|
overflow-y: auto;
|
|
382
382
|
border: 1px solid ${e.input.focus.borderColor};
|
|
383
383
|
border-radius: 8px;
|
|
384
|
-
background-color: ${
|
|
384
|
+
background-color: ${he(t,n).backgroundColor};
|
|
385
385
|
z-index: 10;
|
|
386
386
|
list-style-type: none;
|
|
387
387
|
padding: 0;
|
|
388
388
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
389
389
|
|
|
390
390
|
scrollbar-width: thin;
|
|
391
|
-
scrollbar-color: ${e.input.focus.borderColor} ${
|
|
391
|
+
scrollbar-color: ${e.input.focus.borderColor} ${he().backgroundColor};
|
|
392
392
|
|
|
393
393
|
&::-webkit-scrollbar {
|
|
394
394
|
width: 6px;
|
|
@@ -396,7 +396,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
&::-webkit-scrollbar-track {
|
|
399
|
-
background: ${
|
|
399
|
+
background: ${he().backgroundColor};
|
|
400
400
|
border-radius: 8px;
|
|
401
401
|
}
|
|
402
402
|
|
|
@@ -416,7 +416,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
416
416
|
padding: 8px;
|
|
417
417
|
cursor: pointer;
|
|
418
418
|
transition: background-color 0.2s ease;
|
|
419
|
-
color: ${
|
|
419
|
+
color: ${he(t,n).textColor};
|
|
420
420
|
|
|
421
421
|
&:hover {
|
|
422
422
|
background-color: ${e.input.focus.backgroundColor};
|
|
@@ -437,7 +437,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
437
437
|
.select-icon {
|
|
438
438
|
margin-left: 8px;
|
|
439
439
|
}
|
|
440
|
-
`;class
|
|
440
|
+
`;class mf extends be{constructor({name:n,label:r,options:i,helperText:o,placeholder:s=q.translate("select"),emptyMessage:a=q.translate("select_item"),error:c=!1,disabled:u=!1,maxWidth:l="100%",showValue:d=!1,validateOn:f,onChange:h}){super({tag:"div",styles:g=>gf(g,{error:c,disabled:u,maxWidth:l})});S(this,"selectContainer");S(this,"inputElement");S(this,"dropdownIcon");S(this,"optionsList");S(this,"helperTextElement",null);S(this,"labelElement",null);S(this,"isOpen",!1);S(this,"filteredOptions",[]);S(this,"selectedValue",null);S(this,"highlightedIndex",-1);S(this,"currentErrorState");S(this,"currentDisabledState");S(this,"currentHelperText");S(this,"name");S(this,"label");S(this,"options");S(this,"emptyMessage");S(this,"showValue");S(this,"validateOn");S(this,"maxWidth");S(this,"onChange");this.name=n,this.label=r,this.options=i,this.emptyMessage=a,this.showValue=d,this.currentErrorState=c,this.currentDisabledState=u,this.currentHelperText=o,this.validateOn=f,this.maxWidth=l,this.onChange=h,r&&this.renderLabel(),this.selectContainer=document.createElement("div"),this.selectContainer.classList.add("select-input-container"),this.element.append(this.selectContainer),this.inputElement=document.createElement("input"),this.inputElement.classList.add("select-input-field"),this.inputElement.name=n,this.inputElement.id=n,this.inputElement.autocomplete="off",this.inputElement.disabled=u,s&&(this.inputElement.placeholder=s),this.selectContainer.append(this.inputElement),this.dropdownIcon=document.createElement("span"),this.dropdownIcon.classList.add("dropdown-icon-wrapper");const p=new mt({name:"arrow_down_line",size:24}).element;this.dropdownIcon.appendChild(p),this.selectContainer.appendChild(this.dropdownIcon),this.optionsList=document.createElement("ul"),this.optionsList.classList.add("select-options-list"),this.selectContainer.append(this.optionsList),this.renderOptions(i),this.selectContainer.addEventListener("click",g=>{this.optionsList.contains(g.target)||(this.toggleDropdown(!0),this.inputElement.setSelectionRange(0,this.inputElement.value.length),this.inputElement.focus())}),this.inputElement.addEventListener("input",g=>{var m;this.handleInput(g),(m=this.onChange)==null||m.call(this)}),this.selectContainer.addEventListener("change",this.handleInputChange.bind(this)),this.inputElement.addEventListener("keydown",g=>this.handleKeyDown(g)),o&&this.renderHelperText(o),document.addEventListener("click",this.handleClickOutside.bind(this))}handleInputChange(){var n;this!=null&&this.validateOn&&this.validate(),(n=this.onChange)==null||n.call(this)}renderLabel(){if(!this.label)return;const n=Mn(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new X({text:this.label,size:n.label.size,lineHeight:n.label.lineHeight,weight:n.label.weight,color:n.label.color,variant:"label"}).element,this.element.append(this.labelElement)),this.labelElement.htmlFor=this.name}renderHelperText(n){if(!n){this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null);return}const r=Mn(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new X({text:n,size:r.helperText.size,lineHeight:r.helperText.lineHeight,weight:r.helperText.weight,color:r.helperText.color}).element,this.element.append(this.helperTextElement))}updateComponentStyles(){const n=r=>gf(r,{error:this.currentErrorState,disabled:this.currentDisabledState,maxWidth:this.maxWidth});this.element.className=n(Z.getStyles())}renderOptions(n){if(this.optionsList.innerHTML="",this.filteredOptions=n,n.length>0)n.forEach(r=>{const i=document.createElement("li");if(i.classList.add("select-option"),r.icon){const s=new mt({name:r.icon,size:20}).element;i.appendChild(s)}const o=new X({text:`${r.name} ${this.showValue?r.value:""}`,size:16,lineHeight:24,weight:400}).element;i.appendChild(o),i.dataset.value=String(r.value),i.addEventListener("click",()=>this.handleOptionClick(r)),this.optionsList.append(i)});else{const r=document.createElement("div");r.classList.add("empty-option");const i=new X({text:this.emptyMessage??""}).element;r.append(i),this.optionsList.append(r)}}handleInput(n){const r=n.target.value.toLowerCase();if(r===""){const o=this.selectContainer.querySelector(".select-icon");o&&o.remove(),this.selectedValue=null}const i=this.options.filter(o=>{const s=o.name.toLowerCase().includes(r),a=this.showValue?String(o.value).toLowerCase().includes(r):!1;return s||a});this.renderOptions(i),this.toggleDropdown(!0)}toggleDropdown(n){this.isOpen=n,this.optionsList.style.display=this.isOpen?"block":"none",this.dropdownIcon.style.transform=this.isOpen?"rotate(-180deg)":"rotate(0deg)"}handleOptionClick({name:n,value:r,icon:i}){const o=this.selectContainer.querySelector(".select-icon");if(o&&o.remove(),i){const a=new mt({name:i,size:24}).element;a.classList.add("select-icon"),this.selectContainer.insertBefore(a,this.inputElement)}this.inputElement.value=this.showValue?String(r):n,this.selectedValue=r,this.renderOptions(this.options),this.toggleDropdown(!1),this.highlightedIndex=-1;const s=new Event("change",{bubbles:!0});this.inputElement.dispatchEvent(s)}handleClickOutside(n){this.selectContainer.contains(n.target)||this.toggleDropdown(!1)}handleKeyDown(n){const{key:r}=n;if(r==="Escape"){this.toggleDropdown(!1);return}if(!this.isOpen)return;const i=this.optionsList.querySelectorAll(".select-option");switch(r){case"ArrowDown":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex+1)%i.length,this.highlightOption(this.highlightedIndex);break;case"ArrowUp":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex-1+i.length)%i.length,this.highlightOption(this.highlightedIndex);break;case"Enter":if(n.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<this.filteredOptions.length){const o=this.filteredOptions[this.highlightedIndex];this.handleOptionClick(o)}break}}highlightOption(n){const r=this.optionsList.querySelectorAll(".select-option");if(r.forEach(i=>i.classList.remove("highlighted")),n>=0&&n<r.length){const i=r[n];i.classList.add("highlighted"),i.scrollIntoView({block:"nearest"})}}getValue(){return this.selectedValue}setValue(n){const r=this.options.find(i=>i.value===n);r&&this.handleOptionClick(r)}setHelperText(n){n?this.renderHelperText(n):this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null),this.updateComponentStyles()}setErrorState(n){this.currentErrorState!==n&&(this.currentErrorState=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}setDisabled(n){this.currentDisabledState!==n&&(this.currentDisabledState=n,this.inputElement.disabled=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}validate(n){const r=this.selectedValue!==null;if(this.setErrorState(!r),this.renderLabel(),!r){const i=n||(this.getValue()?q.translate("invalid_field"):q.translate("required_field"));this.renderHelperText(i)}return r}destroy(){document.removeEventListener("click",this.handleClickOutside.bind(this)),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),super.destroy()}}const vf=(e,{error:t,disabled:n})=>ne`
|
|
441
441
|
display: flex;
|
|
442
442
|
flex-direction: column;
|
|
443
443
|
gap: 4px;
|
|
@@ -457,16 +457,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
457
457
|
line-height: normal;
|
|
458
458
|
height: 40px;
|
|
459
459
|
padding: 8px;
|
|
460
|
-
border-radius: ${
|
|
460
|
+
border-radius: ${he(t,n).borderRadius}px;
|
|
461
461
|
font-size: 16px;
|
|
462
462
|
line-height: 24px;
|
|
463
463
|
outline: none;
|
|
464
464
|
caret-color: ${e.textColor};
|
|
465
465
|
|
|
466
|
-
background-color: ${
|
|
467
|
-
color: ${
|
|
468
|
-
border: ${
|
|
469
|
-
${
|
|
466
|
+
background-color: ${he(t,n).backgroundColor};
|
|
467
|
+
color: ${he(t,n).textColor};
|
|
468
|
+
border: ${he(t,n).borderWidth}px solid
|
|
469
|
+
${he(t,n).borderColor};
|
|
470
470
|
transition: border-color 0.3s ease;
|
|
471
471
|
|
|
472
472
|
:hover,
|
|
@@ -493,23 +493,23 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
493
493
|
}
|
|
494
494
|
&::placeholder {
|
|
495
495
|
font-size: 16px;
|
|
496
|
-
color: ${
|
|
496
|
+
color: ${he(t,n).placeholderTextColor};
|
|
497
497
|
opacity: 1;
|
|
498
498
|
}
|
|
499
499
|
&:-ms-input-placeholder {
|
|
500
500
|
font-size: 16px;
|
|
501
|
-
color: ${
|
|
501
|
+
color: ${he(t,n).placeholderTextColor};
|
|
502
502
|
}
|
|
503
503
|
&::-ms-input-placeholder {
|
|
504
504
|
font-size: 16px;
|
|
505
|
-
color: ${
|
|
505
|
+
color: ${he(t,n).placeholderTextColor};
|
|
506
506
|
}
|
|
507
507
|
&::-webkit-contacts-auto-fill-button {
|
|
508
508
|
visibility: hidden;
|
|
509
509
|
pointer-events: none;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
`;class
|
|
512
|
+
`;class yf extends be{constructor({name:n,label:r,helperText:i,type:o="text",placeholder:s,error:a=!1,disabled:c=!1,validationRegex:u,validateOn:l,mask:d,maxLength:f,minLength:h,onChange:p,onBlur:g}){super({tag:"div",styles:m=>vf(m,{error:a,disabled:c})});S(this,"inputElement");S(this,"helperTextElement",null);S(this,"labelElement",null);S(this,"currentErrorState");S(this,"currentDisabledState");S(this,"name");S(this,"label");S(this,"currentHelperText");S(this,"validationRegex");S(this,"validateOn");S(this,"mask");S(this,"onChange");S(this,"onBlur");this.currentErrorState=a,this.currentDisabledState=c,this.name=n,this.label=r,this.currentHelperText=i,this.validateOn=l,this.validationRegex=u,this.mask=d,this.onChange=p,this.onBlur=g,r&&this.renderLabel(),this.inputElement=document.createElement("input"),this.inputElement.type=o==="number"?"number":"text",this.inputElement.inputMode=o,this.inputElement.name=n,this.inputElement.id=n,this.inputElement.autocomplete="off",this.inputElement.disabled=c,s&&(this.inputElement.placeholder=s),f&&(this.inputElement.maxLength=f),h&&(this.inputElement.minLength=h),this.inputElement.classList.add("input-field"),this.element.append(this.inputElement),["number","tel"].includes(o)&&this.inputElement.addEventListener("input",this.handleNumericInput.bind(this)),this.inputElement.addEventListener("input",this.handleInputChange.bind(this)),this.inputElement.addEventListener("blur",this.handleInputBlur.bind(this)),i&&this.renderHelperText(i)}handleInputChange(){var n;this.inputElement.value=J1(this.inputElement.value,this.mask),(this==null?void 0:this.validateOn)==="onChange"&&this.validate(),(n=this.onChange)==null||n.call(this)}handleInputBlur(){var n;(this==null?void 0:this.validateOn)==="onBlur"&&this.validate(),(n=this.onBlur)==null||n.call(this)}renderLabel(){if(!this.label)return;const n=Mn(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new X({text:this.label,size:n.label.size,lineHeight:n.label.lineHeight,weight:n.label.weight,color:n.label.color,variant:"label"}).element,this.element.append(this.labelElement)),this.labelElement.htmlFor=this.name}renderHelperText(n){if(!n){this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null);return}const r=Mn(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new X({text:n,size:r.helperText.size,lineHeight:r.helperText.lineHeight,weight:r.helperText.weight,color:r.helperText.color}).element,this.element.append(this.helperTextElement))}updateComponentStyles(){const n=r=>vf(r,{error:this.currentErrorState,disabled:this.currentDisabledState});this.element.className=n(Z.getStyles())}handleNumericInput(n){const r=n.target;r.value=r.value.replace(/[^0-9]/g,"")}getValue(){return this.inputElement.value}setValue(n){this.inputElement.value=n}setHelperText(n){n?this.renderHelperText(n):this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null),this.updateComponentStyles()}setErrorState(n){this.currentErrorState!==n&&(this.currentErrorState=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}setDisabled(n){this.currentDisabledState!==n&&(this.currentDisabledState=n,this.inputElement.disabled=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}validate(n){if(!this.validationRegex)return!0;const r=Z1(this.inputElement.value,this.mask),i=this.validationRegex.test(r);if(this.setErrorState(!i),this.renderLabel(),!i){const o=n||(this.getValue().trim()?q.translate("invalid_field"):q.translate("required_field"));this.renderHelperText(o)}return i}}var Dn=(e=>(e.AMOUNT_DISPLAY="AMOUNT_DISPLAY",e.COPY="COPY",e.DESCRIPTION="DESCRIPTION",e.EXPIRATION_TIMER="EXPIRATION_TIMER",e.QR_CODE="QR_CODE",e.SHARE="SHARE",e))(Dn||{}),da=(e=>(e.TEXT="TEXT",e.SELECT="SELECT",e))(da||{});const $b=e=>{if(e)try{return new RegExp(e)}catch{console.warn("Invalid regex from backend:",e);return}},Vb=e=>e.map(t=>({name:t.value,value:t.key}));var bf=(e=>(e.MOBILE="480px",e.TABLET="768px",e.LAPTOP="1024px",e.DESKTOP="1280px",e))(bf||{});const zb=()=>ne`
|
|
513
513
|
display: flex;
|
|
514
514
|
flex-direction: column;
|
|
515
515
|
gap: 12px;
|
|
@@ -519,11 +519,11 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
519
519
|
gap: 12px;
|
|
520
520
|
flex-direction: row;
|
|
521
521
|
|
|
522
|
-
@media (max-width: ${
|
|
522
|
+
@media (max-width: ${bf.MOBILE}) {
|
|
523
523
|
flex-direction: column;
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
`;class
|
|
526
|
+
`;class Hb extends be{constructor(n){super({tag:"div",styles:()=>zb()});S(this,"componentProps");S(this,"dynamicInputs",{});S(this,"onValidationChange",()=>{});if(this.componentProps=n,n.title){const r=new hf({text:n.title}).element;this.element.append(r)}this.renderDynamicInputs()}renderDynamicInputs(){if(!this.componentProps.requiredFields)return;const n=this.componentProps.requiredFields.find(o=>o.field==="document_type"),r=this.componentProps.requiredFields.find(o=>o.field==="document_number"),i=this.componentProps.requiredFields.filter(o=>o.field!=="document_type"&&o.field!=="document_number");n&&r?this.renderDocumentNumberWithType(n,r):(n&&this.renderStandardInput(n),r&&this.renderStandardInput(r)),i.forEach(o=>{this.renderStandardInput(o)})}renderDocumentNumberWithType(n,r){const i=document.createElement("div");i.classList.add("row-container");const o=this.createInputElement(n),s=this.createInputElement(r);this.dynamicInputs[n.field]=o,this.dynamicInputs[r.field]=s,this.addInputEventListeners(o,n.type),this.addInputEventListeners(s,r.type),i.append(o.element,s.element),this.element.append(i)}renderStandardInput(n){const r=this.createInputElement(n);this.dynamicInputs[n.field]=r,this.addInputEventListeners(r,n.type),this.element.append(r.element)}createInputElement(n){return n.type===da.SELECT?this.createSelectInput({name:n.field,label:n.label,placeholder:n.placeholder,options:Vb(n.values),validateOn:"onChange"}):this.createTextInput({name:n.field,label:n.label,placeholder:n.placeholder,type:"text",validationRegex:$b(n.regex),validateOn:"onChange"})}createSelectInput(n){return new mf(n)}createTextInput(n){return new yf(n)}addInputEventListeners(n,r){const i=r===da.TEXT?"input":"change";n.element.addEventListener(i,()=>{this.validateForm(),this.triggerValidationChange()})}validateForm(){return Object.values(this.dynamicInputs).every(n=>n.getValue()&&n.validate())}getFormData(){const n={};return Object.entries(this.dynamicInputs).forEach(([r,i])=>{const o=i.getValue();n[r]=o!==null?String(o):""}),n}setValidationChangeHandler(n){this.onValidationChange=n,this.triggerValidationChange()}triggerValidationChange(){this.onValidationChange&&this.onValidationChange(this.validateForm())}setFieldError(n,r,i){const o=this.dynamicInputs[n];o&&(o.setErrorState(r),i&&o.setHelperText(i))}}const jb={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.1",MODE:"test",API_BASE_URL:"https://partners-api-tst.astropay.com/api",RESOURCES_BUCKET:"https://rs-tst.astropay.com",CHECKOUT_URL:"https://checkout-tst.astropay.com"},sandbox:{NAME:"@astropay/payments-lib",VERSION:"2.0.1",MODE:"staging",API_BASE_URL:"https://partners-api-sandbox.astropay.com/api",RESOURCES_BUCKET:"https://rs-tst.astropay.com",CHECKOUT_URL:"https://checkout-sandbox.astropay.com"},production:{NAME:"@astropay/payments-lib",VERSION:"2.0.1",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com"}};var ci=(e=>(e.SESSION_ID="session_id",e))(ci||{});const pn=class pn{static init(t){const n=io(t==null?void 0:t.environment,[...H1,"test"],"production"),r=io(t==null?void 0:t.currencyMode,W1,"iso");pn.environment=n,pn.currencyMode=r}static getRuntimeConfig(){const t=pn.environment||"production";return jb[t]}static getEnvironment(){return pn.environment}static getCurrencyMode(){return pn.currencyMode}};S(pn,"environment"),S(pn,"currencyMode");let Ye=pn;const qb={AED:"ar-AE",AOA:"pt-AO",AND:"ca-AD",ARS:"es-AR",AUD:"en-AU",BDT:"bn-BD",BGN:"bg-BG",BOB:"es-BO",BRL:"pt-BR",CAD:"en-CA",CDF:"fr-CD",CLP:"es-CL",CNY:"zh-CN",COP:"es-CO",CZK:"cs-CZ",DKK:"da-DK",EGP:"ar-EG",ETB:"am-ET",EUR:"de-DE",GBP:"en-GB",GHS:"en-GH",GTQ:"es-GT",HNL:"es-HN",HKD:"zh-HK",HUF:"hu-HU",IDR:"id-ID",INR:"hi-IN",JPY:"ja-JP",KES:"en-KE",KRW:"ko-KR",KWD:"ar-KW",KZT:"kk-KZ",LKR:"si-LK",LSL:"st-LS",MAD:"ar-MA",MGA:"mg-MG",MKD:"mk-MK",MMK:"my-MM",MNT:"mn-MN",MOP:"zh-MO",MXN:"es-MX",MYR:"ms-MY",MZN:"pt-MZ",NGN:"en-NG",NIO:"es-NI",NOK:"no-NO",NPR:"ne-NP",NZD:"en-NZ",PAB:"es-PA",PEN:"es-PE",PKR:"ur-PK",PLN:"pl-PL",PYG:"es-PY",QAR:"ar-QA",RMB:"zh-CN",RSD:"sr-RS",RUB:"ru-RU",RWF:"rw-RW",SAR:"ar-SA",SEK:"sv-SE",SLL:"en-SL",SVC:"es-SV",THB:"th-TH",TND:"ar-TN",TRY:"tr-TR",TTD:"en-TT",TWD:"zh-TW",TZS:"sw-TZ",UAH:"uk-UA",UGX:"en-UG",USD:"en-US",UYU:"es-UY",UZS:"uz-UZ",VND:"vi-VN",XAF:"fr-CM",XOF:"fr-SN",ZAR:"en-ZA",ZWD:"en-ZW",ZWL:"en-ZW"},Wb=(e,t)=>{const n=qb[t]||"en-US";return new Intl.NumberFormat(n,{style:"decimal",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},Gb={AED:"د.إ",AOA:"Kz",AND:"€",ARS:"$",AUD:"$",BDT:"৳",BGN:"лв",BOB:"Bs.",BRL:"R$",CAD:"$",CDF:"FC",CLP:"$",CNY:"¥",COP:"$",CZK:"Kč",DKK:"kr",EGP:"£",ETB:"Br",EUR:"€",GBP:"£",GHS:"₵",GTQ:"Q",HNL:"L",HKD:"$",HUF:"Ft",IDR:"Rp",INR:"₹",JPY:"¥",KES:"KSh",KRW:"₩",KWD:"د.ك",KZT:"₸",LKR:"₨",LSL:"L",MAD:"د.م.",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MXN:"$",MYR:"RM",MZN:"MT",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",PAB:"B/.",PEN:"S/.",PKR:"₨",PLN:"zł",PYG:"₲",QAR:"﷼",RMB:"¥",RSD:"РСД",RUB:"₽",RWF:"FRw",SAR:"ر.س",SEK:"kr",SLL:"Le",SVC:"$",THB:"฿",TND:"د.ت",TRY:"₺",TTD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"US$",UYU:"$",UZS:"so'm",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZWD:"$",ZWL:"$"},Kb=e=>e===void 0?"":Gb[e.trim()]||e,fa=(e,t,n)=>{const r=Wb(e,t);return n==="symbol"?`${Kb(t)} ${r}`:`${r} ${t}`},Yb=e=>ne`
|
|
527
527
|
display: flex;
|
|
528
528
|
flex-direction: column;
|
|
529
529
|
background-color: ${e.card.backgroundColor};
|
|
@@ -532,23 +532,35 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
532
532
|
padding: ${e.card.padding}px;
|
|
533
533
|
border: ${e.card.borderWidth}px ${e.card.borderStyle} ${e.card.borderColor};
|
|
534
534
|
border-radius: ${e.card.borderRadius}px;
|
|
535
|
-
`;class
|
|
535
|
+
`;class Jb extends be{constructor(t){super({tag:"div",styles:i=>Yb(i)});const n=new X({text:q.translate("payment_amount"),size:16,lineHeight:24,weight:600}).element,r=new X({text:fa(t.amount,t.currency,Ye.getCurrencyMode()),size:26,lineHeight:24,weight:600}).element;this.element.append(n,r)}}const Zb=()=>ne`
|
|
536
536
|
display: flex;
|
|
537
537
|
flex-direction: column;
|
|
538
538
|
align-items: center;
|
|
539
539
|
gap: 8px;
|
|
540
|
-
`;class Oi extends se{constructor(t){super({tag:"div",styles:()=>s1()});const n=t.type==="success",r=n?z.getStyles().messages.success.textColor:z.getStyles().messages.error.textColor,s=new qe({name:n?"check_circle_line":"close_circle_line",size:96,color:r}).element;if(this.element.append(s),t.title){const i=new H({text:t.title,size:20,lineHeight:30,weight:600,align:"center"}).element;this.element.append(i)}if(t.description){const i=new H({text:t.description,size:16,lineHeight:24,align:"center"}).element;this.element.append(i)}}}var E=Ke;function Li(){var e=Ke;const t=["clear","127830LZHlSi",e(795),e(743),e(794),e(649),e(511),"1048780OzWlkN",e(668),e(412),e(465),e(180),e(520),e(373),e(419),e(562),e(422),"off"];return(Li=function(){return t})()}(function(){for(var e=Ke,t=Mi();;)try{if(-parseInt(e(329))/1*(parseInt(e(274))/2)+-parseInt(e(369))/3*(-parseInt(e(367))/4)+-parseInt(e(233))/5+parseInt(e(145))/6*(-parseInt(e(701))/7)+-parseInt(e(655))/8*(-parseInt(e(270))/9)+parseInt(e(315))/10*(parseInt(e(142))/11)+parseInt(e(685))/12===588751)break;t.push(t.shift())}catch{t.push(t.shift())}})();const Ni=Di;function Mi(){var e=["3448vNCtZZ","761436JoNrAO","5310140VtlWwy","Request timeout","7672278JDWNZO","90ZjyTbp","3104038VhHmhJ","341079ldogSu","3114441jTKeeA","key","PRODUCTION","getAttribute","toDotCase","send","102532iujTOj","757371vntIDP","rule","28497zqLGhH","1965484iDLxVf","justify","10QefxGX","5066250nuHGFb","append","1380400kMJPdd","tags","3598075UDNdui","rel","latest","5679575iNTExO","@font-feature-values","700156cwVhpM","13090752DcUgRT","count","lowerFirst","box-pack:$3","@keyframes","6990495zFYjlD","timeout","SANDBOX","1764180DwriBQ","28900hQasRN","get","$2box$3","592uldMpH","1906140GGDNCn","forEach","6lcQlGI","timeZone","330066EfbpyJ","2180136rfoyVo","2548490MycJlj","3489ZHTUlC","includes","902079TZNeVj","hasOwnProperty","20cFIzva","flex-line-pack","5421zZCtjq","anim","1685971anZxDF","1118807BrroiT","633515GvGIbN","href","612712APocYB","-ms-","34347599FblyIU","5oIWUit",'/"]',"styleSheets","1149940kbRkDq","18emqyKv","216768ATlgsw","REQUIRED","1538910aqOPES","167058fDTlal","1802382UuEKog","11928996WPgChJ","297544AzCjab","7cCQubY","210052cCRFdo","15365691CaBpSv","prepend","1837320JmVWKN","apply","5488040tLgchU","6404728IJjHNF","cssRules","[HTTP]: ","function","538328lGaoiz","3WyhRFj","set","document.head or document.body","18KOgRUC","3PpNGVC","frames","request","formatKeys","2515230SGPlYS","1557YOosgA","container","4144596Ukwkkq","14mcAgvY","_createCaseFirst","80179OoRuKl","NOT_FOUND","test","1063965TOYbKD","112560WXZvtM","5855416GyXitv","authorization","insertionPoint","ctx","3122830eGkjjc","173392QMdDYZ","197776ZnKCeZ","comm","42CEhiUc","3UDJFFS","8znKpbY","1rkGFTj","1103656RUOYui","5297088ciYuDR","CopyButton","random","5589390vSVLAu","done","969632YGVaMk","flex-pack:$3","setPrototypeOf","negative","$2$3","8766CUlXUX","6555474dHVLiB","16hoClBR","10399347ouOdzC","1731331adTcvK","6011170PFMfeO","box-","2QsMDbx","396880hxDmUW","5lLsGOe","lower","288762yBOcUy","927680PXUBpa","5272970jsKcdl","210wvAPTz","4390984qBtQNZ","1042915vBnDcJ","slice","18146574kLGOdt","Content-Type","@counter-style","1635840LijluJ","assign","then","148iTkCvR","upperFirst","4586523dESxoU","102UdDlbM","13480IirCBl","application/json","-$&","snake","startCase","3782506eozEyq","[UNHANDLED]: ","1586289ZbsznC","parent","compat","style[data-emotion]:not([data-s])","41346sAgKHc","origin","1542472UUshgd","toPascalCase","domians","187957vMwqit","toSnakeCase","568pAcJOy","5590kjPEGP","@font-face","34057TCsfxk","9621207ZSMPqN","data-emotion","_startCase","print-","@media","link",":read-write","NOT_LOADED","9356KfJoDB","animationName","4mPQIOh","animation","2696336QqSQcN","start","3363787mMyewX","12991583mFbRDh","35tYPZLV","35168opQkvL","32WPbhAk","hydrate","/public/v1/token/reveal","36hVbjtN","basis","$1$2","cdn","__emotion_styles","22apMIFO","3goapWe","3275226iDBkQv","push","221142kMnpSu","querySelectorAll","114RSjmoG","reveal","2672020NupvKQ","5voBSrt","5280612FAmHRj","2YDvJFs","121946FvfpOL","TIMEOUT","BAD_REQUEST","308070mzXybL","7704828AlyWpW","4136vTyAoM","42WATbWV","17375868QkLWYY","1961979ltppkW","369356uTNDzr","5112212jRFQZI","24746700nYUjHu","$1 $2","6521168AcnhGa","style","12tOiqGC","https://tokenizer-tst.cc.astropay.com","speedy","60VyHydS","793022whjRWB","bind","kebab","10Oqises","add","1470645xRoijs","object","captureStackTrace","781649cCTwXr","182824NOFIwU","4817756GOdPsv","BASE_CDN","isArray","@supports","1244744kHEZvp","1204400cULrpT","449711XSjyNn","@namespace","57gVyDRX","emit","6236046SweZxs","defineProperties","@@INIT","3014374nROcbQ","params","sheet","1671942sLAGQH","Unable to find ","shift","canExecute","upper","UNHANDLED","321246WzqUuK","2416zstDHz","78TjMsRA","@document","486479crVyAA","1274230eUYpuD","7476MqGCll","https://tokenizer.cc.astropay.com","9qEwJkj","94mlxQmC","_insertTag","@viewport","copy-button","2oFrXUh","css","707329nPsPGZ","3903120ZTbQWm","1250232QMjwkz","993063ECHrBH","off","box$3","2387410tdnXlE","environment","type","4XTbgyi","207494VIJaqZ","207VWsTHT","6MQcvFH","35KTILAE","623aFRIRv","104MtyiFW","70fByxgL","1328390hcsUJy","11965976myZRSf","2932168wOOQED","7CAfDgU","27xTvXzF","5139khheWn","18298ErvNda","15qVcyAs","2581385zzzlSz","1531173EygmBU","5013TdEGGQ","39251454EyvEGu","1szHVRr","nextSibling","171eGkepJ","995792ZXdNpW","getFullCdn","49fgToOT","141238OYIhFf","3604728wtPlZt","9byfBJF","exec","next","message","70759QyvmDC","isSpeedy","128yfgIdV","data-s","200ROoAmA","shrink","length","282358JpRRgN","isOperational","insert","3278505kVkcHW","2558421fHqYVU","1165706VPRSLL","split","360993lzNNst","3986rrEZYp","return","3480945BQAAYg","2nMBmkS","2281844ROitQp","BASE_API","27HmsHKI","679404ZmaTyg","20xkgBFi","3908064tZgPPb","1790914KWViXl","inserted","stylisPlugins","reduce","insertBefore","26oJRKGO","119987EZDfNd","565eyruQF","Access-Control-Allow-Origin","595876LgUVRS","1992206jKEGfb","join","193550GoZXIJ","202wLqUwO","replace","baseURL"," is invalid.","99amzLEi","12446nhMFLu","1856148uSihXJ","31566270qvtShe","56045nULafv","abs","5889208ocarfU","2206497yNbZFm","7WjjEbv","@keyframes ","firstChild","305907rAOuHi","1070106SrHRtP","1KlNACj","2829256VMfbYc","801054pmVKPQ","45296tjbJvx","399116yuJdxn","TimeZone","removeEventListener","UNDEFINED",' "]',"lastIndex","18388260JgPhmo","790sQdzeI","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx","39nuPwxQ","nonce","1906825qFGXWA","102Qkfvvl","name","raw","20gywqiU","7308324sgDoMc","34825311qnCLyR","991531xZguiI","4593190CadDlo","INVALID","1uSGfgo","input-$1","1501542qKAixX","prototype","registered","456wJQuIj","347732LsCzct","parse","undefined","76385hkeDYT","inline-","115026FZBXCQ","5txmdnE","32HPdvVb","8954800LNVZHA","accessToken","3GcEFSv","props","5028BbqWZE","34672561hfhCnC","6522030iNQqBd","36TYjiRw","474fHLsgQ","365994YPzeNn","toKebabCase","6SBjYSO","1HxbtmM","toCamelCase","3xMbMIj","313859KKbbgd","keys","6LCyCWH","tb-rl","1145017tuPjtp","api","10895PHjSJt","boolean","flex-$1$2","2012180BGZvZq","5JHUgnG","6eqGueN","create","1483570zwTktD","366KnZgCn","14qDkMOo","8FUVWOn","38685lFcQsk","appendChild","4wswXHb","INTERNAL_SERVER_ERROR","315634dCJvdO","32039NIQJjh","trim","entries","143352vIzUva","-grow","6vPzjsU","getOwnPropertyDescriptors","192VVRXxR","2013040uXGWiH","grow","10gWvkPZ","getOwnPropertySymbols","!important","5028340uiCobm","splitWords","1398012AIJUyj","1632420YnhDrH","ctr"," is undefined.","41812yDXNFv","2495164uYJjkv","-moz-","version","502691MEcBqX","getHeaders","3kPtUIZ","stringify","14822650JPeFEZ","@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ","42054ESbccP","_toWords","4242528bXZfiT","3344667OIHhxe","5750396vrmTdj","head","268152SJsZnw","427cxPooO","isUndefined","3930zrQOch","listeners","decl","@import","filter","stop","location","79674ZpwWYN","293732SBYxst","/public/v1/token","fromCharCode","toLowerCase","toUpperCase","call","GET","addEventListener","setAttribute","26941288CkDEbN","post","11oqlwuN","Access token not set","87GWhrFE","emitter","before","isRequired","1369700dRAXAo","5GSCGHS","string","toString","24384006yWcRvg","_canExecute","8765008liwqJC","sourceWindow","sandbox","7368UiaItP","12GMrAvZ","HTTP","dns-prefetch","4410036tOJnlJ","264834CkfPaR","children","4214610DepdAD","1472518dXJTTo","3379032afmmzz","Component selectors can only be used in conjunction with ","8ZmfgGJ","44cPbEBd","582SAPPev","350313NZGJmJ","4249880hofxWm",":read-only","436145BXkDSV","toSentenceCase","24qGiocM","flex-item-","REQUEST_TIMEOUT","UNAUTHORIZED","2924874IDKzfu","11ozoHrq","20380sohzME","284730CeOziu","6521911DlQhaK","resolve","175pzlaDH","12Wntbrz","153CwXsSP","6807462wcVIbh","$`$1","99255obnocz","8565340BeQZTN","frameId","3220704wvCPTK","9vcUkeB","5163599fsttEm","983742ZSzkPs","1880YXBEgQ","postMessage","6676776VbOJGf","value","72700aKFNWB","Request error! status: ","2685321kQBtXq","2011122iTUboz","784830EiOgSk","4Shhqxd","concat","throw","777225SHDgSu","resolvedOptions","search","24brqEuT","stretch","2353821ouiOcG","16BpXaTH","body","4168339BVBfRq","_upperFirst","styles","5GkJNGS","2498022TthXHp","match","4399206zUvsoU","defineProperty","45vUgLOB",'script[src^="',"box-$1$2","1915506xRzusT","targetOrigin","10vjgZog","map","3084189TBfDxs","2617015rxAdDp","20057BCeMKK","692668yJTffY","3275913IwuUbo","5yABJbK","charCodeAt","4DRtert","formatKey","5gnwpyW","_lowerCase","4622320DSbOxK","createElement","1428025rswbrb","AbortError","272928GGfFVj","737mdBFHW","4950912kToKgF","handleMessage","8310840DVoCar","getOwnPropertyDescriptor","109064imVtqW","createTextNode","6XsYOJz","24899zSajlN","127845nWOlks","21ZAugTX","11860803tMqYZp","3898532gnOkwM","5015045AqKKoB","1371378msYiaj","5167656aUcLyl","209740ohkUFh","7903578rApVjM","378mIpYul","UNABLE_TO_FIND","586668OMSavw","https://tokenizer-web.cc.astropay.com","39728XQruux","::placeholder","2hgGSIR","3799864GhLwZS","removeChild","toLocaleLowerCase","40869670rNPvRw","flush","235779fIEMDA","enumerable","5CDMHbY","Reveal","773584eZyLko","1907948myHfGb","61554tirTmC","4269661uBmwSk","23881380dQaLeD","296368dsyAUL"];return(Mi=function(){return e})()}function Di(e,t){const n=Li();return(Di=function(r,s){return n[r-=160]})(e,t)}(function(){var e=Ke;const t=Di,n=Li();for(;;)try{if(-parseInt(t(176))/1*(-parseInt(t(169))/2)+-parseInt(t(175))/3+parseInt(t(172))/4*(parseInt(t(173))/5)+parseInt(t(170))/6*(-parseInt(t(161))/7)+-parseInt(t(174))/8+-parseInt(t(163))/9*(parseInt(t(167))/10)+parseInt(t(171))/11==561693)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),Ni(165),Ni(177),Ni(166);var Je,Ft,Ge,ql,Xe,gt,Gl,Kl,Fi,Bi,Yl,ds;function Ui(){var e=Ke,t=[e(350),e(396),e(311),e(474),"837xAVhUS","HTTP",e(724),e(144),e(264),e(473),e(689),e(226),e(221),"TIMEOUT","NOT_LOADED",e(328),e(378),e(179),e(656),e(563),"6960805uGgNwo",e(192),e(426),"12267310uEVrHO"];return(Ui=function(){return t})()}function ps(e,t){var n=Ui();return(ps=function(r,s){return n[r-=191]})(e,t)}function $i(e,t){var n=Vi();return($i=function(r,s){return n[r-=203]})(e,t)}function Vi(){var e=Ke,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Vi=function(){return t})()}function zi(e,t){var n=Hi();return(zi=function(r,s){return n[r-=166]})(e,t)}function Hi(){var e=Ke,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Hi=function(){return t})()}function Zl(e,t){var n=ji();return(Zl=function(r,s){return n[r-=472]})(e,t)}function ji(){var e=Ke,t=[e(308),e(157),e(444),e(335),e(279),e(169),"2vZiVLA","1287DSJSxR",e(240),e(251),e(456),e(477),e(692),"96LHSqDE"];return(ji=function(){return t})()}(function(){for(var e=Ke,t=ps,n=Ui();;)try{if(parseInt(t(196))/1*(parseInt(t(200))/2)+-parseInt(t(209))/3*(parseInt(t(214))/4)+parseInt(t(212))/5+parseInt(t(193))/6*(-parseInt(t(204))/7)+parseInt(t(203))/8+parseInt(t(192))/9*(parseInt(t(198))/10)+-parseInt(t(191))/11==844014)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(Ft=Je||(Je={}))[(Ge=ps)(210)]=Ge(210),Ft[Ge(194)]=Ge(194),Ft[Ge(211)]=Ge(211),Ft[E(773)]=Ge(206),Ft[Ge(207)]=Ge(207),Ft[Ge(197)]=Ge(197),Ft[Ge(205)]=E(143),Ft.UNHANDLED=Ge(213),gt=ps,(Xe=ql||(ql={}))[Xe.OK=200]="OK",Xe[Xe[gt(199)]=400]=gt(199),Xe[Xe[gt(202)]=404]=gt(202),Xe[Xe[gt(208)]=500]=E(378),Xe[Xe[gt(201)]=408]=gt(201),Xe[Xe[gt(195)]=401]=gt(195),(function(){for(var e=E,t=$i,n=Vi();;)try{if(-parseInt(t(211))/1+-parseInt(t(209))/2*(parseInt(t(210))/3)+-parseInt(t(212))/4*(parseInt(t(207))/5)+-parseInt(t(204))/6+-parseInt(t(206))/7*(parseInt(t(203))/8)+-parseInt(t(208))/9+parseInt(t(214))/10==660557)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),Fi=$i,(Kl=Gl||(Gl={}))[E(577)]=Fi(205),Kl[Fi(213)]=E(205),(function(){for(var e=E,t=zi,n=Hi();;)try{if(parseInt(t(167))/1+parseInt(t(175))/2+parseInt(t(178))/3+parseInt(t(176))/4*(-parseInt(t(172))/5)+-parseInt(t(170))/6+-parseInt(t(171))/7*(-parseInt(t(168))/8)+parseInt(t(174))/9==266134)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(Yl=Bi||(Bi={}))[(ds=zi)(166)]=ds(173),Yl[ds(169)]=ds(177),(function(){for(var e=E,t=Zl,n=ji();;)try{if(parseInt(t(479))/1*(-parseInt(t(485))/2)+parseInt(t(478))/3*(parseInt(t(477))/4)+parseInt(t(481))/5*(-parseInt(t(475))/6)+parseInt(t(482))/7*(parseInt(t(474))/8)+parseInt(t(472))/9*(parseInt(t(476))/10)+-parseInt(t(484))/11*(parseInt(t(480))/12)+-parseInt(t(483))/13*(parseInt(t(473))/14)==639293)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const In=hs;(function(){var e=E;const t=hs,n=Wi();for(;;)try{if(parseInt(t(494))/1+parseInt(t(487))/2*(-parseInt(t(497))/3)+-parseInt(t(485))/4*(parseInt(t(483))/5)+-parseInt(t(488))/6+parseInt(t(484))/7*(-parseInt(t(499))/8)+parseInt(t(469))/9*(-parseInt(t(480))/10)+parseInt(t(468))/11==507588)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const br={isRequired:e=>e+In(475),isUndefined:e=>e+In(492),isInvalid:e=>e+In(490),unableToFind:e=>In(466)+e+".",notLoaded:e=>In(473)+e+"."};class fs extends Error{constructor(t,n,r=!1){var s=E;const i=In;let o=n;switch(t){case Je[i(491)]:o=br[i(470)](n);break;case Je[i(479)]:o=br.isInvalid(n);break;case Je[i(486)]:o=br[i(476)](n);break;case Je[s(563)]:o=br[i(495)](n);break;case Je[i(481)]:o=br[i(493)](n);break;case Je[s(454)]:o=i(478)+n;break;case Je[i(471)]:o=i(496)+n;break;case Je[i(477)]:default:o=i(474)+n}var a,c,l;super(o),a=this,l=void 0,(c=i(482))in a?Object[hs(489)](a,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[c]=l,Object[i(472)](this,new.target.prototype),this[i(467)]=t,this[i(482)]=r,Error[i(498)](this)}}function hs(e,t){const n=Wi();return(hs=function(r,s){return n[r-=466]})(e,t)}function Wi(){var e=E;const t=[e(348),e(524),e(442),e(143),e(713),"Failed to load the ",e(750)," is required.",e(417),e(192),e(671),e(328),e(164),e(773),e(257),e(645),e(358),e(784),"UNDEFINED","618834PMzmgD",e(519),e(520),e(290),e(656),e(398),"notLoaded",e(218),"unableToFind","[TIMEOUT]: ",e(357),"captureStackTrace",e(223),e(188),e(321)];return(Wi=function(){return t})()}function Jl(e,t){var n=qi();return(Jl=function(r,s){return n[r-=363]})(e,t)}function qi(){var e=E,t=[e(699),"10296792NSbaBf",e(144),e(237),e(713),e(171),"3JrHjWm",e(467),e(520),e(239),"httpCode",e(390),e(590),e(280),e(303)];return(qi=function(){return t})()}(function(){for(var e=E,t=Jl,n=qi();;)try{if(parseInt(t(365))/1*(-parseInt(t(374))/2)+-parseInt(t(368))/3*(-parseInt(t(367))/4)+-parseInt(t(373))/5*(-parseInt(t(376))/6)+parseInt(t(375))/7+-parseInt(t(377))/8*(parseInt(t(371))/9)+parseInt(t(369))/10+parseInt(t(363))/11==917605)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const yr=Ki;function Gi(){var e=E;const t=[e(683),e(336),e(629),e(541),e(446),"143705UhzlIi",e(141),e(193),e(176),e(147),e(674),e(688),e(234),e(173),e(406),e(606),"940hBWQzM"];return(Gi=function(){return t})()}function Ki(e,t){const n=Gi();return(Ki=function(r,s){return n[r-=127]})(e,t)}(function(){var e=E;const t=Ki,n=Gi();for(;;)try{if(parseInt(t(139))/1*(-parseInt(t(140))/2)+parseInt(t(127))/3*(parseInt(t(142))/4)+-parseInt(t(137))/5+-parseInt(t(141))/6+-parseInt(t(129))/7+-parseInt(t(143))/8*(parseInt(t(134))/9)+-parseInt(t(133))/10*(-parseInt(t(128))/11)==195235)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class i1{static[yr(135)](t){const n=yr,r=new URLSearchParams(t),s={};return r[n(136)](((i,o)=>{var a=Ke;const c=n;s[o]?Array[c(130)](s[o])?s[o][a(795)](i):s[o]=[s[o],i]:s[o]=i})),s}static parseObject(t){return this[yr(135)](t)}static[yr(131)](t){const n=yr,r=new URLSearchParams;for(const s in t){const i=t[s];if(Array[n(130)](i))for(const o of i)r[n(132)](s,o);else r[n(132)](s,i?i[n(138)]():"")}return r[n(138)]()}}const ms=Yi;function Yi(e,t){const n=Zi();return(Yi=function(r,s){return n[r-=358]})(e,t)}(function(){var e=E;const t=Yi,n=Zi();for(;;)try{if(parseInt(t(368))/1+parseInt(t(367))/2*(parseInt(t(361))/3)+-parseInt(t(371))/4+-parseInt(t(358))/5*(-parseInt(t(370))/6)+parseInt(t(362))/7*(parseInt(t(366))/8)+parseInt(t(363))/9*(parseInt(t(364))/10)+-parseInt(t(372))/11==832538)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Tn={endpoints:{tokenizer:E(427),reveal:ms(365)},domians:{cdn:{production:ms(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:ms(359),sandbox:ms(360)}}};function Zi(){var e=E;const t=[e(393),e(786),e(471),"107952fYoopL",e(644),e(565),"5250978IBLHHK","2968388TUhYeT",e(236),e(537),e(200),e(158),e(317),e(780),e(677)];return(Zi=function(){return t})()}const o1=Ji;function Ji(e,t){const n=Xi();return(Ji=function(r,s){return n[r-=466]})(e,t)}(function(){var e=E;const t=Ji,n=Xi();for(;;)try{if(parseInt(t(475))/1+parseInt(t(466))/2*(-parseInt(t(472))/3)+parseInt(t(471))/4+-parseInt(t(467))/5*(parseInt(t(473))/6)+parseInt(t(474))/7*(-parseInt(t(469))/8)+-parseInt(t(470))/9*(-parseInt(t(477))/10)+-parseInt(t(476))/11==221555)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const a1={environment:Bi[o1(468)],version:E(611)};function Xi(){var e=E;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(Xi=function(){return t})()}function Qi(){var e=E;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(Qi=function(){return t})()}function Xl(e,t){const n=Qi();return(Xl=function(r,s){return n[r-=155]})(e,t)}(function(){var e=E;const t=Xl,n=Qi();for(;;)try{if(parseInt(t(162))/1*(parseInt(t(155))/2)+parseInt(t(157))/3+-parseInt(t(159))/4+parseInt(t(160))/5*(-parseInt(t(163))/6)+-parseInt(t(158))/7*(parseInt(t(164))/8)+parseInt(t(161))/9*(parseInt(t(156))/10)+parseInt(t(165))/11==451934)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})();let eo=a1;const Qt=()=>eo,c1=to;function to(e,t){const n=no();return(to=function(r,s){return n[r-=379]})(e,t)}(function(){var e=E;const t=to,n=no();for(;;)try{if(parseInt(t(384))/1+-parseInt(t(389))/2+-parseInt(t(383))/3*(-parseInt(t(387))/4)+parseInt(t(388))/5+-parseInt(t(381))/6*(parseInt(t(385))/7)+-parseInt(t(382))/8+parseInt(t(379))/9*(parseInt(t(386))/10)==645524)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();const Ql=(e,t)=>e[c1(380)](new RegExp(t+"$"),"");function no(){var e=E;const t=[e(306),e(288),e(372),e(155),e(232),e(632),"83594fyhqnZ",e(730),e(399),"3139375mafbsW",e(607)];return(no=function(){return t})()}const wr=so;function ro(){var e=E;const t=[e(535),e(602),e(582),e(266),e(416),e(172),"11uyatGf",e(402),e(269),"6nfgxja",e(698),e(150),e(219),"domians",e(363),e(790),e(720),e(501),e(215)];return(ro=function(){return t})()}function so(e,t){const n=ro();return(so=function(r,s){return n[r-=110]})(e,t)}(function(){var e=E;const t=so,n=ro();for(;;)try{if(parseInt(t(124))/1+-parseInt(t(128))/2+parseInt(t(119))/3*(parseInt(t(127))/4)+parseInt(t(111))/5*(parseInt(t(117))/6)+parseInt(t(112))/7*(-parseInt(t(118))/8)+parseInt(t(120))/9*(-parseInt(t(125))/10)+parseInt(t(114))/11*(parseInt(t(110))/12)==961663)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class gs{static get[wr(113)](){const t=wr;return Ql(Tn[t(121)][t(123)][Qt()[t(126)]],"/")}static get[wr(116)](){const t=wr;return Ql(Tn[t(121)][t(122)][Qt()[t(126)]],"/")}static[E(241)](t,n,r){var s=E;const i=wr,o=i1[s(406)](r??{}),a=Qt(),c=o?n[s(636)]("?")?"&":"?":"";return gs[i(113)]+"/"+t+"/"+a[i(115)]+"/"+n+c+o}}var io=ao;function oo(){var e=E,t=[e(559),e(634),e(630),e(739),e(548),e(503),e(436),e(480),e(404),"1042584XPmVvk",e(172),e(473),e(289),e(745),"json",e(795),"2166WIGGYn",e(438),e(385),e(606),e(629),"173LKkRgC",e(391),e(498),e(282),e(614),e(710),e(247),e(621),e(255),"14XmrYdp",e(182),e(735),e(504),"Bearer ",e(697),e(694),e(474),"abort","defineProperty",e(321),e(680),e(496),e(587),e(309),e(344),e(406),e(248),"status",e(542),e(386),"keys",e(586)];return(oo=function(){return t})()}function ao(e,t){var n=oo();return(ao=function(r,s){return n[r-=115]})(e,t)}(function(){for(var e=E,t=ao,n=oo();;)try{if(-parseInt(t(126))/1*(-parseInt(t(121))/2)+-parseInt(t(160))/3*(-parseInt(t(130))/4)+parseInt(t(140))/5*(-parseInt(t(123))/6)+parseInt(t(135))/7*(parseInt(t(167))/8)+-parseInt(t(158))/9+parseInt(t(159))/10+parseInt(t(157))/11==336922)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),io(146),io(164),io(166);var bs=co;function co(e,t){var n=lo();return(co=function(r,s){return n[r-=291]})(e,t)}(function(){for(var e=E,t=co,n=lo();;)try{if(-parseInt(t(301))/1+parseInt(t(307))/2+-parseInt(t(292))/3*(-parseInt(t(306))/4)+parseInt(t(291))/5+-parseInt(t(314))/6*(-parseInt(t(300))/7)+-parseInt(t(302))/8*(parseInt(t(303))/9)+-parseInt(t(293))/10==616185)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),E(597),bs(294),E(779),bs(305),bs(296),bs(315);function lo(){var e=E,t=[e(208),e(302),"336OqQgfm",e(755),e(494),e(423),e(647),"1179086uaDkqa",e(752),"emit","message",e(756),e(190),e(520),e(148),e(546),e(216),e(779),e(450),"listener",e(319),e(654),e(407),e(212),e(162),e(448),e(440),e(525),e(310)];return(lo=function(){return t})()}function uo(){var e=E;const t=[e(676),e(331),e(362),"2228304EqXFLn",e(512),e(778),e(387),e(721),e(673),"207AHFLGs",e(376),e(425)];return(uo=function(){return t})()}function po(e,t){const n=uo();return(po=function(r,s){return n[r-=254]})(e,t)}(function(){var e=E;const t=po,n=uo();for(;;)try{if(parseInt(t(257))/1+parseInt(t(260))/2+parseInt(t(254))/3*(-parseInt(t(261))/4)+parseInt(t(262))/5+-parseInt(t(258))/6+parseInt(t(256))/7+-parseInt(t(263))/8*(parseInt(t(264))/9)==716064)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();const eu=function(e){var t=E;const n=po,r=document[t(414)]||document[n(259)];if(!r)throw new fs(Je[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=E;const t=fo,n=ho();for(;;)try{if(parseInt(t(128))/1+parseInt(t(125))/2+-parseInt(t(127))/3+parseInt(t(132))/4+-parseInt(t(131))/5+parseInt(t(133))/6+-parseInt(t(134))/7==688465)break;n.push(n[e(189)]())}catch{n[e(795)](n.shift())}})();const ys=function(e,t){const n=fo,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,eu(r)};function fo(e,t){const n=ho();return(fo=function(r,s){return n[r-=125]})(e,t)}function ho(){var e=E;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(ho=function(){return t})()}function mo(){var e=E,t=[e(608),e(186),e(570),e(376),e(652),e(301),"10439181hcqJpc",e(593),e(434),e(441),"createTextNode",e(695),e(250),e(604),"ctr",e(665),e(785),"9136jiXoxV",e(238),e(203),e(324),e(723),e(177),e(278),"insertRule",e(540),"nonce",e(670),"flush",e(767),"forEach","7294661PRwxon",e(774),e(742),e(159),"ownerNode",e(795),e(255),"2555lCYkVH",e(252),e(684),e(481)];return(mo=function(){return t})()}function en(e,t){var n=mo();return(en=function(r,s){return n[r-=379]})(e,t)}(function(){for(var e=E,t=en,n=mo();;)try{if(parseInt(t(413))/1*(-parseInt(t(412))/2)+-parseInt(t(382))/3+-parseInt(t(381))/4*(-parseInt(t(387))/5)+parseInt(t(411))/6+parseInt(t(390))/7*(parseInt(t(408))/8)+parseInt(t(397))/9+-parseInt(t(404))/10*(parseInt(t(380))/11)==960039)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E,t=en;function n(s){var i=Ke,o=en,a=this;this[i(203)]=function(c){var l,u=i,d=en;l=a[d(391)][d(386)]===0?a[d(402)]?a[d(402)][d(409)]:a[d(406)]?a[d(389)][d(396)]:a[d(400)]:a[d(391)][a[d(391)][d(386)]-1][u(238)],a[d(389)][d(414)](c,l),a[d(391)][d(385)](c)},this[o(403)]=s[o(383)]===void 0||s[o(383)],this[o(391)]=[],this.ctr=0,this[o(417)]=s[i(318)],this[o(398)]=s[o(398)],this[o(389)]=s[i(684)],this[o(406)]=s[o(406)],this[o(402)]=s[o(402)],this.before=null}var r=n[e(332)];r[t(407)]=function(s){var i=e;s[t(379)](this[i(203)])},r[e(258)]=function(s){var i,o,a,c=e,l=t;this[l(405)]%(this[l(403)]?65e3:1)==0&&this[l(410)]((i=this,o=en,(a=document[o(416)](c(156)))[o(399)](o(420),i[o(398)]),i[o(417)]!==void 0&&a[c(434)](c(318),i[c(318)]),a[o(394)](document[o(401)]("")),a[o(399)](o(388),""),a));var u=this[c(608)][this[l(391)][l(386)]-1];if(this[l(403)]){var d=(function(p){var h=c,f=en;if(p[f(392)])return p.sheet;for(var m=0;m<document[f(395)][f(386)];m++)if(document[f(395)][m][f(384)]===p)return document[h(652)][m]})(u);try{d[l(415)](s,d[l(418)][l(386)])}catch{}}else u[l(394)](document[c(550)](s));this.ctr++},r[t(419)]=function(){var s=e,i=t;this[i(391)][s(629)]((function(o){var a,c=i;return(a=o.parentNode)==null?void 0:a[c(393)](o)})),this[i(391)]=[],this[s(397)]=0}})();var Qe=go;function go(e,t){var n=bo();return(go=function(r,s){return n[r-=110]})(e,t)}function bo(){var e=E,t=[e(196),"152336OQhHhe",e(420),e(492),e(783),e(770),e(349),e(204),e(598),e(178),e(401),e(650),"4724nuSFUK",e(439),e(736),"@page",e(613),e(619),e(443),"@layer",e(174)];return(bo=function(){return t})()}(function(){for(var e=E,t=go,n=bo();;)try{if(-parseInt(t(119))/1+-parseInt(t(123))/2*(-parseInt(t(124))/3)+-parseInt(t(129))/4*(parseInt(t(122))/5)+-parseInt(t(114))/6+-parseInt(t(115))/7+parseInt(t(112))/8+parseInt(t(117))/9==198272)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),E(648),Qe(121),E(700),E(600),Qe(113),Qe(126),Qe(116),Qe(118),Qe(110),Qe(111),Qe(120),Qe(128),Qe(125),Qe(127),Qe(130);var yo=wo;function wo(e,t){var n=vo();return(wo=function(r,s){return n[r-=258]})(e,t)}function vo(){var e=E,t=[e(347),e(371),e(260),e(288),e(227),e(409),e(255),e(795),e(246),"10opKczI","charCodeAt",e(733),e(377),e(428),e(738),e(281),e(296),e(510),e(381),e(464),"3836294AMJKLE"];return(vo=function(){return t})()}function So(){var e=E,t=[e(327),e(255),e(566),e(334),e(323),"14ejudnZ",e(201),"862542dyuBTR",e(552),"401898SBLqqH",e(184),e(705)];return(So=function(){return t})()}function tu(e,t){var n=So();return(tu=function(r,s){return n[r-=123]})(e,t)}function nu(e,t){var n=_o();return(nu=function(r,s){return n[r-=435]})(e,t)}function _o(){var e=E,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(_o=function(){return t})()}function Co(){var e=E,t=[e(458),"2134996QawHcC","return",e(693),e(558),"15490080Hutsfa",e(496),e(228),e(216),e(346),e(255),"1837002hgOqZq",e(531),e(516),e(484),"join"];return(Co=function(){return t})()}function ru(e,t){var n=Co();return(ru=function(r,s){return n[r-=147]})(e,t)}function su(e,t){var n=Eo();return(su=function(r,s){return n[r-=398]})(e,t)}function Eo(){var e=E,t=[e(551),"input-$1",e(273),e(468),"root",e(749),e(287),e(567),e(772),e(549),e(716),e(346),"global",e(229),e(294),"1314449boGmmT",e(527),"4549375QrRZcY",e(265),"type"];return(Eo=function(){return t})()}function xo(){var e=E,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(xo=function(){return t})()}function iu(e,t){var n=xo();return(iu=function(r,s){return n[r-=484]})(e,t)}function Io(e,t){var n=To();return(Io=function(r,s){return n[r-=236]})(e,t)}function To(){var e=E,t=[e(584),"953666lBllkt",e(564),"48PHUuVy",e(437),e(214),e(627),e(149),e(272),e(307),e(483),e(800),e(370)];return(To=function(){return t})()}(function(){for(var e=E,t=wo,n=vo();;)try{if(-parseInt(t(259))/1*(parseInt(t(278))/2)+-parseInt(t(276))/3*(-parseInt(t(271))/4)+-parseInt(t(274))/5*(-parseInt(t(264))/6)+-parseInt(t(258))/7+-parseInt(t(263))/8+parseInt(t(261))/9*(-parseInt(t(268))/10)+parseInt(t(260))/11==402046)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),Math[yo(275)],String[yo(272)],Object[yo(273)],(function(){for(var e=E,t=tu,n=So();;)try{if(-parseInt(t(132))/1*(parseInt(t(123))/2)+-parseInt(t(125))/3+parseInt(t(129))/4+parseInt(t(134))/5*(parseInt(t(127))/6)+parseInt(t(126))/7*(parseInt(t(133))/8)+-parseInt(t(124))/9*(-parseInt(t(130))/10)+-parseInt(t(128))/11==366270)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=E,t=nu,n=_o();;)try{if(parseInt(t(439))/1+parseInt(t(443))/2*(parseInt(t(442))/3)+parseInt(t(441))/4*(parseInt(t(440))/5)+parseInt(t(438))/6+-parseInt(t(436))/7+parseInt(t(435))/8+-parseInt(t(437))/9==637765)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=E,t=ru,n=Co();;)try{if(-parseInt(t(158))/1+-parseInt(t(150))/2+parseInt(t(149))/3+-parseInt(t(155))/4*(-parseInt(t(151))/5)+-parseInt(t(152))/6+-parseInt(t(161))/7*(-parseInt(t(157))/8)+parseInt(t(159))/9==746841)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=su,n=Eo();;)try{if(parseInt(t(398))/1+-parseInt(t(409))/2*(-parseInt(t(413))/3)+parseInt(t(405))/4+parseInt(t(400))/5+-parseInt(t(403))/6*(-parseInt(t(408))/7)+-parseInt(t(412))/8*(-parseInt(t(416))/9)+-parseInt(t(417))/10==921092)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=E,t=iu,n=xo();;)try{if(parseInt(t(484))/1+-parseInt(t(485))/2*(-parseInt(t(490))/3)+parseInt(t(488))/4+parseInt(t(489))/5+parseInt(t(492))/6+-parseInt(t(486))/7*(parseInt(t(487))/8)+-parseInt(t(491))/9==521840)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=E,t=Io,n=To();;)try{if(parseInt(t(246))/1*(parseInt(t(239))/2)+parseInt(t(248))/3*(-parseInt(t(241))/4)+parseInt(t(244))/5+-parseInt(t(236))/6*(parseInt(t(247))/7)+-parseInt(t(242))/8*(parseInt(t(243))/9)+-parseInt(t(238))/10+parseInt(t(237))/11*(parseInt(t(240))/12)==600322)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})();var l1=Ao;function Ao(e,t){var n=ko();return(Ao=function(r,s){return n[r-=373]})(e,t)}function ko(){var e=E,t=[e(485),e(252),e(684),e(523),"column",e(337),e(515),e(275),e(159),e(366),e(332),e(312),e(197),e(265),e(321),e(601),e(752),e(603),"$2-$3",e(258),e(534),e(376),e(769),e(254),e(392),e(788),e(216),e(521),e(295),e(267),e(255),"preferred-size",e(629),"line",e(181),e(797),e(593),e(330),e(288),"compat",e(595),e(186),e(767),e(384),e(508),e(339),"prepend","push",e(503),e(496),e(472),e(276),'style[data-emotion^="',e(695),e(346),e(213),e(789),e(715),"head",e(567),"448GdQtAv",e(600),e(711),e(262),e(509),e(434),"flex-",e(626),e(318),e(389),e(560),e(468),e(463),e(431),e(781),"indexOf",e(618),e(207),e(640)];return(ko=function(){return t})()}function Ro(){var e=E,t=[e(320),e(388),e(405),e(579),"35AIBzSb",e(534),e(505),e(411),"1274024Vuuviq","length",e(572),e(478)];return(Ro=function(){return t})()}function ou(e,t){var n=Ro();return(ou=function(r,s){return n[r-=484]})(e,t)}function au(e,t){var n=Po();return(au=function(r,s){return n[r-=106]})(e,t)}function Po(){var e=E,t=[e(526),e(340),e(765),e(703),e(487),e(489),e(146),e(639),e(729),e(664)];return(Po=function(){return t})()}(function(){for(var e=E,t=Ao,n=ko();;)try{if(parseInt(t(444))/1+parseInt(t(411))/2*(-parseInt(t(397))/3)+-parseInt(t(442))/4*(-parseInt(t(410))/5)+parseInt(t(416))/6+parseInt(t(394))/7*(-parseInt(t(375))/8)+parseInt(t(409))/9*(parseInt(t(373))/10)+-parseInt(t(377))/11*(parseInt(t(426))/12)==928149)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),l1(387),(function(){for(var e=E,t=ou,n=Ro();;)try{if(-parseInt(t(487))/1+parseInt(t(489))/2+-parseInt(t(495))/3*(parseInt(t(484))/4)+-parseInt(t(492))/5*(parseInt(t(493))/6)+parseInt(t(485))/7*(-parseInt(t(494))/8)+-parseInt(t(488))/9+parseInt(t(491))/10==772143)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=au,n=Po();;)try{if(-parseInt(t(106))/1*(-parseInt(t(114))/2)+parseInt(t(115))/3*(parseInt(t(107))/4)+parseInt(t(112))/5+parseInt(t(110))/6+parseInt(t(108))/7+parseInt(t(109))/8+parseInt(t(113))/9*(-parseInt(t(111))/10)==797311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})();var cu=Lo;function Oo(){var e=E,t=["animationName","2256550Ipcodt",e(173),"compiler transform.",e(746),e(462),e(288),e(801),e(211),e(500),e(255),"number",e(791),"NO_COMPONENT_SELECTOR","1182279EAtwWa",e(682),e(321),"1304688UcogLI",e(247),"string",e(569),"styles","45ISzOCs",e(246),e(777),e(167),e(672)];return(Oo=function(){return t})()}(function(){for(var e=E,t=Lo,n=Oo();;)try{if(-parseInt(t(249))/1+-parseInt(t(242))/2+parseInt(t(250))/3+parseInt(t(258))/4+-parseInt(t(248))/5*(parseInt(t(256))/6)+-parseInt(t(255))/7+parseInt(t(261))/8*(parseInt(t(236))/9)==662021)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();function Lo(e,t){var n=Oo();return(Lo=function(r,s){return n[r-=236]})(e,t)}function lu(e,t){var n=No();return(lu=function(r,s){return n[r-=142]})(e,t)}function No(){var e=E,t=[e(368),e(305),"registered",e(262),"styles",e(255),e(374),e(629),e(633),e(615),e(663),e(753),e(275),e(802),"push",e(593),e(321),e(491),e(258),e(666)];return(No=function(){return t})()}function Mo(){var e=E,t=[e(578),e(321),e(258),e(629),e(255),e(449),e(250),e(333),e(502),"bind",e(573),"281145OZnPDr",e(547),"3uNmnOL",e(159),e(186),e(291),e(275),e(476),e(593),e(365),e(173),e(515),e(753),"6198910frrjDN",e(413),e(300),"animation-",e(195),e(599),"object"];return(Mo=function(){return t})()}function uu(e,t){var n=Mo();return(uu=function(r,s){return n[r-=250]})(e,t)}Object[Io(245)](null),cu(246),E(408),cu(244),(function(){for(var e=E,t=lu,n=No();;)try{if(-parseInt(t(146))/1+-parseInt(t(155))/2+-parseInt(t(144))/3+-parseInt(t(157))/4+parseInt(t(156))/5*(parseInt(t(149))/6)+parseInt(t(153))/7*(parseInt(t(142))/8)+parseInt(t(145))/9==509549)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=uu,n=Mo();;)try{if(parseInt(t(274))/1*(-parseInt(t(253))/2)+-parseInt(t(258))/3*(-parseInt(t(270))/4)+parseInt(t(256))/5*(parseInt(t(273))/6)+parseInt(t(250))/7+-parseInt(t(276))/8*(parseInt(t(261))/9)+parseInt(t(269))/10*(parseInt(t(263))/11)+-parseInt(t(257))/12==769621)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Z=Bo;function Do(){var e=E;const t=[e(191),e(751),"toCamelCase",e(446),e(325),e(210),"toPascalCase",e(284),e(154),e(726),e(288),e(617),e(768),e(343),e(394),"4804168lIEQdb",e(410),e(539),e(430),e(678),e(353),"_lowerCase",e(596),e(733),e(518),"charAt",e(687),e(527),e(262),"42wLrOPC",e(285),"toLowerCase",e(470),e(514)];return(Do=function(){return t})()}function du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(){var e=E;const t=Bo,n=Do();for(;;)try{if(-parseInt(t(224))/1+parseInt(t(230))/2+-parseInt(t(242))/3*(parseInt(t(238))/4)+-parseInt(t(236))/5+-parseInt(t(228))/6*(-parseInt(t(252))/7)+-parseInt(t(240))/8+parseInt(t(227))/9==959733)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();class Fo{static[Z(241)](t,n=!1){const r=Z;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[E(429)](t,n=!1){var r=E;const s=Z;return n?this[s(244)](t)[s(233)](/ /g," "):t[r(429)]()}static[E(741)](t){const n=Z;return this[n(249)](n(241))(t)}static[Z(234)](t){const n=Z;return this[n(249)](n(220))(t)}static[Z(225)](t){var n=E;const r=Z;return this[r(239)](t)[n(527)](((s,i)=>i===0?s[n(429)]():this[r(222)](s[r(220)]())))[r(253)]("")}static[Z(229)](t){var n=E;const r=Z;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[Z(243)](t){const n=Z;return this[n(239)](t)[n(253)]("-")}static[E(761)](t){const n=Z;return this[E(410)](t)[n(253)]("_")}static[Z(245)](t){return this[Z(244)](t).replace(/ /g,".")}static[Z(221)](t){const n=Z;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=Z;return this[n(244)](t)[n(233)](/ /g,"-")}static[Z(237)](t){return this[Z(239)](t)}static[Z(239)](t){const n=Z;return t[n(233)](/([a-z])([A-Z])/g,n(231))[n(233)](/[\s_-]+/g," ")[n(220)]()[n(247)](/[a-zà-öø-ÿ0-9]+/gi)||[]}static[E(538)](t){var n=E;const r=Z;return this[r(239)](t)[n(527)]((s=>s[r(220)]()))[r(253)](" ")}static[Z(222)](t){const n=Z;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=Z;return this[E(410)](t)[n(250)]((r=>this[n(222)](r)))[n(253)](" ")}}function Bo(e,t){const n=Do();return(Bo=function(r,s){return n[r-=220]})(e,t)}du(Fo,E(748),((e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:s=Z(223)}={splitChar:" ",joinChar:" ",to:Z(223)})=>{const i=Z,o=e!==void 0?e[i(226)]():"";return o?t?Fo[i(235)](o):o[i(251)](n).map((a=>{var c=Ke;const l=i;return s===l(232)?a[l(248)](0)[c(571)]()+a[l(246)](1)[c(429)]():a[l(248)](0).toUpperCase()+a[l(246)](1)[l(220)]()}))[i(253)](r):""})),du(Fo,Z(249),(e=>t=>{var n=E;const r=Z;if(!t)return"";const s=t[r(246)](0,1),i=t[r(246)](1);return s[e]!==void 0&&n(672)==typeof s[e]?s[e]()+i:t}));const u1=Uo;function Uo(e,t){const n=$o();return(Uo=function(r,s){return n[r-=328]})(e,t)}function Ke(e,t){var n=Mi();return(Ke=function(r,s){return n[r-=141]})(e,t)}function $o(){var e=E;const t=[e(460),e(638),"pascal",e(620),e(152),e(353),"object",e(796),e(719),e(761),e(536),e(222),e(758),e(356),e(747),e(704),e(527),e(194),e(681),e(561)];return($o=function(){return t})()}(function(){var e=E;const t=Uo,n=$o();for(;;)try{if(parseInt(t(337))/1*(parseInt(t(342))/2)+-parseInt(t(329))/3+parseInt(t(346))/4+parseInt(t(345))/5+-parseInt(t(341))/6+-parseInt(t(333))/7*(-parseInt(t(339))/8)+-parseInt(t(330))/9==892829)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),E(681),u1(332);function Vo(){var e=E;const t=[e(314),e(249),e(764),e(792),"7920680CrCzXO",e(776),"kebab",e(532),e(400),"1889976zPDrSf",e(681),e(165),"574270pCgwUB"];return(Vo=function(){return t})()}function pu(e,t){const n=Vo();return(pu=function(r,s){return n[r-=199]})(e,t)}function fu(e,t){const n=zo();return(fu=function(r,s){return n[r-=310]})(e,t)}function zo(){var e=E;const t=["strategy","5941134AnJjDR",e(435),"REQUIRED",e(403),e(298),e(507),e(277),e(304),e(185),e(217),"168yAApGZ","210166RwrXjV",e(288),"replacer",e(660),e(341),e(431),e(422),e(497),"parameters.search"];return(zo=function(){return t})()}function hu(e,t){const n=Ho();return(hu=function(r,s){return n[r-=245]})(e,t)}function Ho(){var e=E;const t=[e(757),e(288),"749930AnkLQM",e(345),e(475),e(244),e(395),e(316),"77UAdnad",e(161),e(245),e(446),e(286),e(725)];return(Ho=function(){return t})()}function jo(){var e=E;const t=[e(235),e(583),e(580),e(224),e(355),e(787),e(653),e(256),e(612),"90faVQnR",e(486)];return(jo=function(){return t})()}function mu(e,t){const n=jo();return(mu=function(r,s){return n[r-=199]})(e,t)}function Wo(){var e=E;const t=["location",e(728),e(574),"2xpcQKU","push","768628jYCGxS",e(756),"24FLVsmp",e(752),e(293),"978200aOzrna",e(488),"63KlvtSY",e(277),e(553),e(231),e(679),e(336),e(507),e(422),e(527)];return(Wo=function(){return t})()}function gu(e,t){const n=Wo();return(gu=function(r,s){return n[r-=482]})(e,t)}function qo(e,t){const n=Go();return(qo=function(r,s){return n[r-=252]})(e,t)}function Go(){var e=E;const t=[e(759),e(605),e(261),e(585),e(790),e(383),e(637),"104DOhoZO","preconnect",e(215),e(175),"5jiSoDi",e(658)];return(Go=function(){return t})()}(function(){var e=E;const t=pu,n=Vo();for(;;)try{if(parseInt(t(206))/1*(-parseInt(t(208))/2)+-parseInt(t(199))/3*(parseInt(t(210))/4)+parseInt(t(204))/5+-parseInt(t(201))/6+-parseInt(t(200))/7+parseInt(t(209))/8+parseInt(t(205))/9==606311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=E;const t=fu,n=zo();for(;;)try{if(parseInt(t(317))/1*(-parseInt(t(321))/2)+-parseInt(t(314))/3*(parseInt(t(319))/4)+parseInt(t(325))/5*(-parseInt(t(310))/6)+-parseInt(t(313))/7*(-parseInt(t(320))/8)+-parseInt(t(324))/9+parseInt(t(328))/10+parseInt(t(311))/11==808336)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=E;const t=hu,n=Ho();for(;;)try{if(-parseInt(t(252))/1+-parseInt(t(249))/2*(-parseInt(t(257))/3)+parseInt(t(254))/4+-parseInt(t(253))/5*(-parseInt(t(258))/6)+parseInt(t(246))/7+-parseInt(t(245))/8*(parseInt(t(250))/9)+-parseInt(t(256))/10*(parseInt(t(248))/11)==300232)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=mu,n=jo();for(;;)try{if(-parseInt(t(200))/1*(parseInt(t(203))/2)+parseInt(t(209))/3+parseInt(t(202))/4+-parseInt(t(206))/5*(parseInt(t(201))/6)+-parseInt(t(199))/7*(parseInt(t(208))/8)+parseInt(t(207))/9*(parseInt(t(205))/10)+parseInt(t(204))/11==198596)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=gu,n=Wo();for(;;)try{if(parseInt(t(488))/1+-parseInt(t(497))/2*(parseInt(t(496))/3)+-parseInt(t(501))/4*(parseInt(t(487))/5)+-parseInt(t(482))/6+parseInt(t(499))/7+-parseInt(t(495))/8+-parseInt(t(485))/9*(-parseInt(t(483))/10)==155517)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(function(){var e=E;const t=qo,n=Go();for(;;)try{if(parseInt(t(254))/1+parseInt(t(257))/2+parseInt(t(260))/3+-parseInt(t(252))/4*(-parseInt(t(253))/5)+-parseInt(t(258))/6+parseInt(t(256))/7+parseInt(t(262))/8*(-parseInt(t(261))/9)==402722)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=Ko,n=Yo();for(;;)try{if(parseInt(t(397))/1*(-parseInt(t(389))/2)+-parseInt(t(394))/3*(parseInt(t(383))/4)+parseInt(t(391))/5+-parseInt(t(384))/6*(-parseInt(t(388))/7)+parseInt(t(382))/8*(-parseInt(t(393))/9)+parseInt(t(386))/10+parseInt(t(392))/11==453357)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();function Ko(e,t){const n=Yo();return(Ko=function(r,s){return n[r-=382]})(e,t)}function Yo(){var e=E;const t=[e(581),e(589),e(702),e(759),"api","9885ktAjwX","515144gJwABd",e(461),e(352),e(455),e(709),"environment",e(782),e(360),e(790),e(609)];return(Yo=function(){return t})()}function Zo(e,t){const n=Jo();return(Zo=function(r,s){return n[r-=188]})(e,t)}function Jo(){var e=E;const t=[e(513),e(744),e(230),e(151),e(354),e(170),e(638),"42ZfbLkm",e(529),e(527),"length",e(656),e(793),e(328),e(479),e(737),"84AZtHRP"];return(Jo=function(){return t})()}(function(){var e=E;const t=Zo,n=Jo();for(;;)try{if(parseInt(t(200))/1*(-parseInt(t(191))/2)+parseInt(t(195))/3*(-parseInt(t(193))/4)+-parseInt(t(196))/5*(parseInt(t(192))/6)+-parseInt(t(188))/7+-parseInt(t(203))/8+-parseInt(t(190))/9*(parseInt(t(189))/10)+parseInt(t(202))/11*(parseInt(t(204))/12)==863321)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const ws=Xo;function Xo(e,t){const n=Qo();return(Xo=function(r,s){return n[r-=135]})(e,t)}(function(){var e=E;const t=Xo,n=Qo();for(;;)try{if(-parseInt(t(139))/1*(parseInt(t(147))/2)+-parseInt(t(142))/3+-parseInt(t(140))/4+-parseInt(t(143))/5*(-parseInt(t(148))/6)+parseInt(t(137))/7*(parseInt(t(141))/8)+-parseInt(t(138))/9+-parseInt(t(136))/10*(-parseInt(t(145))/11)==902131)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const d1={environment:e=>typeof e===ws(146)&&/^(sandbox|production)$/[E(690)](e),version:e=>e===ws(144)||typeof e===ws(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[ws(135)](e)},p1=e=>{var t;((n,r)=>{var s=E;const i=Zo;if(n&&r){const o=Object[s(359)](n)[s(422)]((a=>!r[i(194)](a)||r[a]===void 0||!n[a](r[a])))[i(197)]((a=>new fs(Je[i(201)],a,!0)));if(o[i(198)]){const[a]=o;throw a}}})(d1,e),(t=e)&&(eo=Object.assign({},eo,t))};function Qo(){var e=E;const t=[e(591),e(576),e(611),"4202RbmDMY",e(445),e(727),e(517),e(690),e(624),e(292),e(717),e(299),"1611912xHkDlR",e(452)];return(Qo=function(){return t})()}function ea(){var e=E;const t=[e(379),e(380),e(686),e(522),"248VddyCN","1828569LfJoFC","11940faSemP",e(661),e(482),"9YYlhsV",e(457),e(651),e(375),e(255),e(641),e(160)];return(ea=function(){return t})()}(function(){var e=E;const t=ta,n=ea();for(;;)try{if(-parseInt(t(271))/1*(-parseInt(t(278))/2)+-parseInt(t(275))/3+-parseInt(t(274))/4*(-parseInt(t(266))/5)+-parseInt(t(280))/6*(-parseInt(t(272))/7)+parseInt(t(277))/8*(-parseInt(t(279))/9)+parseInt(t(269))/10*(-parseInt(t(270))/11)+-parseInt(t(276))/12*(-parseInt(t(268))/13)==356241)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();function ta(e,t){const n=ea();return(ta=function(r,s){return n[r-=266]})(e,t)}function na(){var e=E;const t=[e(422),e(530),e(338),e(202),"push",e(183),e(740),e(763),"137247nsOmnY",e(544),e(554),e(628),e(297),e(555)];return(na=function(){return t})()}function bu(e,t){const n=na();return(bu=function(r,s){return n[r-=169]})(e,t)}function yu(e,t){var n=ra();return(yu=function(r,s){return n[r-=337]})(e,t)}function ra(){var e=E,t=[e(466),e(762),e(255),e(548),e(391),e(557),e(277),e(706),"2051dwZdDh",e(199),e(503),e(342),e(422),"182295YeOYne",e(382),e(575),e(520),e(629),"apply","40247440IrIkgT",e(672),"push","getOwnPropertyDescriptors","indexOf",e(326),e(359)];return(ra=function(){return t})()}function sa(){var e=E,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return(sa=function(){return t})()}function wu(e,t){var n=sa();return(wu=function(r,s){return n[r-=171]})(e,t)}function ia(){var e=["INVALID","UNHANDLED","HTTP","UNAUTHORIZED","13163230kGdpsc","856juyAkB","TIMEOUT","350256uPlzjN","5054ruXNQI","2450577zCNjjI","2339148NeQscF","REQUEST_TIMEOUT","REQUIRED","BAD_REQUEST","60389xcocgx","11tPlygx","NOT_FOUND","301vJXIvb","UNABLE_TO_FIND","NOT_LOADED","6497910YprBBF","40ngIbUX","UNDEFINED"];return(ia=function(){return e})()}var vs,Bt,et,vu,Ye,Ut,Su,_u,Ss,Cu,oa,_s;function Cs(e,t){var n=ia();return(Cs=function(r,s){return n[r-=335]})(e,t)}function aa(e,t){var n=ca();return(aa=function(r,s){return n[r-=341]})(e,t)}function ca(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(ca=function(){return e})()}function la(e,t){var n=ua();return(la=function(r,s){return n[r-=235]})(e,t)}function ua(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(ua=function(){return e})()}function da(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(da=function(){return e})()}function Eu(e,t){var n=da();return(Eu=function(r,s){return n[r-=366]})(e,t)}function Es(e,t){const n=pa();return(Es=function(r,s){return n[r-=152]})(e,t)}(function(){var e=E;const t=bu,n=na();for(;;)try{if(-parseInt(t(172))/1*(-parseInt(t(174))/2)+parseInt(t(179))/3+parseInt(t(177))/4*(-parseInt(t(173))/5)+-parseInt(t(182))/6*(-parseInt(t(181))/7)+parseInt(t(169))/8+-parseInt(t(170))/9+parseInt(t(178))/10*(-parseInt(t(180))/11)==757080)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=yu,n=ra();;)try{if(parseInt(t(355))/1+parseInt(t(342))/2*(parseInt(t(357))/3)+parseInt(t(338))/4+-parseInt(t(362))/5+parseInt(t(340))/6*(parseInt(t(339))/7)+parseInt(t(358))/8*(parseInt(t(344))/9)+-parseInt(t(350))/10==959569)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=wu,n=sa();;)try{if(-parseInt(t(172))/1+-parseInt(t(175))/2*(-parseInt(t(173))/3)+parseInt(t(174))/4+-parseInt(t(177))/5+-parseInt(t(171))/6*(-parseInt(t(180))/7)+-parseInt(t(178))/8*(parseInt(t(179))/9)+parseInt(t(176))/10==940869)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=Cs,t=ia();;)try{if(parseInt(e(336))/1*(-parseInt(e(350))/2)+-parseInt(e(351))/3+parseInt(e(352))/4+parseInt(e(340))/5*(parseInt(e(349))/6)+parseInt(e(356))/7*(-parseInt(e(347))/8)+parseInt(e(339))/9+-parseInt(e(346))/10*(-parseInt(e(357))/11)===589533)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(Bt=vs||(vs={}))[(et=Cs)(354)]="REQUIRED",Bt[et(341)]=et(341),Bt[et(337)]="UNABLE_TO_FIND",Bt.NOT_LOADED=et(338),Bt[et(342)]=et(342),Bt.HTTP=et(344),Bt[et(348)]=et(348),Bt[et(343)]=et(343),Ye=vu||(vu={}),Ut=Cs,Ye[Ye.OK=200]="OK",Ye[Ye[Ut(355)]=400]=Ut(355),Ye[Ye[Ut(335)]=404]=Ut(335),Ye[Ye.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",Ye[Ye[Ut(353)]=408]=Ut(353),Ye[Ye.UNAUTHORIZED=401]=Ut(345),(function(){for(var e=aa,t=ca();;)try{if(parseInt(e(345))/1+-parseInt(e(344))/2+-parseInt(e(351))/3+parseInt(e(347))/4+-parseInt(e(350))/5*(-parseInt(e(346))/6)+parseInt(e(343))/7+parseInt(e(348))/8===704730)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(_u=Su||(Su={}))[(Ss=aa)(349)]=Ss(342),_u[Ss(352)]=Ss(341),(function(){for(var e=la,t=ua();;)try{if(-parseInt(e(236))/1+-parseInt(e(248))/2+parseInt(e(243))/3*(parseInt(e(245))/4)+parseInt(e(242))/5*(-parseInt(e(239))/6)+parseInt(e(237))/7*(-parseInt(e(244))/8)+parseInt(e(246))/9+-parseInt(e(238))/10*(-parseInt(e(241))/11)===902110)break;t.push(t.shift())}catch{t.push(t.shift())}})(),oa=Cu||(Cu={}),_s=la,oa.PRODUCTION=_s(240),oa[_s(235)]=_s(247),(function(){for(var e=Eu,t=da();;)try{if(-parseInt(e(368))/1*(-parseInt(e(376))/2)+-parseInt(e(371))/3*(parseInt(e(367))/4)+parseInt(e(374))/5*(parseInt(e(373))/6)+parseInt(e(370))/7*(parseInt(e(372))/8)+-parseInt(e(366))/9+-parseInt(e(377))/10*(-parseInt(e(378))/11)+-parseInt(e(369))/12*(parseInt(e(375))/13)===152250)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(function(){const e=Es,t=pa();for(;;)try{if(-parseInt(e(166))/1*(parseInt(e(155))/2)+parseInt(e(157))/3+parseInt(e(164))/4+-parseInt(e(159))/5+parseInt(e(158))/6*(parseInt(e(168))/7)+parseInt(e(165))/8*(-parseInt(e(152))/9)+parseInt(e(154))/10===424938)break;t.push(t.shift())}catch{t.push(t.shift())}})();const f1=()=>new Promise(((e,t)=>{const n=Es;if(((r=gs[E(172)])=>{const s=ta;try{return document.querySelectorAll(s(273)+r+s(281))[s(267)]>0}catch{return!1}})()&&window[n(153)])e(window[n(153)]);else if(!window[n(153)]){const r=(()=>{const s=Es,i=document.createElement(s(161));return i.src=gs.getFullCdn(s(156),s(163)),eu(i),i})();return r.onload=()=>{const s=n;window[s(153)]?e(window.APTokenizer):t(new fs(vs[s(167)],s(160),!0))},void(r[n(162)]=()=>t(new fs(vs[n(169)],"SCRIPT",!0)))}}));function pa(){const e=["31456JYMHzf","928wCafiN","156wRIJHE","UNDEFINED","2317DECIua","NOT_LOADED","62802oYTinX","APTokenizer","20534150rAmYXS","8482vGJDwh","tokenizer-sdk","793641JyeeYi","2676hrMTeo","2887350YWJLUu","Astropay Web Tokenizer","script","onerror","astropay-tokenizer.min.js"];return(pa=function(){return e})()}var fa=Tt;function xu(e,t,n,r,s,i,o){var a=Tt;try{var c=e[i](o),l=c[a(293)]}catch(u){return void n(u)}c[a(304)]?t(l):Promise.resolve(l)[a(303)](r,s)}(function(){for(var e=Tt,t=ha();;)try{if(-parseInt(e(297))/1+-parseInt(e(301))/2*(parseInt(e(302))/3)+parseInt(e(292))/4+parseInt(e(305))/5+-parseInt(e(300))/6+parseInt(e(295))/7*(parseInt(e(294))/8)+parseInt(e(306))/9*(parseInt(e(298))/10)===667472)break;t.push(t.shift())}catch{t.push(t.shift())}})(),Promise[fa(308)]()[fa(303)]((()=>{var e=fa;typeof window!==e(299)&&!window[e(291)]&&((()=>{const t=Ko;ys(t(385),Tn[t(395)][t(390)][Qt()[t(387)]]),ys(t(385),Tn[t(395)][t(396)][Qt()[t(387)]])})(),(()=>{var t=E;const n=qo;ys(n(263),Tn[n(255)][n(259)][Qt()[n(264)]]),ys(n(263),Tn[n(255)][t(363)][Qt()[n(264)]])})())}));const h1=(Iu=function*(e){p1(e);const t={initRevealer:(n=e)=>{var r,s=Tt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(307)](n)},initCollector:(n=e)=>{var r,s=Tt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(289)](n)}};return new Promise(((n,r)=>{var s=Tt;typeof window!==s(299)?window[s(291)]?n(t):f1()[s(303)]((()=>{n(t)}))[s(296)]((i=>{r(i)})):r(s(290))}))},Tu=function(){var e=this,t=arguments;return new Promise((function(n,r){var s=Iu[Tt(309)](e,t);function i(a){xu(s,n,r,i,o,"next",a)}function o(a){xu(s,n,r,i,o,"throw",a)}i(void 0)}))},function(e){return Tu[Tt(309)](this,arguments)});var Iu,Tu;function Tt(e,t){var n=ha();return(Tt=function(r,s){return n[r-=289]})(e,t)}function ha(){var e=["APTokenizer","4582976tSGCgi","value","373232tEwSlg","63KVvFap","catch","1156122MmdZsQ","142260eHWUOj","undefined","7303908VsgDsd","6URBYWa","276963Gnzkoo","then","done","3355345JCZnlM","684orEnOE","initRevealer","resolve","apply","initCollector","new SDKError(ErrorType.UNDEFINED, 'window', true)"];return(ha=function(){return e})()}const xs={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},At=console,An={};Object.keys(xs).forEach(e=>{An[e]=At[e]});const vr="Datadog Browser SDK:",W={debug:An.debug.bind(At,vr),log:An.log.bind(At,vr),info:An.info.bind(At,vr),warn:An.warn.bind(At,vr),error:An.error.bind(At,vr)},Is="https://docs.datadoghq.com",m1=`${Is}/real_user_monitoring/browser/troubleshooting`,ma="More details:";function Au(e,t){return(...n)=>{try{return e(...n)}catch(r){W.error(t,r)}}}function $t(e){return e!==0&&Math.random()*100<=e}function Ts(e,t){return+e.toFixed(t)}function g1(e){return Sr(e)&&e>=0&&e<=100}function Sr(e){return typeof e=="number"}const ke=1e3,Be=60*ke,ku=60*Be,Ru=365*(24*ku);function As(e){return{relative:e,timeStamp:y1(e)}}function b1(e){return{relative:ga(e),timeStamp:e}}function y1(e){const t=tt()-performance.now();return t>_r()?Math.round(kn(t,e)):v1(e)}function w1(){return Math.round(tt()-kn(_r(),performance.now()))}function B(e){return Sr(e)?Ts(e*1e6,0):e}function tt(){return new Date().getTime()}function ye(){return tt()}function nt(){return performance.now()}function Ne(){return{relative:nt(),timeStamp:ye()}}function Pu(){return{relative:0,timeStamp:_r()}}function Ce(e,t){return t-e}function kn(e,t){return e+t}function ga(e){return e-_r()}function v1(e){return Math.round(kn(_r(),e))}function S1(e){return e<Ru}let ba;function _r(){return ba===void 0&&(ba=performance.timing.navigationStart),ba}const Cr=1024,Ou=1024*Cr,_1=/[^\u0000-\u007F]/;function Lu(e){return _1.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function C1(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Er(e){return{...e}}function ks(e,t){return Object.keys(e).some(n=>e[n]===t)}function tn(e){return Object.keys(e).length===0}function E1(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function bt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function Vt(e,t){const n=bt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let ya,Nu=!1;function x1(e){ya=e}function I1(e){Nu=e}function $(e){return function(){return nn(e,this,arguments)}}function nn(e,t,n){try{return e.apply(t,n)}catch(r){kt(r)}}function kt(e){if(wa(e),ya)try{ya(e)}catch(t){wa(t)}}function wa(...e){Nu&&W.error("[MONITOR]",...e)}function we(e,t){return Vt(bt(),"setTimeout")($(e),t)}function Ue(e){Vt(bt(),"clearTimeout")(e)}function Rn(e,t){return Vt(bt(),"setInterval")($(e),t)}function Rs(e){Vt(bt(),"clearInterval")(e)}class Q{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(t){this.observers.forEach(n=>n(t))}}function Mu(...e){return new Q(t=>{const n=e.map(r=>r.subscribe(s=>t.notify(s)));return()=>n.forEach(r=>r.unsubscribe())})}function zt(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,s=n&&n.trailing!==void 0?n.trailing:!0;let i=!1,o,a;return{throttled:(...c)=>{if(i){o=c;return}r?e(...c):o=c,i=!0,a=we(()=>{s&&o&&e(...o),i=!1,o=void 0},t)},cancel:()=>{Ue(a),i=!1,o=void 0}}}function q(){}function Ee(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,Ee)}const Ps=/([\w-]+)\s*=\s*([^;]+)/g;function xr(e,t){for(Ps.lastIndex=0;;){const n=Ps.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function T1(e){const t=new Map;for(Ps.lastIndex=0;;){const n=Ps.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Du(e,t,n=""){const r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function A1(){return Fu()===0}function k1(){return Fu()===1}let Os;function Fu(){return Os??(Os=R1())}function R1(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Ir(e,t,n=0,r){const s=new Date;s.setTime(s.getTime()+n);const i=`expires=${s.toUTCString()}`,o=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",l=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${o}${a}${c}${l}`}function va(e){return xr(document.cookie,e)}let Sa;function Ht(e){return Sa||(Sa=T1(document.cookie)),Sa.get(e)}function Bu(e,t){Ir(e,"",0,t)}function P1(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${Ee()}`,n="test";Ir(t,n,Be,e);const r=va(t)===n;return Bu(t,e),r}catch(t){return W.error(t),!1}}let _a;function O1(){if(_a===void 0){const e=`dd_site_test_${Ee()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!va(e);)r=`${n.pop()}.${r}`,Ir(e,t,ke,{domain:r});Bu(e,{domain:r}),_a=r}return _a}const Pn="_dd_s";function L1(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function Uu(e){return Object.values(e)}function Ca(e){return Object.entries(e)}const rn=4*ku,$u=15*Be,N1=Ru,Tr={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Vu=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ea="&";function M1(e){return!!e&&(e.indexOf(Ea)!==-1||Vu.test(e))}const D1="1";function sn(e,t){const n={isExpired:D1};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=Ee()),n}function Ls(e){return tn(e)}function zu(e){return!Ls(e)}function Ns(e){return e.isExpired!==void 0||!F1(e)}function F1(e){return(e.created===void 0||tt()-Number(e.created)<rn)&&(e.expire===void 0||tt()<Number(e.expire))}function Hu(e){e.expire=String(tt()+$u)}function xa(e){return Ca(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Ea)}function ju(e){const t={};return M1(e)&&e.split(Ea).forEach(n=>{const r=Vu.exec(n);if(r!==null){const[,s,i]=r;s==="aid"?t.anonymousId=i:t[s]=i}}),t}const B1="_dd",U1="_dd_r",$1="_dd_l",V1="rum",z1="logs";function H1(e){if(!Ht(Pn)){const n=Ht(B1),r=Ht(U1),s=Ht($1),i={};n&&(i.id=n),s&&/^[01]$/.test(s)&&(i[z1]=s),r&&/^[012]$/.test(r)&&(i[V1]=r),zu(i)&&(Hu(i),e.persistSession(i))}}function Wu(e){const t=K1(e);return P1(t)?{type:Tr.COOKIE,cookieOptions:t}:void 0}function j1(e,t){const n={isLockEnabled:A1(),persistSession:W1(t),retrieveSession:G1,expireSession:r=>q1(t,r,e)};return H1(n),n}function W1(e){return t=>{Ir(Pn,xa(t),$u,e)}}function q1(e,t,n){const r=sn(t,n);Ir(Pn,xa(r),n.trackAnonymousUser?N1:rn,e)}function G1(){const e=va(Pn);return ju(e)}function K1(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=O1()),t}const Y1="_dd_test_";function qu(){try{const e=Ee(),t=`${Y1}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Tr.LOCAL_STORAGE}:void 0}catch{return}}function Z1(e){return{isLockEnabled:!1,persistSession:Gu,retrieveSession:J1,expireSession:t=>X1(t,e)}}function Gu(e){localStorage.setItem(Pn,xa(e))}function J1(){const e=localStorage.getItem(Pn);return ju(e)}function X1(e,t){Gu(sn(e,t))}const Q1=10,e0=100,Ku=[];let Ms;function on(e,t,n=0){var r;const{isLockEnabled:s,persistSession:i,expireSession:o}=t,a=p=>i({...p,lock:l}),c=()=>{const p=t.retrieveSession(),h=p.lock;return p.lock&&delete p.lock,{session:p,lock:h}};if(Ms||(Ms=e),e!==Ms){Ku.push(e);return}if(s&&n>=e0){Yu(t);return}let l,u=c();if(s){if(u.lock){Ds(e,t,n);return}if(l=Ee(),a(u.session),u=c(),u.lock!==l){Ds(e,t,n);return}}let d=e.process(u.session);if(s&&(u=c(),u.lock!==l)){Ds(e,t,n);return}if(d&&(Ns(d)?o(d):(Hu(d),s?a(d):i(d))),s&&!(d&&Ns(d))){if(u=c(),u.lock!==l){Ds(e,t,n);return}i(u.session),d=u.session}(r=e.after)===null||r===void 0||r.call(e,d||u.session),Yu(t)}function Ds(e,t,n){we(()=>{on(e,t,n+1)},Q1)}function Yu(e){Ms=void 0;const t=Ku.shift();t&&on(t,e)}const Zu=ke;function t0(e){switch(e.sessionPersistence){case Tr.COOKIE:return Wu(e);case Tr.LOCAL_STORAGE:return qu();case void 0:{let t=Wu(e);return!t&&e.allowFallbackToLocalStorage&&(t=qu()),t}default:W.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function n0(e,t,n,r){const s=new Q,i=new Q,o=new Q,a=e.type===Tr.COOKIE?j1(t,e.cookieOptions):Z1(t),{expireSession:c}=a,l=Rn(f,Zu);let u;g();const{throttled:d,cancel:p}=zt(()=>{on({process:b=>{if(Ls(b))return;const P=m(b);return _(P),P},after:b=>{zu(b)&&!x()&&N(b),u=b}},a)},Zu);function h(){on({process:b=>x()?m(b):void 0},a)}function f(){on({process:b=>Ns(b)?sn(b,t):void 0,after:m},a)}function m(b){return Ns(b)&&(b=sn(b,t)),x()&&(w(b)?C():(o.notify({previousState:u,newState:b}),u=b)),b}function g(){on({process:b=>{if(Ls(b))return sn(b,t)},after:b=>{u=b}},a)}function _(b){if(Ls(b))return!1;const{trackingType:P,isTracked:T}=r(b[n]);b[n]=P,delete b.isExpired,T&&!b.id&&(b.id=Ee(),b.created=String(tt()))}function x(){return u[n]!==void 0}function w(b){return u.id!==b.id||u[n]!==b[n]}function C(){u=sn(u,t),i.notify()}function N(b){u=b,s.notify()}function A(b){on({process:P=>({...P,...b}),after:m},a)}return{expandOrRenewSession:d,expandSession:h,getSession:()=>u,renewObservable:s,expireObservable:i,sessionStateUpdateObservable:o,restartSession:g,expire:()=>{p(),c(u),m(sn(u,t))},stop:()=>{Rs(l)},updateSessionState:A}}const Ia={GRANTED:"granted",NOT_GRANTED:"not-granted"};function r0(e){const t=new Q;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Ia.GRANTED},observable:t}}function On(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Ln(Object.prototype),s=Ln(Array.prototype),i=Ln(Object.getPrototypeOf(e)),o=Ln(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),s(),i(),o()}}function Ln(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):q}function Ta(e){return Fs(e,location.href).href}function s0(e){try{return!!Fs(e)}catch{return!1}}function i0(e){const t=Fs(e).pathname;return t[0]==="/"?t:`/${t}`}function Fs(e,t){const n=o0();if(n)try{return t!==void 0?new n(e,t):new n(e)}catch(i){throw new Error(`Failed to construct URL: ${String(i)} ${On({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw new Error(`Invalid URL: '${e}'`);let r=document;const s=r.createElement("a");if(t!==void 0){r=document.implementation.createHTMLDocument("");const i=r.createElement("base");i.href=t,r.head.appendChild(i),r.body.appendChild(s)}return s.href=e,s}const Ju=URL;let Bs;function o0(){if(Bs===void 0)try{Bs=new Ju("http://test/path").href==="http://test/path"}catch{Bs=!1}return Bs?Ju:void 0}const Xu="datad0g.com",a0="dd0g-gov.com",an="datadoghq.com",c0="datadoghq.eu",l0="ddog-gov.com",u0="pci.browser-intake-datadoghq.com",d0=["ddsource","ddtags"];function Nn(e,t,n){const r=p0(e,t);return{build(s,i){const o=f0(e,t,n,s,i);return r(o)},tags:n,urlPrefix:r(""),trackType:t}}function p0(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const i=Ta(r);return o=>`${i}?ddforward=${encodeURIComponent(`${n}?${o}`)}`}if(typeof r=="function")return i=>r({path:n,parameters:i});const s=Qu(t,e);return i=>`https://${s}${n}?${i}`}function Qu(e,t){const{site:n=an,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===an)return u0;if(r&&n===an)return`${r}.${an}`;if(n===a0)return`http-intake.logs.${n}`;const s=n.split("."),i=s.pop();return`browser-intake-${s.join("-")}.${i}`}function f0({clientToken:e,internalAnalyticsSubdomain:t},n,r,s,{retry:i,encoding:o}){const a=["sdk_version:6.6.3",`api:${s}`].concat(r);i&&a.push(`retry_count:${i.count}`,`retry_after:${i.lastFailureStatus}`);const c=["ddsource=browser",`ddtags=${encodeURIComponent(a.join(","))}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${Ee()}`];return o&&c.push(`dd-evp-encoding=${o}`),n==="rum"&&c.push(`batch_time=${ye()}`),t&&c.reverse(),c.join("&")}const h0=200;function m0(e){const{env:t,service:n,version:r,datacenter:s}=e,i=[];return t&&i.push(Us("env",t)),n&&i.push(Us("service",n)),r&&i.push(Us("version",r)),s&&i.push(Us("datacenter",s)),i}function Us(e,t){const n=h0-e.length-1;(t.length>n||g0(t))&&W.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${ma} ${Is}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function g0(e){return b0()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function b0(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function y0(e){const t=e.site||an,n=m0(e),r=w0(e,n);return{replica:v0(e,n),site:t,...r}}function w0(e,t){return{logsEndpointBuilder:Nn(e,"logs",t),rumEndpointBuilder:Nn(e,"rum",t),profilingEndpointBuilder:Nn(e,"profile",t),sessionReplayEndpointBuilder:Nn(e,"replay",t)}}function v0(e,t){if(!e.replica)return;const n={...e,site:an,clientToken:e.replica.clientToken},r={logsEndpointBuilder:Nn(n,"logs",t),rumEndpointBuilder:Nn(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function S0(e){return d0.every(t=>e.includes(t))}const Ar={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Aa={ALL:"all",SAMPLED:"sampled"};function ka(e,t){return e!=null&&typeof e!="string"?(W.error(`${t} must be defined as a string`),!1):!0}function _0(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(W.error(`Site should be a valid Datadog site. ${ma} ${Is}/getting_started/site/.`),!1):!0}function Mn(e,t){return e!==void 0&&!g1(e)?(W.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function C0(e){var t,n,r,s,i,o;if(!e||!e.clientToken){W.error("Client Token is not configured, we will not send any data.");return}if(!(!_0(e.site)||!Mn(e.sessionSampleRate,"Session")||!Mn(e.telemetrySampleRate,"Telemetry")||!Mn(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!Mn(e.telemetryUsageSampleRate,"Telemetry Usage")||!ka(e.version,"Version")||!ka(e.env,"Env")||!ka(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ks(Ia,e.trackingConsent)){W.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Au(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:t0(e),sessionSampleRate:(t=e.sessionSampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(r=e.telemetryConfigurationSampleRate)!==null&&r!==void 0?r:5,telemetryUsageSampleRate:(s=e.telemetryUsageSampleRate)!==null&&s!==void 0?s:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(i=e.trackingConsent)!==null&&i!==void 0?i:Ia.GRANTED,trackAnonymousUser:(o=e.trackAnonymousUser)!==null&&o!==void 0?o:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Cr,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ke,batchMessagesLimit:50,messageBytesLimit:256*Cr,...y0(e)}}}function E0(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent}}var cn;(function(e){e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",e.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",e.PROFILING="profiling"})(cn||(cn={}));const Ra=new Set;function x0(e){Array.isArray(e)&&I0(e.filter(t=>ks(cn,t)))}function I0(e){e.forEach(t=>{Ra.add(t)})}function $s(e){return Ra.has(e)}function T0(){return Ra}const kr="?";function jt(e){const t=[];let n=Pa(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
541
|
-
|
|
542
|
-
at ${r}${s} @ ${n.url}${i}${o}`}),t}function td(e){return`${e.name||"Error"}: ${e.message}`}function $e(e,t,n,{computeHandlingStack:r}={}){let s=e[t];if(typeof s!="function")if(t in e&&t.startsWith("on"))s=q;else return{stop:q};let i=!1;const o=function(){if(i)return s.apply(this,arguments);const a=Array.from(arguments);let c;nn(n,null,[{target:this,parameters:a,onPostCall:u=>{c=u},handlingStack:r?Vs("instrumented method"):void 0}]);const l=s.apply(this,a);return c&&nn(c,null,[l]),l};return e[t]=o,{stop:()=>{i=!0,e[t]===o&&(e[t]=s)}}}function Rr(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:q};const s=q;let i=(a,c)=>{we(()=>{i!==s&&n(a,c)},0)};const o=function(a){r.set.call(this,a),i(this,a)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===o&&Object.defineProperty(e,t,r),i=s}}}const V0=220*Cr,z0="$",H0=3;function de(e,t=V0){const n=Ln(Object.prototype),r=Ln(Array.prototype),s=[],i=new WeakMap,o=Oa(e,z0,void 0,s,i),a=JSON.stringify(o);let c=a?a.length:0;if(c>t){Na(t,"discarded",e);return}for(;s.length>0&&c<t;){const l=s.shift();let u=0;if(Array.isArray(l.source))for(let d=0;d<l.source.length;d++){const p=Oa(l.source[d],l.path,d,s,i);if(p!==void 0?c+=JSON.stringify(p).length:c+=4,c+=u,u=1,c>t){Na(t,"truncated",e);break}l.target[d]=p}else for(const d in l.source)if(Object.prototype.hasOwnProperty.call(l.source,d)){const p=Oa(l.source[d],l.path,d,s,i);if(p!==void 0&&(c+=JSON.stringify(p).length+u+d.length+H0,u=1),c>t){Na(t,"truncated",e);break}l.target[d]=p}}return n(),r(),o}function Oa(e,t,n,r,s){const i=q0(e);if(!i||typeof i!="object")return j0(i);const o=La(i);if(o!=="[Object]"&&o!=="[Array]"&&o!=="[Error]")return o;const a=e;if(s.has(a))return`[Reference seen at ${s.get(a)}]`;const c=n!==void 0?`${t}.${n}`:t,l=Array.isArray(i)?[]:{};return s.set(a,c),r.push({source:i,target:l,path:c}),l}function j0(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function La(e){try{if(e instanceof Event)return W0(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function W0(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?La(e.currentTarget):null,target:e.target?La(e.target):null}}function q0(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function Na(e,t,n){W.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const nd="No stack, consider using an instance of Error";function rd({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:i,source:o,handling:a}){const c=Wt(t),l=G0(e,c,i,t),u=K0(c,e)?Fn(e):nd,d=c?od(t,o):void 0,p=e?e.name:void 0,h=sd(t),f=id(t);return{startClocks:s,source:o,handling:a,handlingStack:n,componentStack:r,originalError:t,type:p,message:l,stack:u,causes:d,fingerprint:h,context:f}}function G0(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${On(de(r))}`}function K0(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function sd(e){return Wt(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function id(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function Wt(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function od(e,t){let n=e;const r=[];for(;Wt(n==null?void 0:n.cause)&&r.length<10;){const s=jt(n.cause);r.push({message:n.cause.message,source:t,type:s==null?void 0:s.name,stack:s&&Fn(s)}),n=n.cause}return r.length?r:void 0}const Bn={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Y0(e){const t=(s,i)=>{const o=rd({stackTrace:s,originalError:i,startClocks:Ne(),nonErrorPrefix:"Uncaught",source:Bn.SOURCE,handling:"unhandled"});e.notify(o)},{stop:n}=Z0(t),{stop:r}=J0(t);return{stop:()=>{n(),r()}}}function Z0(e){return $e(window,"onerror",({parameters:[t,n,r,s,i]})=>{let o;Wt(i)?o=jt(i):o=B0(t,n,r,s),e(o,i??t)})}function J0(e){return $e(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=jt(n);e(r,n)})}function X0(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return I1},enumerable:!1}),t}function Q0(e,t,n){const r=e[t];r&&!r.q&&r.version&&W.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(s=>Au(s,"onReady callback threw an error:")())}function ad(e,t){t.silentMultipleInit||W.error(`${e} is already initialized.`)}function oe(e,t,n,r,s){return Ve(e,t,[n],r,s)}function Ve(e,t,n,r,{once:s,capture:i,passive:o}={}){const a=$(p=>{!p.isTrusted&&!p.__ddIsTrusted&&!e.allowUntrustedEvents||(s&&d(),r(p))}),c=o?{capture:i,passive:o}:i,l=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,u=Vt(l,"addEventListener");n.forEach(p=>u.call(t,p,a,c));function d(){const p=Vt(l,"removeEventListener");n.forEach(h=>p.call(t,h,a,c))}return{stop:d}}const Pr={intervention:"intervention",cspViolation:"csp_violation"};function eb(e,t){const n=[];t.includes(Pr.cspViolation)&&n.push(nb(e));const r=t.filter(s=>s!==Pr.cspViolation);return r.length&&n.push(tb(r)),Mu(...n)}function tb(e){return new Q(t=>{if(!window.ReportingObserver)return;const n=$((s,i)=>s.forEach(o=>t.notify(rb(o)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function nb(e){return new Q(t=>{const{stop:n}=oe(e,document,"securitypolicyviolation",r=>{t.notify(sb(r))});return n})}function rb(e){const{type:t,body:n}=e;return cd({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:ld(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function sb(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return cd({type:e.effectiveDirective,message:`${Pr.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:ld(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Du(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function cd(e){return{startClocks:Ne(),source:Bn.REPORT,handling:"unhandled",...e}}function ld(e,t,n,r,s){return n?Fn({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:s??void 0}]}):void 0}function Ma(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function ln(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function zs(e,t,n=ib()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const s=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,s)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const s=Array.isArray(e)?e:[];for(let i=0;i<t.length;++i)s[i]=zs(s[i],t[i],n);return s}const r=ln(e)==="object"?e:{};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=zs(r[s],t[s],n));return r}function Da(e){return zs(void 0,e)}function at(...e){let t;for(const n of e)n!=null&&(t=zs(t,n));return t}function ib(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function ud(){var e;const t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function dd(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const ob=500;function pd(){const e=[];return{add:s=>{e.push(s)>ob&&e.splice(0,1)},remove:s=>{dd(e,s)},drain:s=>{e.forEach(i=>i(s)),e.length=0}}}const un={log:"log",configuration:"configuration",usage:"usage"},ab=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],cb=[l0];let fd=pd(),Un=e=>{fd.add(()=>Un(e))};function lb(e,t){let n;const r=new Q,s=new Set,i=!cb.includes(t.site)&&$t(t.telemetrySampleRate),o={[un.log]:i,[un.configuration]:i&&$t(t.telemetryConfigurationSampleRate),[un.usage]:i&&$t(t.telemetryUsageSampleRate)},a=ub();Un=l=>{const u=On(l);if(o[l.type]&&s.size<t.maxTelemetryEventsPerPage&&!s.has(u)){const d=c(e,l,a);r.notify(d),Ma("telemetry",d),s.add(u)}},x1(Fa);function c(l,u,d){return at({type:"telemetry",date:ye(),service:l,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:at(u,{runtime_env:d,connectivity:ud(),sdk_setup:"npm"}),experimental_features:Array.from(T0())},n!==void 0?n():{})}return{setContextProvider:l=>{n=l},observable:r,enabled:i}}function ub(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function db(){fd.drain()}function pb(e){return e.site===Xu}function Rt(e,t){wa(xs.debug,e,t),Un({type:un.log,message:e,status:"debug",...t})}function Fa(e,t){Un({type:un.log,status:"error",...hb(e),...t})}function fb(e){Un({type:un.configuration,configuration:e})}function Me(e){Un({type:un.usage,usage:e})}function hb(e){if(Wt(e)){const t=jt(e);return{error:{kind:t.name,stack:Fn(mb(t))},message:t.message}}return{error:{stack:nd},message:`Uncaught ${On(e)}`}}function mb(e){return e.stack=e.stack.filter(t=>!t.url||ab.some(n=>t.url.startsWith(n))),e}const Or=1/0,gb=Be;let Lr=null;const Hs=new Set;function bb(){Hs.forEach(e=>e())}function $n({expireDelay:e,maxEntries:t}){let n=[];const r=[];Lr||(Lr=Rn(()=>bb(),gb));const s=()=>{const h=nt()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const f=n.pop();f&&r.push(f.startTime)}};Hs.add(s);function i(h,f){const m={value:h,startTime:f,endTime:Or,remove:()=>{dd(n,m)},close:g=>{m.endTime=g}};return t&&n.length>=t&&n.pop(),n.unshift(m),m}function o(h=Or,f={returnInactive:!1}){for(const m of n)if(m.startTime<=h){if(f.returnInactive||h<=m.endTime)return m.value;break}}function a(h){const f=n[0];f&&f.endTime===Or&&f.close(h)}function c(h=Or,f=0){const m=kn(h,f);return n.filter(g=>g.startTime<=m&&h<=g.endTime).map(g=>g.value)}function l(){return n.map(({startTime:h,endTime:f,value:m})=>({startTime:h,endTime:f===Or?"Infinity":f,value:m}))}function u(){return r}function d(){n=[]}function p(){Hs.delete(s),Hs.size===0&&Lr&&(Rs(Lr),Lr=null)}return{add:i,find:o,closeActive:a,findAll:c,reset:d,stop:p,getAllEntries:l,getDeletedEntries:u}}const yb=Be,wb=rn;function vb(e,t,n,r){const s=new Q,i=new Q,o=n0(e.sessionStoreStrategyType,e,t,n),a=$n({expireDelay:wb});o.renewObservable.subscribe(()=>{a.add(c(),nt()),s.notify()}),o.expireObservable.subscribe(()=>{i.notify(),a.closeActive(nt())}),o.expandOrRenewSession(),a.add(c(),Pu().relative),r.observable.subscribe(()=>{r.isGranted()?o.expandOrRenewSession():o.expire()}),Sb(e,()=>{r.isGranted()&&o.expandOrRenewSession()}),_b(e,()=>o.expandSession()),Cb(e,()=>o.restartSession());function c(){return{id:o.getSession().id,trackingType:o.getSession()[t],isReplayForced:!!o.getSession().forcedReplay,anonymousId:o.getSession().anonymousId}}return{findSession:(l,u)=>a.find(l,u),renewObservable:s,expireObservable:i,sessionStateUpdateObservable:o.sessionStateUpdateObservable,expire:o.expire,updateSessionState:o.updateSessionState}}function Sb(e,t){const{stop:n}=Ve(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function _b(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=oe(e,document,"visibilitychange",n);Rn(n,yb)}function Cb(e,t){const{stop:n}=oe(e,window,"resume",t,{capture:!0})}function Eb(e){return e>=500}function xb(e){try{return e.clone()}catch{return}}const Ib=80*Cr,Tb=32,hd=3*Ou,Ab=Be,md=ke;function gd(e,t,n,r,s){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?yd(e,t,n,{onSuccess:()=>wd(0,t,n,r,s),onFailure:()=>{t.queuedPayloads.enqueue(e),bd(t,n,r,s)}}):t.queuedPayloads.enqueue(e)}function bd(e,t,n,r){e.transportStatus===2&&we(()=>{const s=e.queuedPayloads.first();yd(s,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=md,wd(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(Ab,e.currentBackoffTime*2),bd(e,t,n,r)}})},e.currentBackoffTime)}function yd(e,t,n,{onSuccess:r,onFailure:s}){t.bandwidthMonitor.add(e),n(e,i=>{t.bandwidthMonitor.remove(e),kb(i)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:i.status},s()):(t.transportStatus=0,r())})}function wd(e,t,n,r,s){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(s({message:`Reached max ${r} events size queued for upload: ${hd/Ou}MiB`,source:Bn.AGENT,startClocks:Ne()}),t.queueFullReported=!0);const i=t.queuedPayloads;for(t.queuedPayloads=vd();i.size()>0;)gd(i.dequeue(),t,n,r,s)}function kb(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Eb(e.status))}function Rb(){return{transportStatus:0,currentBackoffTime:md,bandwidthMonitor:Pb(),queuedPayloads:vd(),queueFullReported:!1}}function vd(){const e=[];return{bytesCount:0,enqueue(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=hd}}}function Pb(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Ib&&this.ongoingRequestCount<Tb},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function Sd(e,t,n){const r=Rb(),s=(i,o)=>Nb(e,t,i,o);return{send:i=>{gd(i,r,s,e.trackType,n)},sendOnExit:i=>{Ob(e,t,i)}}}function Ob(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const s=e.build("beacon",n);if(navigator.sendBeacon(s,n.data))return}catch(s){Lb(s)}Ba(e,n)}let _d=!1;function Lb(e){_d||(_d=!0,kt(e))}function Nb(e,t,n,r){if(Mb()&&n.bytesCount<t){const i=e.build("fetch-keepalive",n);fetch(i,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then($(o=>r==null?void 0:r({status:o.status,type:o.type}))).catch($(()=>Ba(e,n,r)))}else Ba(e,n,r)}function Ba(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then($(s=>n==null?void 0:n({status:s.status,type:s.type}))).catch($(()=>n==null?void 0:n({status:0})))}function Mb(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Vn(){const e=Db();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const s=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:s}))}}}function Cd(e){const t=Vn();return!!t&&t.getCapabilities().includes(e)}function dn(e){var t;e===void 0&&(e=(t=bt().location)===null||t===void 0?void 0:t.hostname);const n=Vn();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function Db(){return bt().DatadogEventBridge}const zn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Fb(e){return new Q(t=>{const{stop:n}=Ve(e,window,["visibilitychange","freeze"],s=>{s.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:zn.HIDDEN}):s.type==="freeze"&&t.notify({reason:zn.FROZEN})},{capture:!0}),r=oe(e,window,"beforeunload",()=>{t.notify({reason:zn.UNLOADING})}).stop;return()=>{n(),r()}})}function Ed(e){return Uu(zn).includes(e)}function Bb({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let s={};const i=n.flushObservable.subscribe(d=>u(d));function o(d,p,h){n.notifyBeforeAddMessage(p),h!==void 0?(s[h]=d,n.notifyAfterAddMessage()):e.write(e.isEmpty?d:`
|
|
543
|
-
${d}`,f=>{n.notifyAfterAddMessage(f-p)})}function a(d){return d!==void 0&&s[d]!==void 0}function c(d){const p=s[d];delete s[d];const h=e.estimateEncodedBytesCount(p);n.notifyAfterRemoveMessage(h)}function l(d,p){const h=On(d),f=e.estimateEncodedBytesCount(h);if(f>=r){W.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${ma} ${m1}/#technical-limitations`);return}a(p)&&c(p),o(h,f,p)}function u(d){const p=Uu(s).join(`
|
|
544
|
-
`);s={};const h=Ed(d.reason),f=h?t.sendOnExit:t.send;if(h&&e.isAsync){const m=e.finishSync();m.outputBytesCount&&f(xd(m));const g=[m.pendingData,p].filter(Boolean).join(`
|
|
545
|
-
|
|
546
|
-
${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.unsubscribe}}function xd(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}function Ub({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:s}){const i=r.subscribe(f=>u(f.reason)),o=s.subscribe(()=>u("session_expire")),a=new Q(()=>()=>{i.unsubscribe(),o.unsubscribe()});let c=0,l=0;function u(f){if(l===0)return;const m=l,g=c;l=0,c=0,h(),a.notify({reason:f,messagesCount:m,bytesCount:g})}let d;function p(){d===void 0&&(d=we(()=>{u("duration_limit")},n))}function h(){Ue(d),d=void 0}return{flushObservable:a,get messagesCount(){return l},notifyBeforeAddMessage(f){c+f>=t&&u("bytes_limit"),l+=1,c+=f,p()},notifyAfterAddMessage(f=0){c+=f,l>=e?u("messages_limit"):c>=t&&u("bytes_limit")},notifyAfterRemoveMessage(f){c-=f,l-=1,l===0&&h()}}}function $b(e,t,n,r,s,i,o=Bb){const a=l(e,t),c=n&&l(e,n);function l(u,{endpoint:d,encoder:p}){return o({encoder:p,request:Sd(d,u.batchBytesLimit,r),flushController:Ub({messagesLimit:u.batchMessagesLimit,bytesLimit:u.batchBytesLimit,durationLimit:u.flushTimeout,pageMayExitObservable:s,sessionExpireObservable:i}),messageBytesLimit:u.messageBytesLimit})}return{flushObservable:a.flushController.flushObservable,add(u,d=!0){a.add(u),c&&d&&c.add(n.transformMessage?n.transformMessage(u):u)},upsert:(u,d)=>{a.upsert(u,d),c&&c.upsert(n.transformMessage?n.transformMessage(u):u,d)},stop:()=>{a.stop(),c&&c.stop()}}}function Vb(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const s=Lu(n);t+=s,e+=n,r&&r(s)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class zb{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(s=>s(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function Ua(e,t,n){let r=0,s=!1;return{isLimitReached(){if(r===0&&we(()=>{r=0},Be),r+=1,r<=t||s)return s=!1,!1;if(r===t+1){s=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Bn.AGENT,startClocks:Ne()})}finally{s=!1}}return!0}}}function $a(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:q}):oe(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function Hb(e,t){return new Promise(n=>{$a(e,t,n)})}let Va;const za=new WeakMap;function jb(e){return Va||(Va=Wb(e)),Va}function Wb(e){return new Q(t=>{const{stop:n}=$e(XMLHttpRequest.prototype,"open",qb),{stop:r}=$e(XMLHttpRequest.prototype,"send",i=>{Gb(i,e,t)},{computeHandlingStack:!0}),{stop:s}=$e(XMLHttpRequest.prototype,"abort",Kb);return()=>{n(),r(),s()}})}function qb({target:e,parameters:[t,n]}){za.set(e,{state:"open",method:String(t).toUpperCase(),url:Ta(String(n))})}function Gb({target:e,handlingStack:t},n,r){const s=za.get(e);if(!s)return;const i=s;i.state="start",i.startClocks=Ne(),i.isAborted=!1,i.xhr=e,i.handlingStack=t;let o=!1;const{stop:a}=$e(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),a(),o)return;o=!0;const u=s;u.state="complete",u.duration=Ce(i.startClocks.timeStamp,ye()),u.status=e.status,r.notify(Er(u))},{stop:l}=oe(n,e,"loadend",c);r.notify(i)}function Kb({target:e}){const t=za.get(e);t&&(t.isAborted=!0)}let Ha;function Id(){return Ha||(Ha=Yb()),Ha}function Yb(){return new Q(e=>{if(!window.fetch)return;const{stop:t}=$e(window,"fetch",n=>Zb(n,e),{computeHandlingStack:!0});return t})}function Zb({parameters:e,onPostCall:t,handlingStack:n},r){const[s,i]=e;let o=i&&i.method;o===void 0&&s instanceof Request&&(o=s.method);const a=o!==void 0?String(o).toUpperCase():"GET",c=s instanceof Request?s.url:Ta(String(s)),l=Ne(),u={state:"start",init:i,input:s,method:a,startClocks:l,url:c,handlingStack:n};r.notify(u),e[0]=u.input,e[1]=u.init,t(d=>Jb(r,d,u))}function Jb(e,t,n){const r=n;function s(i){r.state="resolve",Object.assign(r,i),e.notify(r)}t.then($(i=>{s({response:i,responseType:i.type,status:i.status,isAborted:!1})}),$(i=>{var o,a;s({status:0,isAborted:((a=(o=r.init)===null||o===void 0?void 0:o.signal)===null||a===void 0?void 0:a.aborted)||i instanceof DOMException&&i.code===DOMException.ABORT_ERR,error:i})}))}function Td(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback($(e),t);return()=>window.cancelIdleCallback(n)}return Qb(e)}const Xb=50;function Qb(e){const t=tt(),n=we(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,Xb-(tt()-t))})},0);return()=>Ue(n)}const e2=ke,t2=30;function n2(){const e=[];function t(r){let s;if(r.didTimeout){const i=performance.now();s=()=>t2-(performance.now()-i)}else s=r.timeRemaining.bind(r);for(;s()>0&&e.length;)e.shift()();e.length&&n()}function n(){Td(t,{timeout:e2})}return{push(r){e.push(r)===1&&n()}}}let ja={};function r2(e){const t=e.map(n=>(ja[n]||(ja[n]=s2(n)),ja[n]));return Mu(...t)}function s2(e){return new Q(t=>{const n=At[e];return At[e]=(...r)=>{n.apply(console,r);const s=Vs("console error");nn(()=>{t.notify(i2(r,e,s))})},()=>{At[e]=n}})}function i2(e,t,n){const r=e.map(i=>o2(i)).join(" ");let s;if(t===xs.error){const i=e.find(Wt);s={stack:i?Fn(jt(i)):void 0,fingerprint:sd(i),causes:i?od(i,"console"):void 0,startClocks:Ne(),message:r,source:Bn.CONSOLE,handling:"handled",handlingStack:n,context:id(i),originalError:i}}return{api:t,message:r,error:s,handlingStack:n}}function o2(e){return typeof e=="string"?de(e):Wt(e)?td(jt(e)):On(de(e),void 0,2)}function a2(e){const t=ln(e)==="object";return t||W.error("Unsupported context:",e),t}function Wa(e,t,n){const r={...e};for(const[s,{required:i,type:o}]of Object.entries(t))o==="string"&&s in r&&(r[s]=String(r[s])),i&&!(s in e)&&W.warn(`The property ${s} of ${n} is required; context will not be sent to the intake.`);return r}function js(e="",{propertiesConfig:t={}}={}){let n={};const r=new Q,s={getContext:()=>Da(n),setContext:i=>{a2(i)?n=de(Wa(i,t,e)):s.clearContext(),r.notify()},setContextProperty:(i,o)=>{n=de(Wa({...n,[i]:o},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],Wa(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return s}const c2="_dd_c",l2=[];function qa(e,t,n,r){const s=u2(n,r);l2.push(oe(e,window,"storage",({key:l})=>{s===l&&o()})),t.changeObservable.subscribe(a);const i=at(c(),t.getContext());tn(i)||t.setContext(i);function o(){t.setContext(c())}function a(){localStorage.setItem(s,JSON.stringify(t.getContext()))}function c(){const l=localStorage.getItem(s);return l?JSON.parse(l):{}}}function u2(e,t){return`${c2}_${e}_${t}`}const ve={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},De={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function d2(e,t,n){const r=e.getReader();let s=0;i();function i(){r.read().then($(a=>{if(a.done){o();return}s+=a.value.length,s>n.bytesLimit?o():i()}),$(a=>t(a)))}function o(){r.cancel().catch(q),t(void 0,void 0,void 0)}}const p2="datadog-synthetics-public-id",f2="datadog-synthetics-result-id",h2="datadog-synthetics-injects-rum";function Ad(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Ht(h2))}function m2(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Ht(p2);return typeof e=="string"?e:void 0}function g2(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Ht(f2);return typeof e=="string"?e:void 0}function Ga(e){const t=ln(e);return t==="string"||t==="function"||e instanceof RegExp}function kd(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(s){W.error(s)}return!1})}function b2(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function y2(e,t,n){function r(i){return!t.wasInPageStateDuringPeriod("frozen",i.startClocks.relative,i.duration)}function s(i){r(i)&&e.notify(12,v2(i))}return{addDurationVital:s,startDurationVital:(i,o={})=>Rd(n,i,o),stopDurationVital:(i,o={})=>{Pd(s,n,i,o)}}}function Rd({vitalsByName:e,vitalsByReference:t},n,r={}){const s={name:n,startClocks:Ne(),context:r.context,description:r.description},i={__dd_vital_reference:!0};return e.set(n,s),t.set(i,s),i}function Pd(e,{vitalsByName:t,vitalsByReference:n},r,s={}){const i=typeof r=="string"?t.get(r):n.get(r);i&&(e(w2(i,i.startClocks,s,Ne())),typeof r=="string"?t.delete(r):n.delete(r))}function w2(e,t,n,r){var s;return{name:e.name,type:"duration",startClocks:t,duration:Ce(t.timeStamp,r.timeStamp),context:at(e.context,n.context),description:(s=n.description)!==null&&s!==void 0?s:e.description}}function v2(e,t){const n={date:e.startClocks.timeStamp,vital:{id:Ee(),type:e.type,name:e.name,duration:B(e.duration),description:e.description},type:"vital"};return n._dd={vital:{computed_value:!0}},{rawRumEvent:n,startTime:e.startClocks.relative,duration:e.duration,customerContext:e.context,domainContext:{}}}function Od(e,t,n){if(e)for(const r of e){const s=r[t];s&&s(n)}}function S2(){return Nd(64)}function Ld(){return Nd(63)}function Nd(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],s=t[0],i="";do{const o=r%n*4294967296+s;r=Math.floor(r/n),s=Math.floor(o/n),i=(o%n).toString(n)+i}while(r||s);return i}}}function Hn(e){return e.toString(16).padStart(16,"0")}let Ws;function _2(e,t){if(t===100)return!0;if(t===0)return!1;if(Ws&&e===Ws.sessionId)return Ws.decision;let n;return window.BigInt?n=C2(BigInt(`0x${e.split("-")[4]}`),t):n=$t(t),Ws={sessionId:e,decision:n},n}function C2(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),s=e*n%r;return Number(s)<=t/100*Number(r)}function E2(e){const t=e;return ln(t)==="object"&&Ga(t.match)&&Array.isArray(t.propagatorTypes)}function x2(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function I2(e,t,n){return{clearTracingIfNeeded:x2,traceFetch:r=>Md(e,r,t,n,s=>{var i;if(r.input instanceof Request&&!(!((i=r.init)===null||i===void 0)&&i.headers))r.input=new Request(r.input),Object.keys(s).forEach(o=>{r.input.headers.append(o,s[o])});else{r.init=Er(r.init);const o=[];r.init.headers instanceof Headers?r.init.headers.forEach((a,c)=>{o.push([c,a])}):Array.isArray(r.init.headers)?r.init.headers.forEach(a=>{o.push(a)}):r.init.headers&&Object.keys(r.init.headers).forEach(a=>{o.push([a,r.init.headers[a]])}),r.init.headers=o.concat(Ca(s))}}),traceXhr:(r,s)=>Md(e,r,t,n,i=>{Object.keys(i).forEach(o=>{s.setRequestHeader(o,i[o])})})}}function Md(e,t,n,r,s){const i=n.findTrackedSession();if(!i)return;const o=e.allowedTracingUrls.find(l=>kd([l.match],t.url,!0));if(!o)return;const a=_2(i.id,e.traceSampleRate);(a||e.traceContextInjection===Aa.ALL)&&(t.traceSampled=a,t.traceId=S2(),t.spanId=Ld(),s(T2(t.traceId,t.spanId,t.traceSampled,o.propagatorTypes,r,e)))}function T2(e,t,n,r,s,i){const o={};if(r.forEach(a=>{switch(a){case"datadog":{Object.assign(o,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(o,{traceparent:`00-0000000000000000${Hn(e)}-${Hn(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(o,{b3:`${Hn(e)}-${Hn(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(o,{"X-B3-TraceId":Hn(e),"X-B3-SpanId":Hn(t),"X-B3-Sampled":n?"1":"0"});break}}}),$s(cn.USER_ACCOUNT_TRACE_HEADER)&&i.propagateTraceBaggage){const a=s().user.id,c=s().account.id,l=[];typeof a=="string"&&l.push(`usr.id=${encodeURIComponent(a)}`),typeof c=="string"&&l.push(`account.id=${encodeURIComponent(c)}`),l.length>0&&(o.baggage=l.join(","))}return o}const Dd=["tracecontext","datadog"];function A2(e){var t,n,r,s,i,o,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&W.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){W.error("Application ID is not configured, no RUM data will be collected.");return}if(!Mn(e.sessionReplaySampleRate,"Session Replay")||!Mn(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){W.error("Excluded Activity Urls should be an array");return}const c=k2(e);if(!c)return;const l=C0(e);if(!l)return;const u=$s(cn.PROFILING),d=(t=e.sessionReplaySampleRate)!==null&&t!==void 0?t:0;return{applicationId:e.applicationId,version:e.version||void 0,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:d,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:d===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:Sr(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(r=e.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((s=e.trackUserInteractions)!==null&&s!==void 0)||s),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((i=e.trackResources)!==null&&i!==void 0)||i),trackLongTasks:!!(!((o=e.trackLongTasks)!==null&&o!==void 0)||o),subdomain:e.subdomain,defaultPrivacyLevel:ks(Ar,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Ar.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ks(Aa,e.traceContextInjection)?e.traceContextInjection:Aa.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:u&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...l}}function k2(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){W.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){W.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{Ga(n)?t.push({match:n,propagatorTypes:Dd}):E2(n)?t.push(n):W.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function R2(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{Ga(n)?Dd.forEach(r=>t.add(r)):ln(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function P2(e){var t;const n=E0(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:R2(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var s;return{name:r.name,...(s=r.getConfigurationTelemetry)===null||s===void 0?void 0:s.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,...n}}const O2="v1";function L2(e,t){M2(e,n=>{t(N2(e,n))})}function N2(e,t){return{...e,...t}}function M2(e,t){const n=new XMLHttpRequest;oe(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Fd()}),oe(e,n,"error",function(){Fd()}),n.open("GET",D2(e)),n.send()}function D2(e){return`https://sdk-configuration.${Qu("rum",e)}/${O2}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Fd(){W.error("Error fetching the remote configuration.")}function F2(e){const t=Bd();return e.storeContextsAcrossPages&&qa(e,t,"rum",2),t}function Bd(){return js("global context")}function B2(e){const t=Ud();return e.storeContextsAcrossPages&&qa(e,t,"rum",1),t}function Ud(){return js("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function U2(e){const t=$d();return e.storeContextsAcrossPages&&qa(e,t,"rum",4),t}function $d(){return js("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function $2({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,s){const i=pd(),o=Bd();Ka(o,ve.globalContext,i);const a=Ud();Ka(a,ve.userContext,i);const c=$d();Ka(c,ve.accountContext,i);let l,u,d,p;const h=n.observable.subscribe(m),f={};function m(){if(!d||!p||!n.isGranted())return;h.unsubscribe();let w;if(p.trackViewsManually){if(!l)return;i.remove(l.callback),w=l.options}const C=s(p,u,w);i.drain(C)}function g(w){const C=dn();if(C&&(w=V2(w)),d=w,fb(P2(w)),p){ad("DD_RUM",w);return}const N=A2(w);if(N){if(!C&&!N.sessionStoreStrategyType){W.warn("No storage available for session. We will not send any data.");return}N.compressIntakeRequests&&!C&&t&&(u=t(N,"Datadog RUM",q),!u)||(p=N,Id().subscribe(q),n.tryToInit(N.trackingConsent),m())}}const _=w=>{i.add(C=>C.addDurationVital(w))};return{init(w,C){if(!w){W.error("Missing configuration");return}x0(w.enableExperimentalFeatures),d=w,!(e&&Ad())&&(Od(w.plugins,"onInit",{initConfiguration:w,publicApi:C}),w.remoteConfigurationId?L2(w,g):g(w))},get initConfiguration(){return d},getInternalContext:q,stopSession:q,addTiming(w,C=ye()){i.add(N=>N.addTiming(w,C))},startView(w,C=Ne()){const N=A=>{A.startView(w,C)};i.add(N),l||(l={options:w,callback:N},m())},setViewName(w){i.add(C=>C.setViewName(w))},setViewContext(w){i.add(C=>C.setViewContext(w))},setViewContextProperty(w,C){i.add(N=>N.setViewContextProperty(w,C))},getViewContext:()=>f,globalContext:o,userContext:a,accountContext:c,addAction(w){i.add(C=>C.addAction(w))},addError(w){i.add(C=>C.addError(w))},addFeatureFlagEvaluation(w,C){i.add(N=>N.addFeatureFlagEvaluation(w,C))},startDurationVital(w,C){return Rd(r,w,C)},stopDurationVital(w,C){Pd(_,r,w,C)},addDurationVital:_}}function V2(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Vn())===null||n===void 0?void 0:n.getPrivacyLevel()}}function Ka(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(s=>s[t].setContext(r))})}function z2(e,t,n,r={}){const s=r0(),i=b2();let o=$2(r,s,i,(u,d,p)=>{const h=e(u,t,n,p,d&&r.createDeflateEncoder?f=>r.createDeflateEncoder(u,d,f):Vb,s,i);return t.onRumStart(h.lifeCycle,u,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,u,h.session,h.viewHistory),o=H2(o,h),Od(u.plugins,"onRumStart",{strategy:o}),h});const a=$(u=>{const d=typeof u=="object"?u:{name:u};o.startView(d),Me({feature:"start-view"})});function c(u,d,p){return $((...h)=>(Me({feature:p}),o[u][d](...h)))}const l=X0({init:$(u=>{o.init(u,l)}),setTrackingConsent:$(u=>{s.update(u),Me({feature:"set-tracking-consent",tracking_consent:u})}),setViewName:$(u=>{o.setViewName(u),Me({feature:"set-view-name"})}),setViewContext:$(u=>{o.setViewContext(u),Me({feature:"set-view-context"})}),setViewContextProperty:$((u,d)=>{o.setViewContextProperty(u,d),Me({feature:"set-view-context-property"})}),getViewContext:$(()=>(Me({feature:"set-view-context-property"}),o.getViewContext())),getInternalContext:$(u=>o.getInternalContext(u)),getInitConfiguration:$(()=>Da(o.initConfiguration)),addAction:(u,d)=>{const p=Vs("action");nn(()=>{o.addAction({name:de(u),context:de(d),startClocks:Ne(),type:"custom",handlingStack:p}),Me({feature:"add-action"})})},addError:(u,d)=>{const p=Vs("error");nn(()=>{o.addError({error:u,handlingStack:p,context:de(d),startClocks:Ne()}),Me({feature:"add-error"})})},addTiming:$((u,d)=>{o.addTiming(de(u),d)}),setGlobalContext:c(ve.globalContext,De.setContext,"set-global-context"),getGlobalContext:c(ve.globalContext,De.getContext,"get-global-context"),setGlobalContextProperty:c(ve.globalContext,De.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c(ve.globalContext,De.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c(ve.globalContext,De.clearContext,"clear-global-context"),setUser:c(ve.userContext,De.setContext,"set-user"),getUser:c(ve.userContext,De.getContext,"get-user"),setUserProperty:c(ve.userContext,De.setContextProperty,"set-user-property"),removeUserProperty:c(ve.userContext,De.removeContextProperty,"remove-user-property"),clearUser:c(ve.userContext,De.clearContext,"clear-user"),setAccount:c(ve.accountContext,De.setContext,"set-account"),getAccount:c(ve.accountContext,De.getContext,"get-account"),setAccountProperty:c(ve.accountContext,De.setContextProperty,"set-account-property"),removeAccountProperty:c(ve.accountContext,De.removeContextProperty,"remove-account-property"),clearAccount:c(ve.accountContext,De.clearContext,"clear-account"),startView:a,stopSession:$(()=>{o.stopSession(),Me({feature:"stop-session"})}),addFeatureFlagEvaluation:$((u,d)=>{o.addFeatureFlagEvaluation(de(u),de(d)),Me({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:$(()=>t.getSessionReplayLink()),startSessionReplayRecording:$(u=>{t.start(u),Me({feature:"start-session-replay-recording",force:u&&u.force})}),stopSessionReplayRecording:$(()=>t.stop()),addDurationVital:$((u,d)=>{Me({feature:"add-duration-vital"}),o.addDurationVital({name:de(u),type:"duration",startClocks:b1(d.startTime),duration:d.duration,context:de(d&&d.context),description:de(d&&d.description)})}),startDurationVital:$((u,d)=>(Me({feature:"start-duration-vital"}),o.startDurationVital(de(u),{context:de(d&&d.context),description:de(d&&d.description)}))),stopDurationVital:$((u,d)=>{Me({feature:"stop-duration-vital"}),o.stopDurationVital(typeof u=="string"?de(u):u,{context:de(d&&d.context),description:de(d&&d.description)})})});return l}function H2(e,t){return{init:n=>{ad("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function j2(){const e=Vd();return new Q(t=>{if(!e)return;const n=new e($(()=>t.notify()));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Vd(){let e;const t=window;if(t.Zone&&(e=Vt(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(q),r=Vt(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function W2(){const e=new Q,{stop:t}=$e(window,"open",()=>e.notify());return{observable:e,stop:t}}function q2(e,t,n,r,s){return{get:i=>{const o=n.findView(i),a=s.findUrl(i),c=t.findTrackedSession(i);if(c&&o&&a){const l=r.findActionId(i);return{application_id:e,session_id:c.id,user_action:l?{id:l}:void 0,view:{id:o.id,name:o.name,referrer:a.referrer,url:a.url}}}}}}const G2=zb,K2=rn;function Y2(e){const t=$n({expireDelay:K2});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const s=t.find(r.startClocks.relative);s&&r.name&&(s.name=r.name),s&&r.context&&(s.context=r.context)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),getAllEntries:()=>t.getAllEntries(),getDeletedEntries:()=>t.getDeletedEntries(),stop:()=>{t.stop()}}}const zd="initial_document",Z2=[["document",e=>zd===e],["xhr",e=>e==="xmlhttprequest"],["fetch",e=>e==="fetch"],["beacon",e=>e==="beacon"],["css",(e,t)=>/\.css$/i.test(t)],["js",(e,t)=>/\.js$/i.test(t)],["image",(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],["font",(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],["media",(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function J2(e){const t=e.name;if(!s0(t))return Rt(`Failed to construct URL for "${e.name}"`),"other";const n=i0(t);for(const[r,s]of Z2)if(s(e.initiatorType,n))return r;return"other"}function Hd(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function X2(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function jd(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?Ce(n,r):t}function Q2(e){if(!qd(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:s,redirectEnd:i,domainLookupStart:o,domainLookupEnd:a,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:p,responseEnd:h}=e,f={download:pn(t,p,h),first_byte:pn(t,d,p)};return 0<r&&r<n&&(f.worker=pn(t,r,n)),n<u&&(f.connect=pn(t,c,u),c<=l&&l<=u&&(f.ssl=pn(t,l,u))),n<a&&(f.dns=pn(t,o,a)),t<i&&(f.redirect=pn(t,s,i)),f}function Wd(e){return e.duration>=0}function qd(e){const t=Hd(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=ey(e)?Hd(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function ey(e){return e.redirectEnd>e.startTime}function pn(e,t,n){if(e<=t&&t<=n)return{duration:B(Ce(t,n)),start:B(Ce(e,t))}}function Gd(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Kd(e){return e.deliveryType===""?"other":e.deliveryType}function ty(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Ya(e){return e&&!S0(e)}const ny=/data:(.+)?(;base64)?,/g,Yd=24e3;function Zd(e){return e.length<=Yd?!1:e.substring(0,5)==="data:"?(e=e.substring(0,Yd),!0):!1}function Jd(e){return`${e.match(ny)[0]}[...]`}let Xd=1;function ry(e,t,n,r){const s=I2(t,n,r);sy(e,t,s),iy(e,s)}function sy(e,t,n){const r=jb(t).subscribe(s=>{const i=s;if(Ya(i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=Qd(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"xhr",url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack});break}});return{stop:()=>r.unsubscribe()}}function iy(e,t){const n=Id().subscribe(r=>{const s=r;if(Ya(s.url))switch(s.state){case"start":t.traceFetch(s),s.requestIndex=Qd(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":oy(s,i=>{t.clearTracingIfNeeded(s),e.notify(8,{duration:i,method:s.method,requestIndex:s.requestIndex,responseType:s.responseType,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:"fetch",url:s.url,response:s.response,init:s.init,input:s.input,isAborted:s.isAborted,handlingStack:s.handlingStack})});break}});return{stop:()=>n.unsubscribe()}}function Qd(){const e=Xd;return Xd+=1,e}function oy(e,t){const n=e.response&&xb(e.response);!n||!n.body?t(Ce(e.startClocks.timeStamp,ye())):d2(n.body,()=>{t(Ce(e.startClocks.timeStamp,ye()))},{bytesLimit:Number.POSITIVE_INFINITY})}function ep(e){return Sr(e)&&e<0?void 0:e}function tp({lifeCycle:e,isChildEvent:t,onChange:n=q}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},s=e.subscribe(13,i=>{var o;if(!(i.type==="view"||i.type==="vital"||!t(i)))switch(i.type){case"error":r.errorCount+=1,n();break;case"action":r.actionCount+=1,i.action.frustration&&(r.frustrationCount+=i.action.frustration.type.length),n();break;case"long_task":r.longTaskCount+=1,n();break;case"resource":!((o=i._dd)===null||o===void 0)&&o.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{s.unsubscribe()},eventCounts:r}}function ay(e,t){const n=tt();let r=!1;const{stop:s}=Ve(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:nt(),processingEnd:nt(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?i(e,c):o(c)},{passive:!0,capture:!0});return{stop:s};function i(a,c){Ve(a,window,["pointerup","pointercancel"],l=>{l.type==="pointerup"&&o(c)},{once:!0})}function o(a){if(!r){r=!0,s();const c=a.processingStart-a.startTime;c>=0&&c<tt()-n&&t(a)}}}var J;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(J||(J={}));function yt(e,t){return new Q(n=>{if(!window.PerformanceObserver)return;const r=c=>{const l=uy(c);l.length>0&&n.notify(l)};let s,i=!0;const o=new PerformanceObserver($(c=>{i?s=we(()=>r(c.getEntries())):r(c.getEntries())}));try{o.observe(t)}catch{if([J.RESOURCE,J.NAVIGATION,J.LONG_TASK,J.PAINT].includes(t.type)){t.buffered&&(s=we(()=>r(performance.getEntriesByType(t.type))));try{o.observe({entryTypes:[t.type]})}catch{return}}}i=!1,cy(e);let a;return!fn(J.FIRST_INPUT)&&t.type===J.FIRST_INPUT&&({stop:a}=ay(e,c=>{r([c])})),()=>{o.disconnect(),a&&a(),Ue(s)}})}let Nr;function cy(e){return!Nr&&ly()&&"addEventListener"in performance&&(Nr=oe(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Nr==null||Nr.stop()}}function ly(){return window.performance!==void 0&&"getEntries"in performance}function fn(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function uy(e){return e.filter(t=>!dy(t))}function dy(e){return e.entryType===J.RESOURCE&&(!Ya(e.name)||!Wd(e))}const np=100,py=100;function Za(e,t,n,r,s,i){const o=hy(e,t,n,r);return fy(o,s,i)}function fy(e,t,n){let r,s=!1;const i=we($(()=>l({hadActivity:!1})),np),o=n!==void 0?we($(()=>l({hadActivity:!0,end:ye()})),n):void 0,a=e.subscribe(({isBusy:u})=>{Ue(i),Ue(r);const d=ye();u||(r=we($(()=>l({hadActivity:!0,end:d})),py))}),c=()=>{s=!0,Ue(i),Ue(r),Ue(o),a.unsubscribe()};function l(u){s||(c(),t(u))}return{stop:c}}function hy(e,t,n,r){return new Q(s=>{const i=[];let o,a=0;return i.push(t.subscribe(c),n.subscribe(c),yt(r,{type:J.RESOURCE}).subscribe(l=>{l.some(u=>!Ja(r,u.name))&&c()}),e.subscribe(7,l=>{Ja(r,l.url)||(o===void 0&&(o=l.requestIndex),a+=1,c())}),e.subscribe(8,l=>{Ja(r,l.url)||o===void 0||l.requestIndex<o||(a-=1,c())})),()=>{i.forEach(l=>l.unsubscribe())};function c(){s.notify({isBusy:a>0})}})}function Ja(e,t){return kd(e.excludedActivityUrls,t)}function rp(e){return e.nodeType===Node.TEXT_NODE}function my(e){return e.nodeType===Node.COMMENT_NODE}function jn(e){return e.nodeType===Node.ELEMENT_NODE}function qs(e){return jn(e)&&!!e.shadowRoot}function Xa(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&jn(t.host)}function gy(e){return e.childNodes.length>0||qs(e)}function sp(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;qs(e)&&t(e.shadowRoot)}function Gs(e){return Xa(e)?e.host:e.parentNode}const D={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Ar.ALLOW,MASK:Ar.MASK,MASK_USER_INPUT:Ar.MASK_USER_INPUT},Qa="data-dd-privacy",by="hidden",yy="dd-privacy-",qt="***",ip="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",wy={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},vy="x";function wt(e,t,n){if(n&&n.has(e))return n.get(e);const r=Gs(e),s=r?wt(r,t,n):t,i=ap(e),o=op(i,s);return n&&n.set(e,o),o}function op(e,t){switch(t){case D.HIDDEN:case D.IGNORE:return t}switch(e){case D.ALLOW:case D.MASK:case D.MASK_USER_INPUT:case D.HIDDEN:case D.IGNORE:return e;default:return t}}function ap(e){if(jn(e)){if(e.tagName==="BASE")return D.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return D.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return D.MASK}if(e.matches(Wn(D.HIDDEN)))return D.HIDDEN;if(e.matches(Wn(D.MASK)))return D.MASK;if(e.matches(Wn(D.MASK_USER_INPUT)))return D.MASK_USER_INPUT;if(e.matches(Wn(D.ALLOW)))return D.ALLOW;if(_y(e))return D.IGNORE}}function Ks(e,t){switch(t){case D.MASK:case D.HIDDEN:case D.IGNORE:return!0;case D.MASK_USER_INPUT:return rp(e)?cp(e.parentNode):cp(e);default:return!1}}function cp(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!wy[t.tagName]}const Sy=e=>e.replace(/\S/g,vy);function lp(e,t,n){var r;const s=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let i=e.textContent||"";if(t&&!i.trim())return;const o=n;if(s==="SCRIPT")i=qt;else if(o===D.HIDDEN)i=qt;else if(Ks(e,o))if(s==="DATALIST"||s==="SELECT"||s==="OPTGROUP"){if(!i.trim())return}else s==="OPTION"?i=qt:i=Sy(i);return i}function _y(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),s=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(s)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(s)||/^product:/.test(s)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function Wn(e){return`[${Qa}="${e}"], .${yy}${e}`}const ec="data-dd-action-name",Cy="Masked Element";function Ey(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const s=up(e,ec)||n&&up(e,n);return s?{name:s,nameSource:"custom_attribute"}:r===D.MASK?{name:Cy,nameSource:"mask_placeholder"}:dp(e,n,xy,t)||dp(e,n,Iy,t)||{name:"",nameSource:"blank"}}function up(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return fp(pp(r.trim()))}const xy=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Ys(e.labels[0],t)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Ys(e,t,n)},e=>Mr(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(s=>Ay(e,s)).filter(s=>!!s).map(s=>hp(s,t,n)).join(" "),nameSource:"text_content"}},e=>Mr(e,"alt"),e=>Mr(e,"name"),e=>Mr(e,"title"),e=>Mr(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Ys(e.options[0],t)}],Iy=[(e,t,n)=>Ys(e,t,n)],Ty=10;function dp(e,t,n,r){let s=e,i=0;for(;i<=Ty&&s&&s.nodeName!=="BODY"&&s.nodeName!=="HTML"&&s.nodeName!=="HEAD";){for(const o of n){const a=o(s,t,r);if(a){const{name:c,nameSource:l}=a,u=c&&c.trim();if(u)return{name:fp(pp(u)),nameSource:l}}}if(s.nodeName==="FORM")break;s=s.parentElement,i+=1}}function pp(e){return e.replace(/\s+/g," ")}function fp(e){return e.length>100?`${Du(e,100)} [...]`:e}function Ay(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Mr(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Ys(e,t,n){return{name:hp(e,t,n)||"",nameSource:"text_content"}}function hp(e,t,n){if(!e.isContentEditable){if("innerText"in e){let r=e.innerText;const s=i=>{const o=e.querySelectorAll(i);for(let a=0;a<o.length;a+=1){const c=o[a];if("innerText"in c){const l=c.innerText;l&&l.trim().length>0&&(r=r.replace(l,""))}}};return s(`[${ec}]`),t&&s(`[${t}]`),n&&s(`${Wn(D.HIDDEN)}, ${Wn(D.MASK)}`),r}return e.textContent}}const mp=[ec,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],ky=[bp,Py],Ry=[bp,Oy,Ly];function Dr(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const s=yp(r,ky,My,t,n);if(s)return s;n=yp(r,Ry,Dy,t,n)||Zs(Ny(r),n),r=r.parentElement}return n}function gp(e){return/[0-9]/.test(e)}function Py(e){if(e.id&&!gp(e.id))return`#${CSS.escape(e.id)}`}function Oy(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!gp(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Ly(e){return CSS.escape(e.tagName)}function bp(e,t){if(t){const r=n(t);if(r)return r}for(const r of mp){const s=n(r);if(s)return s}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function Ny(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function yp(e,t,n,r,s){for(const i of t){const o=i(e,r);if(o&&n(e,o,s))return Zs(o,s)}}function My(e,t,n){return e.ownerDocument.querySelectorAll(Zs(t,n)).length===1}function Dy(e,t,n){let r;if(n===void 0)r=o=>o.matches(t);else{const o=Zs(`${t}:scope`,n);r=a=>a.querySelector(o)!==null}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&r(i))return!1;i=i.nextElementSibling}return!0}function Zs(e,t){return t?`${e}>${t}`:e}const wp=ke,Fy=100;function By(e,t){const n=[];let r=0,s;i(e);function i(c){c.stopObservable.subscribe(o),n.push(c),Ue(s),s=we(a,wp)}function o(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){Ue(s),r===0&&(r=1,o())}return{tryAppend:c=>r!==0?!1:n.length>0&&!Uy(n[n.length-1].event,c.event)?(a(),!1):(i(c),!0),stop:()=>{a()}}}function Uy(e,t){return e.target===t.target&&$y(e,t)<=Fy&&e.timeStamp-t.timeStamp<=wp}function $y(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function Vy(e,{onPointerDown:t,onPointerUp:n}){let r,s={selection:!1,input:!1,scroll:!1},i;const o=[oe(e,window,"pointerdown",a=>{Sp(a)&&(r=vp(),s={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),oe(e,window,"selectionchange",()=>{(!r||!vp())&&(s.selection=!0)},{capture:!0}),oe(e,window,"scroll",()=>{s.scroll=!0},{capture:!0,passive:!0}),oe(e,window,"pointerup",a=>{if(Sp(a)&&i){const c=s;n(i,a,()=>c),i=void 0}},{capture:!0}),oe(e,window,"input",()=>{s.input=!0},{capture:!0})];return{stop:()=>{o.forEach(a=>a.stop())}}}function vp(){const e=window.getSelection();return!e||e.isCollapsed}function Sp(e){return e.target instanceof Element&&e.isPrimary!==!1}const _p=3;function zy(e,t){if(Hy(e))return t.addFrustration("rage_click"),e.some(Cp)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration("error_click"),Cp(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function Hy(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(_p-1);t+=1)if(e[t+_p-1].event.timeStamp-e[t].event.timeStamp<=ke)return!0;return!1}const jy='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Cp(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(jy)}const Ep=10*ke,Fr=new Map;function Wy(e){const t=Fr.get(e);return Fr.delete(e),t}function xp(e,t){Fr.set(e,t),Fr.forEach((n,r)=>{Ce(r,nt())>Ep&&Fr.delete(r)})}const qy=5*Be;function Gy(e,t,n,r){const s=$n({expireDelay:qy}),i=new Q;let o;e.subscribe(10,()=>{s.reset()}),e.subscribe(5,u),e.subscribe(11,d=>{d.reason===zn.UNLOADING&&u()});const{stop:a}=Vy(r,{onPointerDown:d=>Ky(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:p},h,f)=>{Yy(r,e,t,n,s,i,l,d,h,f,p)}});return{stop:()=>{u(),i.notify(),a()},actionContexts:{findActionId:d=>s.findAll(d)}};function l(d){if(!o||!o.tryAppend(d)){const p=d.clone();o=By(d,h=>{Jy(h,p)})}}function u(){o&&o.stop()}}function Ky(e,t,n,r,s){const i=e.enablePrivacyForActionName?wt(r.target,e.defaultPrivacyLevel):D.ALLOW;if(i===D.HIDDEN)return;const o=Zy(r,i,e);let a=!1;return Za(t,n,s,e,c=>{a=c.hadActivity},np),{clickActionBase:o,hadActivityOnPointerDown:()=>a}}function Yy(e,t,n,r,s,i,o,a,c,l,u){var d;const p=Ip(t,s,l,a,c);o(p);const h=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;h&&xp(c.timeStamp,h);const{stop:f}=Za(t,n,r,e,_=>{_.hadActivity&&_.end<p.startClocks.timeStamp?p.discard():_.hadActivity?p.stop(_.end):u()?p.stop(p.startClocks.timeStamp):p.stop()},Ep),m=t.subscribe(5,({endClocks:_})=>{p.stop(_.timeStamp)}),g=i.subscribe(()=>{p.stop()});p.stopObservable.subscribe(()=>{m.unsubscribe(),f(),g.unsubscribe()})}function Zy(e,t,n){const r=e.target.getBoundingClientRect(),s=Dr(e.target,n.actionNameAttribute);s&&xp(e.timeStamp,s);const i=Ey(e.target,n,t);return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:s},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:i.name,nameSource:i.nameSource}}function Ip(e,t,n,r,s){const i=Ee(),o=Ne(),a=t.add(i,o.relative),c=tp({lifeCycle:e,isChildEvent:f=>f.action!==void 0&&(Array.isArray(f.action.id)?f.action.id.includes(i):f.action.id===i)});let l=0,u;const d=[],p=new Q;function h(f){l===0&&(u=f,l=1,u?a.close(ga(u)):a.remove(),c.stop(),p.notify())}return{event:s,stop:h,stopObservable:p,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return u!==void 0},getUserActivity:n,addFrustration:f=>{d.push(f)},startClocks:o,isStopped:()=>l===1||l===2,clone:()=>Ip(e,t,n,r,s),validate:f=>{if(h(),l!==1)return;const{resourceCount:m,errorCount:g,longTaskCount:_}=c.eventCounts,x={duration:u&&Ce(o.timeStamp,u),startClocks:o,id:i,frustrationTypes:d,counts:{resourceCount:m,errorCount:g,longTaskCount:_},events:f??[s],event:s,...r};e.notify(0,x),l=2},discard:()=>{h(),l=2}}}function Jy(e,t){const{isRage:n}=zy(e,t);n?(e.forEach(r=>r.discard()),t.stop(ye()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function Xy(e,t,n,r,s){e.subscribe(0,a=>e.notify(12,Tp(a))),t.register(0,({startTime:a,eventType:c})=>{if(c!=="error"&&c!=="resource"&&c!=="long_task")return;const l=i.findActionId(a);if(l)return{type:c,action:{id:l}}});let i={findActionId:q},o=q;return s.trackUserInteractions&&({actionContexts:i,stop:o}=Gy(e,n,r,s)),{addAction:a=>{e.notify(12,Tp(a))},actionContexts:i,stop:o}}function Tp(e){const t=Js(e)?{action:{id:e.id,loading_time:ep(B(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:void 0,n=at({action:{id:Ee(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Js(e)?e.duration:void 0,s=Js(e)?void 0:e.context,i=Js(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:s,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:i}}function Js(e){return e.type!=="custom"}function Qy(e){const t=r2([xs.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function ew(e,t){const n=eb(e,[Pr.cspViolation,Pr.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function tw(e,t){const n=new Q;return Qy(n),Y0(n),ew(t,n),n.subscribe(r=>e.notify(14,{error:r})),nw(e)}function nw(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=at(t.context,n),e.notify(12,{customerContext:n,...rw(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:s,context:i})=>{const o=Wt(t)?jt(t):void 0,a=rd({stackTrace:o,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:"Provided",source:Bn.CUSTOM,handling:"handled"});e.notify(14,{customerContext:i,error:a})}}}function rw(e){const t={date:e.startClocks.timeStamp,error:{id:Ee(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:"error"},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const Ap=new WeakSet;function sw(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!Ap.has(r)).filter(r=>Wd(r)&&qd(r)).filter(r=>iw(r,e.startClocks.relative,kp({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Ap.add(n[0]),n[0].toJSON()}function kp(e){return kn(e.startTime,e.duration)}function iw(e,t,n){return e.startTime>=t-1&&kp(e)<=kn(n,1)}const ow=2*Be;function aw(e){const t=cw(e)||lw(e);if(!(!t||t.traceTime<=tt()-ow))return t.traceId}function cw(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return Rp(t&&t.content,n&&n.content)}function lw(e){const t=uw(e);if(t)return Rp(xr(t,"trace-id"),xr(t,"trace-time"))}function Rp(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function uw(e){for(let t=0;t<e.childNodes.length;t+=1){const n=Pp(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=Pp(n);if(r)return r;if(!rp(n))break}}function Pp(e){if(e&&my(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Op(){if(fn(J.NAVIGATION)){const n=performance.getEntriesByType(J.NAVIGATION)[0];if(n)return n}const e=dw(),t={entryType:J.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function dw(){const e={},t=performance.timing;for(const n in t)if(Sr(t[n])){const r=n,s=t[r];e[r]=s===0?0:ga(s)}return e}function pw(e,t,n=Op){$a(e,"interactive",()=>{const r=n(),s=Object.assign(r.toJSON(),{entryType:J.RESOURCE,initiatorType:zd,duration:r.responseEnd,traceId:aw(document),toJSON:()=>({...s,toJSON:void 0})});t(s)})}function fw(e,t,n,r=n2(),s=pw){e.subscribe(8,a=>{o(()=>hw(a,t,n))});const i=yt(t,{type:J.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)X2(c)||o(()=>Lp(c,t))});s(t,a=>{o(()=>Lp(a,t))});function o(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{i.unsubscribe()}}}function hw(e,t,n){const r=sw(e),s=r?As(r.startTime):e.startClocks,i=mw(e,t);if(!t.trackResources&&!i)return;const o=e.type==="xhr"?"xhr":"fetch",a=r?Np(r):void 0,c=r?jd(r):bw(n,s,e.duration),l=at({date:s.timeStamp,resource:{id:Ee(),type:o,duration:B(c),method:e.method,status_code:e.status,protocol:r&&Gd(r),url:Zd(e.url)?Jd(e.url):e.url,delivery_type:r&&Kd(r)},type:"resource",_dd:{discarded:!t.trackResources}},i,a);return{startTime:s.relative,duration:c,rawRumEvent:l,domainContext:{performanceEntry:r,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error,isAborted:e.isAborted,handlingStack:e.handlingStack}}}function Lp(e,t){const n=As(e.startTime),r=gw(e,t);if(!t.trackResources&&!r)return;const s=J2(e),i=Np(e),o=jd(e),a=at({date:n.timeStamp,resource:{id:Ee(),type:s,duration:B(o),url:e.name,status_code:yw(e.responseStatus),protocol:Gd(e),delivery_type:Kd(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,i);return{startTime:n.relative,duration:o,rawRumEvent:a,domainContext:{performanceEntry:e}}}function Np(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...ty(e),...Q2(e)}}}function mw(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function gw(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Ld().toString(),rule_psr:t.rulePsr}}}function bw(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function yw(e){return e===0?void 0:e}function ww(e,t,n){const{stop:r,eventCounts:s}=tp({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:n});return{stop:r,eventCounts:s}}const vw=10*Be;function Sw(e,t,n){return{stop:yt(e,{type:J.PAINT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.name==="first-contentful-paint"&&o.startTime<t.timeStamp&&o.startTime<vw);i&&n(i.startTime)}).unsubscribe}}function _w(e,t,n){const r=yt(e,{type:J.FIRST_INPUT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.startTime<t.timeStamp);if(i){const o=Ce(i.startTime,i.processingStart);let a;i.target&&jn(i.target)&&(a=Dr(i.target,e.actionNameAttribute)),n({delay:o>=0?o:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function Cw(e,t,n=Op){return Iw(e,()=>{const r=n();xw(r)||t(Ew(r))})}function Ew(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=nt()?e.responseStart:void 0}}function xw(e){return e.loadEventEnd<=0}function Iw(e,t){let n;const{stop:r}=$a(e,"complete",()=>{n=we(()=>t())});return{stop:()=>{r(),Ue(n)}}}const Tw=10*Be;function Aw(e,t,n,r){let s=1/0;const{stop:i}=Ve(e,n,["pointerdown","keydown"],c=>{s=c.timeStamp},{capture:!0,once:!0});let o=0;const a=yt(e,{type:J.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const l=L1(c,u=>u.entryType===J.LARGEST_CONTENTFUL_PAINT&&u.startTime<s&&u.startTime<t.timeStamp&&u.startTime<Tw&&u.size>o);if(l){let u;l.element&&(u=Dr(l.element,e.actionNameAttribute)),r({value:l.startTime,targetSelector:u,resourceUrl:kw(l)}),o=l.size}});return{stop:()=>{i(),a.unsubscribe()}}}function kw(e){return e.url===""?void 0:e.url}function Mp(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:q};if(fn(J.VISIBILITY_STATE)){const s=performance.getEntriesByType(J.VISIBILITY_STATE).find(i=>i.name==="hidden");if(s)return{timeStamp:s.startTime,stop:q}}let n=1/0;const{stop:r}=Ve(e,t,["pagehide","visibilitychange"],s=>{(s.type==="pagehide"||document.visibilityState==="hidden")&&(n=s.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Rw(e,t,n){const r={},{stop:s}=Cw(e,u=>{t(u.loadEvent),r.navigationTimings=u,n()}),i=Mp(e),{stop:o}=Sw(e,i,u=>{r.firstContentfulPaint=u,n()}),{stop:a}=Aw(e,i,window,u=>{r.largestContentfulPaint=u,n()}),{stop:c}=_w(e,i,u=>{r.firstInput=u,n()});function l(){s(),o(),a(),c(),i.stop()}return{stop:l,initialViewMetrics:r}}function Pw(e,t,n){if(!Dw())return{stop:q};let r=0,s;n({value:0});const i=Mw(),o=yt(e,{type:J.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const l of a){if(l.hadRecentInput||l.startTime<t)continue;const{cumulatedValue:u,isMaxValue:d}=i.update(l);if(d){const p=Ow(l.sources);s={target:p!=null&&p.node?new WeakRef(p.node):void 0,time:Ce(t,l.startTime),previousRect:p==null?void 0:p.previousRect,currentRect:p==null?void 0:p.currentRect,devicePixelRatio:window.devicePixelRatio}}if(u>r){r=u;const p=(c=s==null?void 0:s.target)===null||c===void 0?void 0:c.deref();n({value:Ts(r,4),targetSelector:p&&Dr(p,e.actionNameAttribute),time:s==null?void 0:s.time,previousRect:s!=null&&s.previousRect?Dp(s.previousRect):void 0,currentRect:s!=null&&s.currentRect?Dp(s.currentRect):void 0,devicePixelRatio:s==null?void 0:s.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Ow(e){return e.find(t=>!!t.node&&jn(t.node))}function Dp({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const Lw=5*ke,Nw=ke;function Mw(){let e=0,t,n,r=0;return{update:s=>{const i=t===void 0||s.startTime-n>=Nw||s.startTime-t>=Lw;let o;return i?(t=n=s.startTime,r=e=s.value,o=!0):(e+=s.value,n=s.startTime,o=s.value>r,o&&(r=s.value)),{cumulatedValue:e,isMaxValue:o}}}}function Dw(){return fn(J.LAYOUT_SHIFT)&&"WeakRef"in window}let Xs,Fp=0,tc=1/0,nc=0;function Fw(){"interactionCount"in performance||Xs||(Xs=new window.PerformanceObserver($(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(tc=Math.min(tc,n.interactionId),nc=Math.max(nc,n.interactionId),Fp=(nc-tc)/7+1)})})),Xs.observe({type:"event",buffered:!0,durationThreshold:0}))}const Bp=()=>Xs?Fp:window.performance.interactionCount||0,Up=10,Bw=1*Be;function Uw(e,t,n){if(!zw())return{getInteractionToNextPaint:()=>{},setViewEnd:q,stop:q};const{getViewInteractionCount:r,stopViewInteractionCount:s}=Vw(n);let i=1/0;const o=$w(r);let a=-1,c,l;function u(h){for(const m of h)m.interactionId&&m.startTime>=t&&m.startTime<=i&&o.process(m);const f=o.estimateP98Interaction();f&&f.duration!==a&&(a=f.duration,l=Ce(t,f.startTime),c=Wy(f.startTime),!c&&f.target&&jn(f.target)&&(c=Dr(f.target,e.actionNameAttribute)))}const d=yt(e,{type:J.FIRST_INPUT,buffered:!0}).subscribe(u),p=yt(e,{type:J.EVENT,durationThreshold:40,buffered:!0}).subscribe(u);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,Bw),targetSelector:c,time:l};if(r())return{value:0}},setViewEnd:h=>{i=h,s()},stop:()=>{p.unsubscribe(),d.unsubscribe()}}}function $w(e){const t=[];function n(){t.sort((r,s)=>s.duration-r.duration).splice(Up)}return{process(r){const s=t.findIndex(o=>r.interactionId===o.interactionId),i=t[t.length-1];s!==-1?r.duration>t[s].duration&&(t[s]=r,n()):(t.length<Up||r.duration>i.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function Vw(e){Fw();const t=e==="initial_load"?0:Bp();let n={stopped:!1};function r(){return Bp()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function zw(){return fn(J.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function Hw(e,t,n,r,s,i,o){let a=s==="initial_load",c=!0;const l=[],u=Mp(r);function d(){if(!c&&!a&&l.length>0){const h=Math.max(...l);h<u.timeStamp&&o(h)}}const{stop:p}=Za(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&l.push(Ce(i.timeStamp,h.end)),d())});return{stop:()=>{p(),u.stop()},setLoadEvent:h=>{a&&(a=!1,l.push(h),d())}}}function $p(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function rc(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let sc;function Vp(e){return sc||(sc=jw(e)),sc}function jw(e){return new Q(t=>{const{throttled:n}=zt(()=>{t.notify(Qs())},200);return oe(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Qs(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Ww=ke;function qw(e,t,n,r=Kw(e)){let s=0,i=0,o=0;const a=r.subscribe(({scrollDepth:c,scrollTop:l,scrollHeight:u})=>{let d=!1;if(c>s&&(s=c,d=!0),u>i){i=u;const p=nt();o=Ce(t.relative,p),d=!0}d&&n({maxDepth:Math.min(s,i),maxDepthScrollTop:l,maxScrollHeight:i,maxScrollHeightTime:o})});return{stop:()=>a.unsubscribe()}}function Gw(){const e=rc(),{height:t}=Qs(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function Kw(e,t=Ww){return new Q(n=>{function r(){n.notify(Gw())}if(window.ResizeObserver){const s=zt(r,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver($(s.throttled));i&&o.observe(i);const a=oe(e,window,"scroll",s.throttled,{passive:!0});return()=>{s.cancel(),o.disconnect(),a.stop()}}})}function Yw(e,t,n,r,s,i,o){const a={},{stop:c,setLoadEvent:l}=Hw(e,t,n,r,i,o,m=>{a.loadingTime=m,s()}),{stop:u}=qw(r,o,m=>{a.scroll=m}),{stop:d}=Pw(r,o.relative,m=>{a.cumulativeLayoutShift=m,s()}),{stop:p,getInteractionToNextPaint:h,setViewEnd:f}=Uw(r,o.relative,i);return{stop:()=>{c(),d(),u()},stopINPTracking:p,setLoadEvent:l,setViewEnd:f,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const Zw=3e3,Jw=5*Be,Xw=5*Be;function Qw(e,t,n,r,s,i,o,a){const c=new Set;let l=d("initial_load",Pu(),a);p();let u;o&&(u=h(i));function d(f,m,g){const _=e5(t,n,r,s,e,f,m,g);return c.add(_),_.stopObservable.subscribe(()=>{c.delete(_)}),_}function p(){t.subscribe(10,()=>{l=d("route_change",void 0,{name:l.name,service:l.service,version:l.version,context:l.contextManager.getContext()})}),t.subscribe(9,()=>{l.end({sessionIsActive:!1})})}function h(f){return f.subscribe(({oldLocation:m,newLocation:g})=>{n5(m,g)&&(l.end(),l=d("route_change"))})}return{addTiming:(f,m=ye())=>{l.addTiming(f,m)},startView:(f,m)=>{l.end({endClocks:m}),l=d("route_change",m,f)},setViewContext:f=>{l.contextManager.setContext(f)},setViewContextProperty:(f,m)=>{l.contextManager.setContextProperty(f,m)},setViewName:f=>{l.setViewName(f)},getViewContext:()=>l.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l.end(),c.forEach(f=>f.stop())}}}function e5(e,t,n,r,s,i,o=Ne(),a){const c=Ee(),l=new Q,u={};let d=0,p;const h=Er(s),f=js();let m=!0,g=a==null?void 0:a.name;const _=(a==null?void 0:a.service)||r.service,x=(a==null?void 0:a.version)||r.version,w=a==null?void 0:a.context;w&&f.setContext(w);const C={id:c,name:g,startClocks:o,service:_,version:x,context:w};e.notify(1,C),e.notify(2,C);const{throttled:N,cancel:A}=zt(ae,Zw,{leading:!1}),{setLoadEvent:b,setViewEnd:P,stop:T,stopINPTracking:R,getCommonViewMetrics:k}=Yw(e,t,n,r,re,i,o),{stop:O,initialViewMetrics:L}=i==="initial_load"?Rw(r,b,re):{stop:q,initialViewMetrics:{}},{stop:M,eventCounts:ie}=ww(e,c,re),ee=Rn(ae,Jw),Pe=e.subscribe(11,G=>{G.reason===zn.UNLOADING&&ae()});ae(),f.changeObservable.subscribe(re);function he(){e.notify(3,{id:c,name:g,context:f.getContext(),startClocks:o})}function re(){he(),N()}function ae(){A(),he(),d+=1;const G=p===void 0?ye():p.timeStamp;e.notify(4,{customTimings:u,documentVersion:d,id:c,name:g,service:_,version:x,context:f.getContext(),loadingType:i,location:h,startClocks:o,commonViewMetrics:k(),initialViewMetrics:L,duration:Ce(o.timeStamp,G),isActive:p===void 0,sessionIsActive:m,eventCounts:ie})}return{get name(){return g},service:_,version:x,contextManager:f,stopObservable:l,end(G={}){var ue,ge;p||(p=(ue=G.endClocks)!==null&&ue!==void 0?ue:Ne(),m=(ge=G.sessionIsActive)!==null&&ge!==void 0?ge:!0,e.notify(5,{endClocks:p}),e.notify(6,{endClocks:p}),Rs(ee),P(p.relative),T(),Pe.unsubscribe(),ae(),we(()=>{this.stop()},Xw))},stop(){O(),M(),R(),l.notify()},addTiming(G,ue){if(p)return;const ge=S1(ue)?ue:Ce(o.timeStamp,ue);u[t5(G)]=ge,re()},setViewName(G){g=G,ae()}}}function t5(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&W.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function n5(e,t){return e.pathname!==t.pathname||!r5(t.hash)&&zp(t.hash)!==zp(e.hash)}function r5(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function zp(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function s5(e,t,n,r,s,i,o,a,c,l){return e.subscribe(4,u=>e.notify(12,i5(u,n,a))),t.register(0,({startTime:u,eventType:d})=>{const{service:p,version:h,id:f,name:m,context:g}=c.findView(u);return{type:d,service:p,version:h,context:g,view:{id:f,name:m}}}),Qw(r,e,s,i,n,o,!n.trackViewsManually,l)}function i5(e,t,n){var r,s,i,o,a,c,l,u,d,p,h,f,m,g,_,x,w,C;const N=n.getReplayStats(e.id),A=(s=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||s===void 0?void 0:s.devicePixelRatio,b={_dd:{document_version:e.documentVersion,replay_stats:N,cls:A?{device_pixel_ratio:A}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:B((o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:B((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:B((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domComplete),dom_content_loaded:B((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domContentLoaded),dom_interactive:B((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:B(e.initialViewMetrics.firstContentfulPaint),first_input_delay:B((p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.delay),first_input_time:B((h=e.initialViewMetrics.firstInput)===null||h===void 0?void 0:h.time),first_input_target_selector:(f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.targetSelector,interaction_to_next_paint:B((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.value),interaction_to_next_paint_time:B((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.time),interaction_to_next_paint_target_selector:(_=e.commonViewMetrics.interactionToNextPaint)===null||_===void 0?void 0:_.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:B((x=e.initialViewMetrics.largestContentfulPaint)===null||x===void 0?void 0:x.value),largest_contentful_paint_target_selector:(w=e.initialViewMetrics.largestContentfulPaint)===null||w===void 0?void 0:w.targetSelector,load_event:B((C=e.initialViewMetrics.navigationTimings)===null||C===void 0?void 0:C.loadEvent),loading_time:ep(B(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:o5(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:B(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:B(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:N?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return tn(e.customTimings)||(b.view.custom_timings=E1(e.customTimings,B)),{rawRumEvent:b,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function o5({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:s}){return{cls:e&&{score:e.value,timestamp:B(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:B(n)},fid:r&&{duration:B(r.delay),timestamp:B(r.time),target_selector:r.targetSelector},inp:t&&{duration:B(t.value),timestamp:B(t.time),target_selector:t.targetSelector},lcp:s&&{timestamp:B(s.value),target_selector:s.targetSelector,resource_url:s.resourceUrl}}}const a5="rum";function c5(e,t,n){const r=vb(e,a5,s=>u5(e,s),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:s,newState:i})=>{if(!s.forcedReplay&&i.forcedReplay){const o=r.findSession();o&&(o.isReplayForced=!0)}}),{findTrackedSession:s=>{const i=r.findSession(s);if(!(!i||!Hp(i.trackingType)))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function l5(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Cd("records")?1:0};return{findTrackedSession:()=>e,expire:q,expireObservable:new Q,setForcedReplay:q}}function u5(e,t){let n;return d5(t)?n=t:$t(e.sessionSampleRate)?$t(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:Hp(n)}}function d5(e){return e==="0"||e==="1"||e==="2"}function Hp(e){return e==="2"||e==="1"}function p5(e,t,n,r,s,i,o){const a=e.replica,c=$b(e,{endpoint:e.rumEndpointBuilder,encoder:o(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:l=>at(l,{application:{id:a.applicationId}}),encoder:o(3)},r,s,i);return t.subscribe(13,l=>{l.type==="view"?c.upsert(l,l.view.id):c.add(l)}),n.subscribe(l=>c.add(l,pb(e))),c}function f5(e){const t=Vn();e.subscribe(13,n=>{t.send("rum",n)})}const h5=rn;function m5(e,t,n,r){const s=$n({expireDelay:h5});let i;e.subscribe(1,({startClocks:c})=>{const l=r.href;s.add(a({url:l,referrer:i||document.referrer}),c.relative),i=l}),e.subscribe(6,({endClocks:c})=>{s.closeActive(c.relative)});const o=n.subscribe(({newLocation:c})=>{const l=s.find();if(l){const u=nt();s.closeActive(u),s.add(a({url:c.href,referrer:l.referrer}),u)}});function a({url:c,referrer:l}){return{url:c,referrer:l}}return t.register(0,({startTime:c,eventType:l})=>{const{url:u,referrer:d}=s.find(c);return{type:l,view:{url:u,referrer:d}}}),{findUrl:c=>s.find(c),getAllEntries:()=>s.getAllEntries(),getDeletedEntries:()=>s.getDeletedEntries(),stop:()=>{o.unsubscribe(),s.stop()}}}function g5(e,t){let n=Er(t);return new Q(r=>{const{stop:s}=b5(e,o),{stop:i}=y5(e,o);function o(){if(n.href===t.href)return;const a=Er(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{s(),i()}})}function b5(e,t){const{stop:n}=$e(jp("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:r}=$e(jp("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:s}=oe(e,window,"popstate",t);return{stop:()=>{n(),r(),s()}}}function y5(e,t){return oe(e,window,"hashchange",t)}function jp(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const w5=rn;function v5(e,t,n){const r=$n({expireDelay:w5});return e.subscribe(1,({startClocks:s})=>{r.add({},s.relative)}),e.subscribe(6,({endClocks:s})=>{r.closeActive(s.relative)}),t.register(0,({startTime:s,eventType:i})=>{if(!n.trackFeatureFlagsForEvents.concat(["view","error"]).includes(i))return;const a=r.find(s);if(!(!a||tn(a)))return{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(s,i)=>{const o=r.find();o&&(o[s]=i)}}}const S5=10*ke;let qn,ic;function _5(e,t,n,r){t.enabled&&$t(e.customerDataTelemetrySampleRate)&&(Gp(),ic=!1,n.subscribe(13,()=>{ic=!0}),r.subscribe(({bytesCount:i,messagesCount:o})=>{ic&&(qn.batchCount+=1,qp(qn.batchBytesCount,i),qp(qn.batchMessagesCount,o))}),Rn(C5,S5))}function C5(){qn.batchCount!==0&&(Rt("Customer data measures",qn),Gp())}function Wp(){return{min:1/0,max:0,sum:0}}function qp(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Gp(){qn={batchCount:0,batchBytesCount:Wp(),batchMessagesCount:Wp()}}const E5=4e3,x5=500,I5=rn;function T5(e,t,n=x5){const r=$n({expireDelay:I5,maxEntries:E5});let s;o(Kp(),nt());const{stop:i}=Ve(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{o(k5(c),c.timeStamp)},{capture:!0});function o(c,l=nt()){c!==s&&(s=c,r.closeActive(l),r.add({state:s,startTime:l},l))}function a(c,l,u){return r.findAll(l,u).some(d=>d.state===c)}return e.register(0,({startTime:c,duration:l=0,eventType:u})=>{if(u==="view"){const d=r.findAll(c,l);return{type:u,_dd:{page_states:A5(d,c,n)}}}if(u==="action"||u==="error")return{type:u,view:{in_foreground:a("active",c,0)}}}),{wasInPageStateDuringPeriod:a,addPageState:o,stop:()=>{i(),r.stop()}}}function A5(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:s})=>({state:r,start:B(Ce(t,s))}))}function k5(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Kp()}function Kp(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function R5(e){let t;const n=requestAnimationFrame($(()=>{t=Qs()})),r=Vp(e).subscribe(s=>{t=s}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const P5=ke;function O5(e){return new Q(t=>L5(e,n=>t.notify(n)))}function L5(e,t){const n=xr(document.cookie,e),r=Rn(()=>{const s=xr(document.cookie,e);s!==n&&t(s)},P5);return()=>Rs(r)}const Yp="datadog-ci-visibility-test-execution-id";function N5(e,t=O5(Yp)){var n;let r=Ht(Yp)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const s=t.subscribe(i=>{r=i});return e.register(0,({eventType:i})=>{if(typeof r=="string")return{type:i,session:{type:"ci_test"},ci_test:{test_execution_id:r}}}),{stop:()=>{s.unsubscribe()}}}function M5(e,t){const n=yt(t,{type:J.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const s of r){const i=As(s.startTime),o={date:i.timeStamp,long_task:{id:Ee(),entry_type:"long-animation-frame",duration:B(s.duration),blocking_duration:B(s.blockingDuration),first_ui_event_timestamp:B(s.firstUIEventTimestamp),render_start:B(s.renderStart),style_and_layout_start:B(s.styleAndLayoutStart),start_time:B(s.startTime),scripts:s.scripts.map(a=>({duration:B(a.duration),pause_duration:B(a.pauseDuration),forced_style_and_layout_duration:B(a.forcedStyleAndLayoutDuration),start_time:B(a.startTime),execution_start:B(a.executionStart),source_url:a.sourceURL,source_function_name:a.sourceFunctionName,source_char_position:a.sourceCharPosition,invoker:a.invoker,invoker_type:a.invokerType,window_attribution:a.windowAttribution}))},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:o,startTime:i.relative,duration:s.duration,domainContext:{performanceEntry:s}})}});return{stop:()=>n.unsubscribe()}}function D5(e,t){const n=yt(t,{type:J.LONG_TASK,buffered:!0}).subscribe(r=>{for(const s of r){if(s.entryType!==J.LONG_TASK||!t.trackLongTasks)break;const i=As(s.startTime),o={date:i.timeStamp,long_task:{id:Ee(),entry_type:"long-task",duration:B(s.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:o,startTime:i.relative,duration:s.duration,domainContext:{performanceEntry:s}})}});return{stop(){n.unsubscribe()}}}function F5(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const s=(e[t]||[]).map(i=>i(n));return at(...s)}}}function B5(e){e.register(0,({eventType:t})=>{const n=m2(),r=g2();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Ad()}}})}function U5(e,t,n){const r=Da(e),s=n(r);return Ca(t).forEach(([i,o])=>oc(e,r,i.split(/\.|(?=\[\])/),o)),s}function oc(e,t,n,r){const[s,...i]=n;if(s==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((o,a)=>oc(o,t[a],i,r));return}if(!(!Zp(e)||!Zp(t))){if(i.length>0)return oc(e[s],t[s],i,r);$5(e,s,t[s],r)}}function $5(e,t,n,r){const s=ln(n);s===r?e[t]=de(n):r==="object"&&(s==="undefined"||s==="null")&&(e[t]={})}function Zp(e){return ln(e)==="object"}const Gn={"view.name":"string","view.url":"string","view.referrer":"string"},Kn={context:"object"},ac={service:"string",version:"string"};let Jp;function V5(e,t,n,r,s,i,o,a,c){Jp={view:{"view.performance.lcp.resource_url":"string",...Kn,...Gn},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...Kn,...Gn,...ac},resource:{"resource.url":"string",...$s(cn.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...Kn,...Gn,...ac},action:{"action.target.name":"string",...Kn,...Gn,...ac},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...Kn,...Gn},vital:{...Kn,...Gn}};const l={error:Ua("error",e.eventRateLimiterThreshold,c),action:Ua("action",e.eventRateLimiterThreshold,c),vital:Ua("vital",e.eventRateLimiterThreshold,c)};t.subscribe(12,({startTime:u,duration:d,rawRumEvent:p,domainContext:h,customerContext:f})=>{const m=s.findView(u),g=i.findUrl(u),_=r.findTrackedSession(u);if(_&&m&&!g&&$s(cn.MISSING_URL_CONTEXT_TELEMETRY)&&Rt("Missing URL entry",{debug:{eventType:p.type,startTime:u,urlEntries:i.getAllEntries(),urlDeletedEntries:i.getDeletedEntries(),viewEntries:s.getAllEntries(),viewDeletedEntries:s.getDeletedEntries()}}),_&&m&&g){const x=a(),w={_dd:{format_version:2,drift:w1(),configuration:{session_sample_rate:Ts(e.sessionSampleRate,3),session_replay_sample_rate:Ts(e.sessionReplaySampleRate,3)},browser_sdk_version:dn()?"6.6.3":void 0},application:{id:e.applicationId},date:ye(),source:"browser",session:{id:_.id,type:"user"},display:o.get(),connectivity:ud(),context:x.context},C=at(w,n.triggerHook(0,{eventType:p.type,startTime:u,duration:d}),{context:f},p);"has_replay"in C.session||(C.session.has_replay=x.hasReplay),C.type==="view"&&(C.session.sampled_for_replay=_.sessionReplay===1),_.anonymousId&&!x.user.anonymous_id&&e.trackAnonymousUser&&(x.user.anonymous_id=_.anonymousId),tn(x.user)||(C.usr=x.user),!tn(x.account)&&x.account.id&&(C.account=x.account),z5(C,e.beforeSend,h,l)&&(tn(C.context)&&delete C.context,t.notify(13,C))}})}function z5(e,t,n,r){var s;if(t){const o=U5(e,Jp[e.type],a=>t(a,n));if(o===!1&&e.type!=="view")return!1;o===!1&&W.warn("Can't dismiss view events using beforeSend!")}return!((s=r[e.type])===null||s===void 0?void 0:s.isLimitReached())}function H5(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function j5(e,t,n,r,s,i,o){const a=[],c=new G2,l=F5();c.subscribe(13,ce=>Ma("rum",ce));const u=W5(e);u.setContextProvider(()=>{var ce,rr;return{application:{id:e.applicationId},session:{id:(ce=f.findTrackedSession())===null||ce===void 0?void 0:ce.id},view:{id:(rr=x.findView())===null||rr===void 0?void 0:rr.id},action:{id:k.findActionId()}}});const d=ce=>{c.notify(14,{error:ce}),Rt("Error reported to customer",{"error.message":ce.message})},p=Fb(e),h=p.subscribe(ce=>{c.notify(11,ce)});a.push(()=>h.unsubscribe());const f=dn()?l5():c5(e,c,i);if(dn())f5(c);else{const ce=p5(e,c,u.observable,d,p,f.expireObservable,s);a.push(()=>ce.stop()),_5(e,u,c,ce.flushObservable)}const m=j2(),g=g5(e,location),_=T5(l,e),x=Y2(c),w=m5(c,l,g,location),C=v5(c,l,e),{observable:N,stop:A}=W2();a.push(A);const b=F2(e),P=B2(e),T=U2(e),R=()=>H5(b,P,T,t),{actionContexts:k,addAction:O,stop:L}=q5(c,l,e,f,_,m,N,w,x,R,d);a.push(L),db();const{addTiming:M,startView:ie,setViewName:ee,setViewContext:Pe,setViewContextProperty:he,getViewContext:re,stop:ae}=s5(c,l,e,location,m,N,g,t,x,r);a.push(ae);const{stop:G}=fw(c,e,_);if(a.push(G),e.trackLongTasks)if(fn(J.LONG_ANIMATION_FRAME)){const{stop:ce}=M5(c,e);a.push(ce)}else D5(c,e);const{addError:ue}=tw(c,e);ry(c,e,f,R);const ge=y2(c,_,o),Zt=q2(e.applicationId,f,x,k,w);return a.push(()=>n.stop()),{addAction:O,addError:ue,addTiming:M,addFeatureFlagEvaluation:C.addFeatureFlagEvaluation,startView:ie,setViewContext:Pe,setViewContextProperty:he,getViewContext:re,setViewName:ee,lifeCycle:c,viewHistory:x,session:f,stopSession:()=>f.expire(),getInternalContext:Zt.get,startDurationVital:ge.startDurationVital,stopDurationVital:ge.stopDurationVital,addDurationVital:ge.addDurationVital,globalContext:b,userContext:P,accountContext:T,stop:()=>{a.forEach(ce=>ce())}}}function W5(e){const t=lb("browser-rum-sdk",e);if(dn()){const n=Vn();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function q5(e,t,n,r,s,i,o,a,c,l,u){const d=Xy(e,t,i,o,n),p=R5(n),h=N5(t);return B5(t),V5(n,e,t,r,c,a,p,l,u),{pageStateHistory:s,addAction:d.addAction,actionContexts:d.actionContexts,stop:()=>{d.stop(),h.stop(),p.stop(),c.stop(),s.stop(),a.stop()}}}function G5(e,{session:t,viewContext:n,errorType:r}){const s=t?t.id:"no-session-id",i=[];r!==void 0&&i.push(`error-type=${r}`),n&&(i.push(`seed=${n.id}`),i.push(`from=${n.startClocks.timeStamp}`));const o=K5(e),a=`/rum/replay/sessions/${s}`;return`${o}${a}?${i.join("&")}`}function K5(e){const t=e.site,n=e.subdomain||Y5(e);return`https://${n?`${n}.`:""}${t}`}function Y5(e){switch(e.site){case an:case c0:return"app";case Xu:return"dd";default:return}}const Z5=1e3;let rt;function J5(e){return ei(e).segments_count}function X5(e){ei(e).segments_count+=1}function Q5(e){ei(e).records_count+=1}function e3(e,t){ei(e).segments_total_raw_size+=t}function t3(e){return rt==null?void 0:rt.get(e)}function ei(e){rt||(rt=new Map);let t;return rt.has(e)?t=rt.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},rt.set(e,t),rt.size>Z5&&n3()),t}function n3(){if(!rt)return;const e=rt.keys().next().value;e&&rt.delete(e)}function Xp(e,t,n){let r=0,s=[],i,o=0;const a=[],{stop:c}=oe(e,t,"message",({data:d})=>{if(d.type!=="wrote"||d.streamId!==n)return;r+=d.additionalBytesCount,s.push(d.result),i=d.trailer;const p=a.shift();p&&p.id===d.id?p.writeCallback?p.writeCallback(d.result.byteLength):p.finishCallback&&p.finishCallback():(c(),Rt("Worker responses received out of order."))});function l(){const d=s.length===0?new Uint8Array(0):C1(s.concat(i)),p={rawBytesCount:r,output:d,outputBytesCount:d.byteLength,encoding:"deflate"};return r=0,s=[],p}function u(){o>0&&(t.postMessage({action:"reset",streamId:n}),o=0)}return{isAsync:!0,get isEmpty(){return o===0},write(d,p){t.postMessage({action:"write",id:o,data:d,streamId:n}),a.push({id:o,writeCallback:p,data:d}),o+=1},finish(d){u(),a.length?(a.forEach(p=>{delete p.writeCallback}),a[a.length-1].finishCallback=()=>d(l())):d(l())},finishSync(){u();const d=a.map(p=>(delete p.writeCallback,delete p.finishCallback,p.data)).join("");return{...l(),pendingData:d}},estimateEncodedBytesCount(d){return d.length/8},stop(){c()}}}function cc({configuredUrl:e,error:t,source:n,scriptType:r}){if(W.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&r3(t.message)){let s;e?s=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:s="Please make sure CSP is correctly configured.",W.error(`${s} See documentation at ${Is}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&Fa(t)}function r3(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const s3=30*ke;function Qp(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([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]),n=new Uint8Array([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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},et=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-J)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=L(s.adler,h,o,l):2===s.state.wrap&&(s.adler=T(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},at=function(t,e){for(var a,n;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},nt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var it=[new rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(et(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)})),new rt(4,4,8,4,at),new rt(4,5,16,8,at),new rt(4,6,32,32,at),new rt(4,4,16,16,nt),new rt(8,16,32,32,nt),new rt(8,16,128,128,nt),new rt(8,32,128,256,nt),new rt(32,128,258,1024,nt),new rt(32,258,258,4096,nt)];function st(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var ht=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=it[e.level].max_lazy,e.good_match=it[e.level].good_length,e.nice_match=it[e.level].nice_length,e.max_chain_length=it[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},lt=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(et(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(et(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):it[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},_t=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},ot=new Uint8Array(256),dt=0;dt<256;dt++)ot[dt]=dt>=252?6:dt>=248?5:dt>=240?4:dt>=224?3:dt>=192?2:1;ot[254]=ot[254]=1;var ut=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ft=Object.prototype.toString;function ct(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new st;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,ht(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ft.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,et(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,et(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function pt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function gt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}ct.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ft.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=lt(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=_t(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},ct.prototype.onData=function(t){this.chunks.push(t)},ct.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",(n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.6.3"};case"write":{let n=e.get(a.streamId);n||(n=new ct,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:gt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){pt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){pt(e,t)}}()})();'])))}let pe={status:0};function ef(e,t,n,r=Qp){switch(pe.status===0&&i3(e,t,r),pe.status){case 1:return pe.initializationFailureCallbacks.push(n),pe.worker;case 3:return pe.worker}}function tf(){return pe.status}function i3(e,t,n=Qp){try{const r=n(e),{stop:s}=oe(e,r,"error",a=>{lc(e,t,a)}),{stop:i}=oe(e,r,"message",({data:a})=>{a.type==="errored"?lc(e,t,a.error,a.streamId):a.type==="initialized"&&a3(a.version)});r.postMessage({action:"init"}),we(()=>o3(t),s3),pe={status:1,worker:r,stop:()=>{s(),i()},initializationFailureCallbacks:[]}}catch(r){lc(e,t,r)}}function o3(e){pe.status===1&&(W.error(`${e} failed to start: a timeout occurred while initializing the Worker`),pe.initializationFailureCallbacks.forEach(t=>t()),pe={status:2})}function a3(e){pe.status===1&&(pe={status:3,worker:pe.worker,stop:pe.stop,version:e})}function lc(e,t,n,r){pe.status===1||pe.status===0?(cc({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),pe.status===1&&pe.initializationFailureCallbacks.forEach(s=>s()),pe={status:2}):Fa(n,{worker_version:pe.status===3&&pe.version,stream_id:r})}function nf(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function c3(e,t,n,r){const s=t.findTrackedSession(),i=l3(s,r),o=n.findView();return G5(e,{viewContext:o,errorType:i,session:s})}function l3(e,t){if(!nf())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function u3(e,t,n,r,s,i){let o=0,a;t.subscribe(9,()=>{(o===2||o===3)&&(u(),o=1)}),t.subscribe(10,()=>{o===1&&l()});const c=async()=>{const[d]=await Promise.all([s(),Hb(e,"interactive")]);if(o!==2)return;const p=i();if(!p||!d){o=0;return}({stop:a}=d(t,e,n,r,p)),o=3};function l(d){const p=n.findTrackedSession();if(d3(p,d)){o=1;return}p3(o)||(o=2,c().catch(kt),f3(p,d)&&n.setForcedReplay())}function u(){o===3&&(a==null||a()),o=0}return{start:l,stop:u,getSessionReplayLink(){return c3(e,n,r,o!==0)},isRecording:()=>o===3}}function d3(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function p3(e){return e===2||e===3}function f3(e,t){return t&&t.force&&e.sessionReplay===0}function h3(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:q},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function m3(e,t){if(dn()&&!Cd("records")||!nf())return{start:q,stop:q,getReplayStats:()=>{},onRumStart:q,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=h3();return{start:i=>n.start(i),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:s,isRecording:()=>tf()===3&&n.isRecording(),getReplayStats:i=>tf()===3?t3(i):void 0};function s(i,o,a,c,l){let u;function d(){return u||(l??(l=ef(o,"Datadog Session Replay",()=>{n.stop()},t)),l&&(u=Xp(o,l,1))),u}n=u3(o,i,a,c,e,d),r(o)&&n.start()}}async function g3(e=b3){try{return await e()}catch(t){cc({error:t,source:"Recorder",scriptType:"module"})}}async function b3(){return(await Promise.resolve().then(()=>e_)).startRecording}function y3(){return bt().Profiler!==void 0}async function w3(e=v3){try{return await e()}catch(t){cc({error:t,source:"Profiler",scriptType:"module"})}}async function v3(){return(await Promise.resolve().then(()=>h_)).createRumProfiler}function S3(){let e;function t(n,r,s,i){!y3()||!$t(r.profilingSampleRate)||w3().then(o=>{if(!o){Rt("[DD_RUM] Failed to lazy load the RUM Profiler");return}e=o(r,n,s),e.start(i.findView())}).catch(kt)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(kt)}}}const _3=m3(g3),C3=S3(),Ze=z2(j5,_3,C3,{startDeflateWorker:ef,createDeflateEncoder:Xp});Q0(bt(),"DD_RUM",Ze);const nr=class nr{init(){if(nr.isInitialized){console.info("Tracker [DD]: already initialized");return}Ze.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:Le.getRuntimeConfig().MODE,version:Le.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),Ze.startView({name:"ap_cl_view_mounted"}),Ze.startSessionReplayRecording(),nr.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){Ze==null||Ze.addAction(t,n||{})}trackError(t,n){Ze==null||Ze.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof Ze.stopSessionReplayRecording=="function"&&Ze.stopSessionReplayRecording(),Ze.addAction("ap_cl_view_unmounted",{reason:"component_destroyed"}),nr.isInitialized=!1}filterEvents(t){var n,r,s;return!!(t.type==="view"&&((n=t.view.name)!=null&&n.startsWith("ap_cl_"))||t.type==="action"&&typeof((r=t.action.target)==null?void 0:r.name)=="string"&&t.action.target.name.startsWith("ap_cl_")||t.type==="error"&&((s=t.error)==null?void 0:s.source)==="custom")}};S(nr,"isInitialized",!1);let uc=nr,Yn=[];class xe{static init(t){if(!t){console.info("Tracking disabled");return}Yn=[new uc],Yn.forEach(n=>n.init())}static trackEvent(t,n){Yn.forEach(r=>r.track(t,n))}static trackError(t,n){Yn.forEach(r=>r.trackError(t,n))}static destroy(){Yn.forEach(t=>t.destroy()),Yn=[]}}const Se=class Se{static init(t,n){if(!t)throw console.error('AstroPay Payments Library: Missing "app-id". Call init function first.'),new Error("app-id is required for authentication.");if(Se.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}Se.token=t,xe.init((n==null?void 0:n.tracking)??!0),z.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),V.init({language:(n==null?void 0:n.language)??"en"}),Le.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),ut.init({appName:"ap-cl",baseURL:Le.getRuntimeConfig().API_BASE_URL,timeout:5e3}),xe.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),Se.isInitialized=!0}static registerComponent(t){Se.components.add(t)}static unregisterComponent(t){Se.components.delete(t)}static getToken(){if(!Se.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return Se.token}static destroy(){Se.isInitialized&&(Se.components.forEach(t=>t.destroy()),Se.components.clear(),Se.isInitialized=!1,xe.destroy(),Se.token="")}static isLibInitialized(){return Se.isInitialized}};S(Se,"isInitialized",!1),S(Se,"token"),S(Se,"components",new Set);let ct=Se;function rf(e,t){return function(){return e.apply(t,arguments)}}const{toString:E3}=Object.prototype,{getPrototypeOf:dc}=Object,{iterator:ti,toStringTag:sf}=Symbol,ni=(e=>t=>{const n=E3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lt=e=>(e=e.toLowerCase(),t=>ni(t)===e),ri=e=>t=>typeof t===e,{isArray:Zn}=Array,Jn=ri("undefined");function Br(e){return e!==null&&!Jn(e)&&e.constructor!==null&&!Jn(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const of=lt("ArrayBuffer");function x3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&of(e.buffer),t}const I3=ri("string"),ze=ri("function"),af=ri("number"),Ur=e=>e!==null&&typeof e=="object",T3=e=>e===!0||e===!1,si=e=>{if(ni(e)!=="object")return!1;const t=dc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(sf in e)&&!(ti in e)},A3=e=>{if(!Ur(e)||Br(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},k3=lt("Date"),R3=lt("File"),P3=lt("Blob"),O3=lt("FileList"),L3=e=>Ur(e)&&ze(e.pipe),N3=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=ni(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},M3=lt("URLSearchParams"),[D3,F3,B3,U3]=["ReadableStream","Request","Response","Headers"].map(lt),$3=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $r(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Zn(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Br(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function cf(e,t){if(Br(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lf=e=>!Jn(e)&&e!==hn;function pc(){const{caseless:e,skipUndefined:t}=lf(this)&&this||{},n={},r=(s,i)=>{const o=e&&cf(n,i)||i;si(n[o])&&si(s)?n[o]=pc(n[o],s):si(s)?n[o]=pc({},s):Zn(s)?n[o]=s.slice():(!t||!Jn(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&$r(arguments[s],r);return n}const V3=(e,t,n,{allOwnKeys:r}={})=>($r(t,(s,i)=>{n&&ze(s)?e[i]=rf(s,n):e[i]=s},{allOwnKeys:r}),e),z3=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),H3=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},j3=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&dc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W3=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},q3=e=>{if(!e)return null;if(Zn(e))return e;let t=e.length;if(!af(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},G3=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dc(Uint8Array)),K3=(e,t)=>{const r=(e&&e[ti]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Y3=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Z3=lt("HTMLFormElement"),J3=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),uf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),X3=lt("RegExp"),df=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$r(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Q3=e=>{df(e,(t,n)=>{if(ze(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ze(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e4=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Zn(e)?r(e):r(String(e).split(t)),n},t4=()=>{},n4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r4(e){return!!(e&&ze(e.append)&&e[sf]==="FormData"&&e[ti])}const s4=e=>{const t=new Array(10),n=(r,s)=>{if(Ur(r)){if(t.indexOf(r)>=0)return;if(Br(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Zn(r)?[]:{};return $r(r,(o,a)=>{const c=n(o,s+1);!Jn(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return n(e,0)},i4=lt("AsyncFunction"),o4=e=>e&&(Ur(e)||ze(e))&&ze(e.then)&&ze(e.catch),pf=((e,t)=>e?setImmediate:t?((n,r)=>(hn.addEventListener("message",({source:s,data:i})=>{s===hn&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),hn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(hn.postMessage)),a4=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||pf,y={isArray:Zn,isArrayBuffer:of,isBuffer:Br,isFormData:N3,isArrayBufferView:x3,isString:I3,isNumber:af,isBoolean:T3,isObject:Ur,isPlainObject:si,isEmptyObject:A3,isReadableStream:D3,isRequest:F3,isResponse:B3,isHeaders:U3,isUndefined:Jn,isDate:k3,isFile:R3,isBlob:P3,isRegExp:X3,isFunction:ze,isStream:L3,isURLSearchParams:M3,isTypedArray:G3,isFileList:O3,forEach:$r,merge:pc,extend:V3,trim:$3,stripBOM:z3,inherits:H3,toFlatObject:j3,kindOf:ni,kindOfTest:lt,endsWith:W3,toArray:q3,forEachEntry:K3,matchAll:Y3,isHTMLForm:Z3,hasOwnProperty:uf,hasOwnProp:uf,reduceDescriptors:df,freezeMethods:Q3,toObjectSet:e4,toCamelCase:J3,noop:t4,toFiniteNumber:n4,findKey:cf,global:hn,isContextDefined:lf,isSpecCompliantForm:r4,toJSONObject:s4,isAsyncFn:i4,isThenable:o4,setImmediate:pf,asap:a4,isIterable:e=>e!=null&&ze(e[ti])};function U(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}y.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const ff=U.prototype,hf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{hf[e]={value:e}}),Object.defineProperties(U,hf),Object.defineProperty(ff,"isAxiosError",{value:!0}),U.from=(e,t,n,r,s,i)=>{const o=Object.create(ff);y.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return U.call(o,a,c,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const c4=null;function fc(e){return y.isPlainObject(e)||y.isArray(e)}function mf(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(s,i){return s=mf(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function l4(e){return y.isArray(e)&&!e.some(fc)}const u4=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function ii(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!y.isUndefined(g[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(t);if(!y.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(y.isDate(f))return f.toISOString();if(y.isBoolean(f))return f.toString();if(!c&&y.isBlob(f))throw new U("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(f)||y.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,g){let _=f;if(f&&!g&&typeof f=="object"){if(y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(y.isArray(f)&&l4(f)||(y.isFileList(f)||y.endsWith(m,"[]"))&&(_=y.toArray(f)))return m=mf(m),_.forEach(function(w,C){!(y.isUndefined(w)||w===null)&&t.append(o===!0?gf([m],C,i):o===null?m:m+"[]",l(w))}),!1}return fc(f)?!0:(t.append(gf(g,m,i),l(f)),!1)}const d=[],p=Object.assign(u4,{defaultVisitor:u,convertValue:l,isVisitable:fc});function h(f,m){if(!y.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),y.forEach(f,function(_,x){(!(y.isUndefined(_)||_===null)&&s.call(t,_,y.isString(x)?x.trim():x,m,p))===!0&&h(_,m?m.concat(x):[x])}),d.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return h(e),t}function bf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function hc(e,t){this._pairs=[],e&&ii(e,this,t)}const yf=hc.prototype;yf.append=function(t,n){this._pairs.push([t,n])},yf.toString=function(t){const n=t?function(r){return t.call(this,r,bf)}:bf;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function d4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function wf(e,t,n){if(!t)return e;const r=n&&n.encode||d4;y.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=y.isURLSearchParams(t)?t.toString():new hc(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},p4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,f4=mc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),h4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m4=mc&&window.location.href||"http://localhost",Re={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:f4,hasStandardBrowserWebWorkerEnv:h4,navigator:gc,origin:m4},Symbol.toStringTag,{value:"Module"})),...p4};function g4(e,t){return ii(e,new Re.classes.URLSearchParams,{visitor:function(n,r,s,i){return Re.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function b4(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y4(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function _f(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&y.isArray(s)?s.length:o,c?(y.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!y.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&y.isArray(s[o])&&(s[o]=y4(s[o])),!a)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,s)=>{t(b4(r),s,n,0)}),n}return null}function w4(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vr={transitional:Sf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=y.isObject(t);if(i&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return s?JSON.stringify(_f(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return g4(t,this.formSerializer).toString();if((a=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ii(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),w4(t)):t}],transformResponse:[function(t){const n=this.transitional||Vr.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?U.from(a,U.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Re.classes.FormData,Blob:Re.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],e=>{Vr.headers[e]={}});const v4=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),S4=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
547
|
-
|
|
548
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Cf]=this[Cf]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=zr(o);r[a]||(x4(s,o),r[a]=!0)}return y.isArray(t)?t.forEach(i):i(t),this}};He.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(He.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),y.freezeMethods(He);function yc(e,t){const n=this||Vr,r=t||n,s=He.from(r.headers);let i=r.data;return y.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Ef(e){return!!(e&&e.__CANCEL__)}function Xn(e,t,n){U.call(this,e??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}y.inherits(Xn,U,{__CANCEL__:!0});function xf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function I4(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function T4(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];o||(o=l),n[s]=c,r[s]=l;let d=i,p=0;for(;d!==s;)p+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const h=u&&l-u;return h?Math.round(p*1e3/h):void 0}}function A4(e,t){let n=0,r=1e3/t,s,i;const o=(l,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const ai=(e,t,n=3)=>{let r=0;const s=T4(50,250);return A4(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,l=s(c),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},If=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tf=e=>(...t)=>y.asap(()=>e(...t)),k4=Re.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Re.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Re.origin),Re.navigator&&/(msie|trident)/i.test(Re.navigator.userAgent)):()=>!0,R4=Re.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(r)&&o.push("path="+r),y.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function P4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O4(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Af(e,t,n){let r=!P4(t);return e&&(r||n==!1)?O4(e,t):t}const kf=e=>e instanceof He?{...e}:e;function mn(e,t){t=t||{};const n={};function r(l,u,d,p){return y.isPlainObject(l)&&y.isPlainObject(u)?y.merge.call({caseless:p},l,u):y.isPlainObject(u)?y.merge({},u):y.isArray(u)?u.slice():u}function s(l,u,d,p){if(y.isUndefined(u)){if(!y.isUndefined(l))return r(void 0,l,d,p)}else return r(l,u,d,p)}function i(l,u){if(!y.isUndefined(u))return r(void 0,u)}function o(l,u){if(y.isUndefined(u)){if(!y.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,d)=>s(kf(l),kf(u),d,!0)};return y.forEach(Object.keys({...e,...t}),function(u){const d=c[u]||s,p=d(e[u],t[u],u);y.isUndefined(p)&&d!==a||(n[u]=p)}),n}const Rf=e=>{const t=mn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=He.from(o),t.url=wf(Af(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),y.isFormData(n)){if(Re.hasStandardBrowserEnv||Re.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(y.isFunction(n.getHeaders)){const c=n.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([u,d])=>{l.includes(u.toLowerCase())&&o.set(u,d)})}}if(Re.hasStandardBrowserEnv&&(r&&y.isFunction(r)&&(r=r(t)),r||r!==!1&&k4(t.url))){const c=s&&i&&R4.read(i);c&&o.set(s,c)}return t},L4=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=Rf(e);let i=s.data;const o=He.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=s,u,d,p,h,f;function m(){h&&h(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function _(){if(!g)return;const w=He.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};xf(function(b){n(b),m()},function(b){r(b),m()},N),g=null}"onloadend"in g?g.onloadend=_:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(_)},g.onabort=function(){g&&(r(new U("Request aborted",U.ECONNABORTED,e,g)),g=null)},g.onerror=function(C){const N=C&&C.message?C.message:"Network Error",A=new U(N,U.ERR_NETWORK,e,g);A.event=C||null,r(A),g=null},g.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Sf;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new U(C,N.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&y.forEach(o.toJSON(),function(C,N){g.setRequestHeader(N,C)}),y.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),a&&a!=="json"&&(g.responseType=s.responseType),l&&([p,f]=ai(l,!0),g.addEventListener("progress",p)),c&&g.upload&&([d,h]=ai(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",h)),(s.cancelToken||s.signal)&&(u=w=>{g&&(r(!w||w.type?new Xn(null,e,g):w),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const x=I4(s.url);if(x&&Re.protocols.indexOf(x)===-1){r(new U("Unsupported protocol "+x+":",U.ERR_BAD_REQUEST,e));return}g.send(i||null)})},N4=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof U?u:new Xn(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new U(`timeout ${t} of ms exceeded`,U.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>y.asap(a),c}},M4=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},D4=async function*(e,t){for await(const n of F4(e))yield*M4(n,t)},F4=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Pf=(e,t,n,r)=>{const s=D4(e,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await s.next();if(l){a(),c.close();return}let d=u.byteLength;if(n){let p=i+=d;n(p)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},Of=64*1024,{isFunction:ci}=y,B4=(({Request:e,Response:t})=>({Request:e,Response:t}))(y.global),{ReadableStream:Lf,TextEncoder:Nf}=y.global,Mf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},U4=e=>{e=y.merge.call({skipUndefined:!0},B4,e);const{fetch:t,Request:n,Response:r}=e,s=t?ci(t):typeof fetch=="function",i=ci(n),o=ci(r);if(!s)return!1;const a=s&&ci(Lf),c=s&&(typeof Nf=="function"?(f=>m=>f.encode(m))(new Nf):async f=>new Uint8Array(await new n(f).arrayBuffer())),l=i&&a&&Mf(()=>{let f=!1;const m=new n(Re.origin,{body:new Lf,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=o&&a&&Mf(()=>y.isReadableStream(new r("").body)),d={stream:u&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,g)=>{let _=m&&m[f];if(_)return _.call(m);throw new U(`Response type '${f}' is not supported`,U.ERR_NOT_SUPPORT,g)})});const p=async f=>{if(f==null)return 0;if(y.isBlob(f))return f.size;if(y.isSpecCompliantForm(f))return(await new n(Re.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(y.isArrayBufferView(f)||y.isArrayBuffer(f))return f.byteLength;if(y.isURLSearchParams(f)&&(f=f+""),y.isString(f))return(await c(f)).byteLength},h=async(f,m)=>{const g=y.toFiniteNumber(f.getContentLength());return g??p(m)};return async f=>{let{url:m,method:g,data:_,signal:x,cancelToken:w,timeout:C,onDownloadProgress:N,onUploadProgress:A,responseType:b,headers:P,withCredentials:T="same-origin",fetchOptions:R}=Rf(f),k=t||fetch;b=b?(b+"").toLowerCase():"text";let O=N4([x,w&&w.toAbortSignal()],C),L=null;const M=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let ie;try{if(A&&l&&g!=="get"&&g!=="head"&&(ie=await h(P,_))!==0){let G=new n(m,{method:"POST",body:_,duplex:"half"}),ue;if(y.isFormData(_)&&(ue=G.headers.get("content-type"))&&P.setContentType(ue),G.body){const[ge,Zt]=If(ie,ai(Tf(A)));_=Pf(G.body,Of,ge,Zt)}}y.isString(T)||(T=T?"include":"omit");const ee=i&&"credentials"in n.prototype,Pe={...R,signal:O,method:g.toUpperCase(),headers:P.normalize().toJSON(),body:_,duplex:"half",credentials:ee?T:void 0};L=i&&new n(m,Pe);let he=await(i?k(L,R):k(m,Pe));const re=u&&(b==="stream"||b==="response");if(u&&(N||re&&M)){const G={};["status","statusText","headers"].forEach(ce=>{G[ce]=he[ce]});const ue=y.toFiniteNumber(he.headers.get("content-length")),[ge,Zt]=N&&If(ue,ai(Tf(N),!0))||[];he=new r(Pf(he.body,Of,ge,()=>{Zt&&Zt(),M&&M()}),G)}b=b||"text";let ae=await d[y.findKey(d,b)||"text"](he,f);return!re&&M&&M(),await new Promise((G,ue)=>{xf(G,ue,{data:ae,headers:He.from(he.headers),status:he.status,statusText:he.statusText,config:f,request:L})})}catch(ee){throw M&&M(),ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,f,L),{cause:ee.cause||ee}):U.from(ee,ee&&ee.code,f,L)}}},$4=new Map,Df=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,c,l,u=$4;for(;a--;)c=i[a],l=u.get(c),l===void 0&&u.set(c,l=a?new Map:U4(t)),u=l;return l};Df();const wc={http:c4,xhr:L4,fetch:{get:Df}};y.forEach(wc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ff=e=>`- ${e}`,V4=e=>y.isFunction(e)||e===null||e===!1,Bf={getAdapter:(e,t)=>{e=y.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!V4(r)&&(s=wc[(a=String(r)).toLowerCase()],s===void 0))throw new U(`Unknown adapter '${a}'`);if(s&&(y.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ui.assertOptions(r,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:ui.assertOptions(s,{encode:vt.function,serialize:vt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ui.assertOptions(n,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&y.merge(i.common,i[n.method]);i&&y.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=He.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!c){const f=[Uf.bind(this),void 0];for(f.unshift(...a),f.push(...l),p=f.length,u=Promise.resolve(n);d<p;)u=u.then(f[d++],f[d++]);return u}p=a.length;let h=n;for(;d<p;){const f=a[d++],m=a[d++];try{h=f(h)}catch(g){m.call(this,g);break}}try{u=Uf.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=mn(this.defaults,t);const n=Af(t.baseURL,t.url,t.allowAbsoluteUrls);return wf(n,t.params,t.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(t){gn.prototype[t]=function(n,r){return this.request(mn(r||{},{method:t,url:n,data:(r||{}).data}))}}),y.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(mn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}gn.prototype[t]=n(),gn.prototype[t+"Form"]=n(!0)});let H4=class Kh{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Xn(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kh(function(s){t=s}),cancel:t}}};function j4(e){return function(n){return e.apply(null,n)}}function W4(e){return y.isObject(e)&&e.isAxiosError===!0}const Sc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sc).forEach(([e,t])=>{Sc[t]=e});function zf(e){const t=new gn(e),n=rf(gn.prototype.request,t);return y.extend(n,gn.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return zf(mn(e,s))},n}const fe=zf(Vr);fe.Axios=gn,fe.CanceledError=Xn,fe.CancelToken=H4,fe.isCancel=Ef,fe.VERSION=$f,fe.toFormData=ii,fe.AxiosError=U,fe.Cancel=fe.CanceledError,fe.all=function(t){return Promise.all(t)},fe.spread=j4,fe.isAxiosError=W4,fe.mergeConfig=mn,fe.AxiosHeaders=He,fe.formToJSON=e=>_f(y.isHTMLForm(e)?new FormData(e):e),fe.getAdapter=Bf.getAdapter,fe.HttpStatusCode=Sc,fe.default=fe;const{Axios:R_,AxiosError:P_,CanceledError:O_,isCancel:L_,CancelToken:N_,VERSION:M_,all:D_,Cancel:F_,isAxiosError:B_,spread:U_,toFormData:$_,AxiosHeaders:V_,HttpStatusCode:z_,formToJSON:H_,getAdapter:j_,mergeConfig:W_}=fe,Hr=(e,t)=>{const n=Le.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},ne=class ne{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};S(ne,"axiosInstance"),S(ne,"config"),S(ne,"init",t=>{ne.config=t,ne.axiosInstance=fe.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":V.getCurrent(),...t.headers}}),ne.setupInterceptors()}),S(ne,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s,...n}};return await ne.getAxiosInstance().get(i,o)}),S(ne,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await ne.getAxiosInstance().post(i,n,o)}),S(ne,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s}};return await ne.getAxiosInstance().put(i,n,o)}),S(ne,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await ne.getAxiosInstance().patch(i,n,o)}),S(ne,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s,...n}};return await ne.getAxiosInstance().delete(i,o)}),S(ne,"setupInterceptors",()=>{ne.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:ne.getEncodeParams()}:t.params=r,t.data&&(t.data=mi(t.data,"camelCase-to-snake_case")),t}),ne.axiosInstance.interceptors.response.use(t=>ne.handleResponse(t),t=>ne.handleError(t))}),S(ne,"handleResponse",t=>{const n=t.status===202,r=mi(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),S(ne,"handleError",t=>{var s;const n=mi((s=t.response)==null?void 0:s.data,"snake_case-to-camelCase"),r={error:(n==null?void 0:n.error)||"UNKNOWN_ERROR",internalTerm:n==null?void 0:n.internalTerm,message:(n==null?void 0:n.message)||V.translate("generic_error"),description:n==null?void 0:n.description};return Promise.reject(r)}),S(ne,"getEncodeParams",()=>{const t={app_name:ne.config.appName,app_id:ct.getToken(),environment:Le.getEnvironment(),platform:Ul(),version:Le.getRuntimeConfig().VERSION};return tl(t)});let ut=ne;const Qn={createPayment:"/v1/web/payments",paymentDetails:"/v1/web/payments/:paymentExternalId/detail",identifyUser:"/v1/web/payments/:paymentExternalId/identify-user",paymentStatus:"/v1/web/payments/:paymentExternalId/status",paymentMethodDetail:"/v1/web/payments/:paymentExternalId/payment-methods/:methodCode",pciToken:"v1/web/payments/pci/token"};class Hf{}S(Hf,"getPciToken",async t=>{try{return await ut.POST({url:Qn.pciToken,data:t})}catch(n){return xe.trackError(n),Promise.reject(n)}});const q4=e=>{if(!e)return"";const n=e.replace(/\s+/g,"").split("/");if(n.length!==2)return"";let[r,s]=n;if(r.length===1&&(r="0"+r),s.length===2){const i=new Date().getFullYear(),o=Math.floor(i/100)*100;s=String(o+Number(s))}return`${r}/${s}`},G4="v1.1.3";class K4{constructor(t,n){S(this,"collector");S(this,"form");S(this,"fields");S(this,"callback");this.fields=t,this.callback=n}async init(t){try{const n=await h1({environment:this.getCardEnvironment(),version:G4});this.collector=n.initCollector(),this.form=this.collector.createForm(r=>{if(this.callback){const s=Object.entries(r).reduce((i,[o,a])=>(i[o]={isValid:a.isValid||!a.isDirty&&!a.isTouched,isTouched:a.isTouched||a.isDirty},i),{});this.callback(s)}}),this.fields.forEach(({field:r,...s})=>{this.form.field(r,s)}),t==null||t()}catch(n){throw console.error(n),n}}async tokenizeCard(t,n,r){try{const{accessToken:s}=await Hf.getPciToken(t);return this.form.accessToken=s,await new Promise(i=>{this.form.submit(o=>{const a={cardNumberTkn:o.card_number.value,cvvToken:o.card_cvc.value,holderName:o.card_holder.value,expirationDate:q4(o.card_exp.value),firstSixDigits:o.card_number.details.bin.substring(0,6),lastFourDigits:o.card_number.details.lastFour,brand:o.card_number.details.brand||"unknown"};n(a),i()},()=>{r(new Error(V.translate("card_tokenization_error")))})})}catch{r(new Error(V.translate("generic_error")))}}unmount(){var t;(t=this.form)==null||t.tearDown()}getCardEnvironment(){return Le.getEnvironment()==="production"?"production":"sandbox"}}var jf=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e))(jf||{});class Ie{}S(Ie,"postCreatePayment",async(t,n)=>{try{const r=await ut.POST({data:t,url:Qn.createPayment});return xe.trackEvent("ap_cl_payment_created",{...t,initializer:n}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"getPaymentDetails",async(t,n)=>{try{const r=await ut.GET({url:hr(Qn.paymentDetails,{paymentExternalId:t})});return xe.trackEvent("ap_cl_payment_details",{paymentExternalId:t,initializer:n}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"postIdentifyUser",async(t,n)=>{try{const r=await ut.POST({data:n,url:hr(Qn.identifyUser,{paymentExternalId:t})});return xe.trackEvent("ap_cl_user_identified",{hasAccount:r.user.hasAccount,user:r.user.otherUserData}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"getPaymentStatus",async t=>{try{return await ut.GET({url:hr(Qn.paymentStatus,{paymentExternalId:t})})}catch(n){return Promise.reject(n)}}),S(Ie,"getPollingRequest",async t=>{try{const n=t.replace(/^\/?api\//,"");return await ut.GET({url:n})}catch(n){return Promise.reject(n)}}),S(Ie,"postGenericPayment",async(t,n,r)=>{try{const s=t.replace(/^\/?api\//,"");return await ut.POST({url:hr(s,{paymentExternalId:n}),data:r})}catch(s){return Promise.reject(s)}});var Gt=(e=>(e.ACCEPTED="ACCEPTED",e.FINISHED="FINISHED",e))(Gt||{});class Wf{}S(Wf,"getPaymentMethodDetail",async t=>{try{return await ut.GET({url:hr(Qn.paymentMethodDetail,{paymentExternalId:t.paymentExternalId,methodCode:t.methodCode})})}catch(n){return Promise.reject(n)}});class _c{constructor(t,n,r,s){S(this,"pollingTimeout",null);S(this,"isPollingActive",!1);S(this,"remainingAttempts");this.pollingAcceptedData=t,this.onWaitingInfo=n,this.onFinished=r,this.onError=s,this.remainingAttempts=t.pollingMetadata.remainingHits,this.validatePollingData()}startPolling(){var t;if(this.pollingAcceptedData.pollingMetadata.remainingHits<=0){this.onError(new Error("Polling attempts exhausted"));return}this.isPollingActive=!0,(t=this.pollingAcceptedData.waitingInfo)!=null&&t.text&&this.onWaitingInfo&&this.onWaitingInfo(this.pollingAcceptedData.waitingInfo.text),this.executePoll()}stopPolling(){this.isPollingActive=!1,this.pollingTimeout&&(clearTimeout(this.pollingTimeout),this.pollingTimeout=null)}validatePollingData(){if(!this.pollingAcceptedData.pollingMetadata.pollingUrl)throw new Error("Invalid polling URL");if(this.pollingAcceptedData.pollingMetadata.nextHitIn<=0)throw new Error("Invalid polling interval")}executePoll(){this.isPollingActive&&(this.pollingTimeout=setTimeout(()=>{this.handlePolling().catch(t=>{this.onError(t),this.stopPolling()})},this.getPollingInterval()))}async handlePolling(){const t=await Ie.getPollingRequest(this.pollingAcceptedData.pollingMetadata.pollingUrl);t.statusCode===202&&t.pollingStatus===Gt.ACCEPTED?this.handleAccepted(t):this.handleFinished(t)}handleAccepted(t){if(this.isPollingActive){if(this.remainingAttempts=t.pollingMetadata.remainingHits,this.pollingAcceptedData=t,this.remainingAttempts<=0){const n=t.timeoutInfo.text;this.stopPolling(),this.onError(new Error(n));return}this.executePoll()}}handleFinished(t){this.stopPolling(),this.onFinished(t)}getPollingInterval(){return this.pollingAcceptedData.pollingMetadata.nextHitIn}}const di=(e,t)=>({fontSize:"16px",lineHeight:"24px",color:e,backgroundColor:t}),Y4=(e,{error:t=!1,disabled:n=!1})=>j`
|
|
540
|
+
`;let pa=class extends be{constructor(t){super({tag:"div",styles:()=>Zb()});const n=t.type==="success",r=n?Z.getStyles().messages.success.textColor:Z.getStyles().messages.error.textColor,i=new mt({name:n?"check_circle_line":"close_circle_line",size:96,color:r}).element;if(this.element.append(i),t.title){const o=new X({text:t.title,size:20,lineHeight:30,weight:600,align:"center"}).element;this.element.append(o)}if(t.description){const o=new X({text:t.description,size:16,lineHeight:24,align:"center"}).element;this.element.append(o)}}};var R=yt;function ha(){var e=yt;const t=["clear","127830LZHlSi",e(795),e(743),e(794),e(649),e(511),"1048780OzWlkN",e(668),e(412),e(465),e(180),e(520),e(373),e(419),e(562),e(422),"off"];return(ha=function(){return t})()}(function(){for(var e=yt,t=ma();;)try{if(-parseInt(e(329))/1*(parseInt(e(274))/2)+-parseInt(e(369))/3*(-parseInt(e(367))/4)+-parseInt(e(233))/5+parseInt(e(145))/6*(-parseInt(e(701))/7)+-parseInt(e(655))/8*(-parseInt(e(270))/9)+parseInt(e(315))/10*(parseInt(e(142))/11)+parseInt(e(685))/12===588751)break;t.push(t.shift())}catch{t.push(t.shift())}})();const ga=va;function ma(){var e=["3448vNCtZZ","761436JoNrAO","5310140VtlWwy","Request timeout","7672278JDWNZO","90ZjyTbp","3104038VhHmhJ","341079ldogSu","3114441jTKeeA","key","PRODUCTION","getAttribute","toDotCase","send","102532iujTOj","757371vntIDP","rule","28497zqLGhH","1965484iDLxVf","justify","10QefxGX","5066250nuHGFb","append","1380400kMJPdd","tags","3598075UDNdui","rel","latest","5679575iNTExO","@font-feature-values","700156cwVhpM","13090752DcUgRT","count","lowerFirst","box-pack:$3","@keyframes","6990495zFYjlD","timeout","SANDBOX","1764180DwriBQ","28900hQasRN","get","$2box$3","592uldMpH","1906140GGDNCn","forEach","6lcQlGI","timeZone","330066EfbpyJ","2180136rfoyVo","2548490MycJlj","3489ZHTUlC","includes","902079TZNeVj","hasOwnProperty","20cFIzva","flex-line-pack","5421zZCtjq","anim","1685971anZxDF","1118807BrroiT","633515GvGIbN","href","612712APocYB","-ms-","34347599FblyIU","5oIWUit",'/"]',"styleSheets","1149940kbRkDq","18emqyKv","216768ATlgsw","REQUIRED","1538910aqOPES","167058fDTlal","1802382UuEKog","11928996WPgChJ","297544AzCjab","7cCQubY","210052cCRFdo","15365691CaBpSv","prepend","1837320JmVWKN","apply","5488040tLgchU","6404728IJjHNF","cssRules","[HTTP]: ","function","538328lGaoiz","3WyhRFj","set","document.head or document.body","18KOgRUC","3PpNGVC","frames","request","formatKeys","2515230SGPlYS","1557YOosgA","container","4144596Ukwkkq","14mcAgvY","_createCaseFirst","80179OoRuKl","NOT_FOUND","test","1063965TOYbKD","112560WXZvtM","5855416GyXitv","authorization","insertionPoint","ctx","3122830eGkjjc","173392QMdDYZ","197776ZnKCeZ","comm","42CEhiUc","3UDJFFS","8znKpbY","1rkGFTj","1103656RUOYui","5297088ciYuDR","CopyButton","random","5589390vSVLAu","done","969632YGVaMk","flex-pack:$3","setPrototypeOf","negative","$2$3","8766CUlXUX","6555474dHVLiB","16hoClBR","10399347ouOdzC","1731331adTcvK","6011170PFMfeO","box-","2QsMDbx","396880hxDmUW","5lLsGOe","lower","288762yBOcUy","927680PXUBpa","5272970jsKcdl","210wvAPTz","4390984qBtQNZ","1042915vBnDcJ","slice","18146574kLGOdt","Content-Type","@counter-style","1635840LijluJ","assign","then","148iTkCvR","upperFirst","4586523dESxoU","102UdDlbM","13480IirCBl","application/json","-$&","snake","startCase","3782506eozEyq","[UNHANDLED]: ","1586289ZbsznC","parent","compat","style[data-emotion]:not([data-s])","41346sAgKHc","origin","1542472UUshgd","toPascalCase","domians","187957vMwqit","toSnakeCase","568pAcJOy","5590kjPEGP","@font-face","34057TCsfxk","9621207ZSMPqN","data-emotion","_startCase","print-","@media","link",":read-write","NOT_LOADED","9356KfJoDB","animationName","4mPQIOh","animation","2696336QqSQcN","start","3363787mMyewX","12991583mFbRDh","35tYPZLV","35168opQkvL","32WPbhAk","hydrate","/public/v1/token/reveal","36hVbjtN","basis","$1$2","cdn","__emotion_styles","22apMIFO","3goapWe","3275226iDBkQv","push","221142kMnpSu","querySelectorAll","114RSjmoG","reveal","2672020NupvKQ","5voBSrt","5280612FAmHRj","2YDvJFs","121946FvfpOL","TIMEOUT","BAD_REQUEST","308070mzXybL","7704828AlyWpW","4136vTyAoM","42WATbWV","17375868QkLWYY","1961979ltppkW","369356uTNDzr","5112212jRFQZI","24746700nYUjHu","$1 $2","6521168AcnhGa","style","12tOiqGC","https://tokenizer-tst.cc.astropay.com","speedy","60VyHydS","793022whjRWB","bind","kebab","10Oqises","add","1470645xRoijs","object","captureStackTrace","781649cCTwXr","182824NOFIwU","4817756GOdPsv","BASE_CDN","isArray","@supports","1244744kHEZvp","1204400cULrpT","449711XSjyNn","@namespace","57gVyDRX","emit","6236046SweZxs","defineProperties","@@INIT","3014374nROcbQ","params","sheet","1671942sLAGQH","Unable to find ","shift","canExecute","upper","UNHANDLED","321246WzqUuK","2416zstDHz","78TjMsRA","@document","486479crVyAA","1274230eUYpuD","7476MqGCll","https://tokenizer.cc.astropay.com","9qEwJkj","94mlxQmC","_insertTag","@viewport","copy-button","2oFrXUh","css","707329nPsPGZ","3903120ZTbQWm","1250232QMjwkz","993063ECHrBH","off","box$3","2387410tdnXlE","environment","type","4XTbgyi","207494VIJaqZ","207VWsTHT","6MQcvFH","35KTILAE","623aFRIRv","104MtyiFW","70fByxgL","1328390hcsUJy","11965976myZRSf","2932168wOOQED","7CAfDgU","27xTvXzF","5139khheWn","18298ErvNda","15qVcyAs","2581385zzzlSz","1531173EygmBU","5013TdEGGQ","39251454EyvEGu","1szHVRr","nextSibling","171eGkepJ","995792ZXdNpW","getFullCdn","49fgToOT","141238OYIhFf","3604728wtPlZt","9byfBJF","exec","next","message","70759QyvmDC","isSpeedy","128yfgIdV","data-s","200ROoAmA","shrink","length","282358JpRRgN","isOperational","insert","3278505kVkcHW","2558421fHqYVU","1165706VPRSLL","split","360993lzNNst","3986rrEZYp","return","3480945BQAAYg","2nMBmkS","2281844ROitQp","BASE_API","27HmsHKI","679404ZmaTyg","20xkgBFi","3908064tZgPPb","1790914KWViXl","inserted","stylisPlugins","reduce","insertBefore","26oJRKGO","119987EZDfNd","565eyruQF","Access-Control-Allow-Origin","595876LgUVRS","1992206jKEGfb","join","193550GoZXIJ","202wLqUwO","replace","baseURL"," is invalid.","99amzLEi","12446nhMFLu","1856148uSihXJ","31566270qvtShe","56045nULafv","abs","5889208ocarfU","2206497yNbZFm","7WjjEbv","@keyframes ","firstChild","305907rAOuHi","1070106SrHRtP","1KlNACj","2829256VMfbYc","801054pmVKPQ","45296tjbJvx","399116yuJdxn","TimeZone","removeEventListener","UNDEFINED",' "]',"lastIndex","18388260JgPhmo","790sQdzeI","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx","39nuPwxQ","nonce","1906825qFGXWA","102Qkfvvl","name","raw","20gywqiU","7308324sgDoMc","34825311qnCLyR","991531xZguiI","4593190CadDlo","INVALID","1uSGfgo","input-$1","1501542qKAixX","prototype","registered","456wJQuIj","347732LsCzct","parse","undefined","76385hkeDYT","inline-","115026FZBXCQ","5txmdnE","32HPdvVb","8954800LNVZHA","accessToken","3GcEFSv","props","5028BbqWZE","34672561hfhCnC","6522030iNQqBd","36TYjiRw","474fHLsgQ","365994YPzeNn","toKebabCase","6SBjYSO","1HxbtmM","toCamelCase","3xMbMIj","313859KKbbgd","keys","6LCyCWH","tb-rl","1145017tuPjtp","api","10895PHjSJt","boolean","flex-$1$2","2012180BGZvZq","5JHUgnG","6eqGueN","create","1483570zwTktD","366KnZgCn","14qDkMOo","8FUVWOn","38685lFcQsk","appendChild","4wswXHb","INTERNAL_SERVER_ERROR","315634dCJvdO","32039NIQJjh","trim","entries","143352vIzUva","-grow","6vPzjsU","getOwnPropertyDescriptors","192VVRXxR","2013040uXGWiH","grow","10gWvkPZ","getOwnPropertySymbols","!important","5028340uiCobm","splitWords","1398012AIJUyj","1632420YnhDrH","ctr"," is undefined.","41812yDXNFv","2495164uYJjkv","-moz-","version","502691MEcBqX","getHeaders","3kPtUIZ","stringify","14822650JPeFEZ","@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ","42054ESbccP","_toWords","4242528bXZfiT","3344667OIHhxe","5750396vrmTdj","head","268152SJsZnw","427cxPooO","isUndefined","3930zrQOch","listeners","decl","@import","filter","stop","location","79674ZpwWYN","293732SBYxst","/public/v1/token","fromCharCode","toLowerCase","toUpperCase","call","GET","addEventListener","setAttribute","26941288CkDEbN","post","11oqlwuN","Access token not set","87GWhrFE","emitter","before","isRequired","1369700dRAXAo","5GSCGHS","string","toString","24384006yWcRvg","_canExecute","8765008liwqJC","sourceWindow","sandbox","7368UiaItP","12GMrAvZ","HTTP","dns-prefetch","4410036tOJnlJ","264834CkfPaR","children","4214610DepdAD","1472518dXJTTo","3379032afmmzz","Component selectors can only be used in conjunction with ","8ZmfgGJ","44cPbEBd","582SAPPev","350313NZGJmJ","4249880hofxWm",":read-only","436145BXkDSV","toSentenceCase","24qGiocM","flex-item-","REQUEST_TIMEOUT","UNAUTHORIZED","2924874IDKzfu","11ozoHrq","20380sohzME","284730CeOziu","6521911DlQhaK","resolve","175pzlaDH","12Wntbrz","153CwXsSP","6807462wcVIbh","$`$1","99255obnocz","8565340BeQZTN","frameId","3220704wvCPTK","9vcUkeB","5163599fsttEm","983742ZSzkPs","1880YXBEgQ","postMessage","6676776VbOJGf","value","72700aKFNWB","Request error! status: ","2685321kQBtXq","2011122iTUboz","784830EiOgSk","4Shhqxd","concat","throw","777225SHDgSu","resolvedOptions","search","24brqEuT","stretch","2353821ouiOcG","16BpXaTH","body","4168339BVBfRq","_upperFirst","styles","5GkJNGS","2498022TthXHp","match","4399206zUvsoU","defineProperty","45vUgLOB",'script[src^="',"box-$1$2","1915506xRzusT","targetOrigin","10vjgZog","map","3084189TBfDxs","2617015rxAdDp","20057BCeMKK","692668yJTffY","3275913IwuUbo","5yABJbK","charCodeAt","4DRtert","formatKey","5gnwpyW","_lowerCase","4622320DSbOxK","createElement","1428025rswbrb","AbortError","272928GGfFVj","737mdBFHW","4950912kToKgF","handleMessage","8310840DVoCar","getOwnPropertyDescriptor","109064imVtqW","createTextNode","6XsYOJz","24899zSajlN","127845nWOlks","21ZAugTX","11860803tMqYZp","3898532gnOkwM","5015045AqKKoB","1371378msYiaj","5167656aUcLyl","209740ohkUFh","7903578rApVjM","378mIpYul","UNABLE_TO_FIND","586668OMSavw","https://tokenizer-web.cc.astropay.com","39728XQruux","::placeholder","2hgGSIR","3799864GhLwZS","removeChild","toLocaleLowerCase","40869670rNPvRw","flush","235779fIEMDA","enumerable","5CDMHbY","Reveal","773584eZyLko","1907948myHfGb","61554tirTmC","4269661uBmwSk","23881380dQaLeD","296368dsyAUL"];return(ma=function(){return e})()}function va(e,t){const n=ha();return(va=function(r,i){return n[r-=160]})(e,t)}(function(){var e=yt;const t=va,n=ha();for(;;)try{if(-parseInt(t(176))/1*(-parseInt(t(169))/2)+-parseInt(t(175))/3+parseInt(t(172))/4*(parseInt(t(173))/5)+parseInt(t(170))/6*(-parseInt(t(161))/7)+-parseInt(t(174))/8+-parseInt(t(163))/9*(parseInt(t(167))/10)+parseInt(t(171))/11==561693)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),ga(165),ga(177),ga(166);var Tt,vn,vt,wf,It,qt,Ef,Sf,ya,ba,_f,So;function wa(){var e=yt,t=[e(350),e(396),e(311),e(474),"837xAVhUS","HTTP",e(724),e(144),e(264),e(473),e(689),e(226),e(221),"TIMEOUT","NOT_LOADED",e(328),e(378),e(179),e(656),e(563),"6960805uGgNwo",e(192),e(426),"12267310uEVrHO"];return(wa=function(){return t})()}function _o(e,t){var n=wa();return(_o=function(r,i){return n[r-=191]})(e,t)}function Ea(e,t){var n=Sa();return(Ea=function(r,i){return n[r-=203]})(e,t)}function Sa(){var e=yt,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Sa=function(){return t})()}function _a(e,t){var n=Ca();return(_a=function(r,i){return n[r-=166]})(e,t)}function Ca(){var e=yt,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Ca=function(){return t})()}function Cf(e,t){var n=Ta();return(Cf=function(r,i){return n[r-=472]})(e,t)}function Ta(){var e=yt,t=[e(308),e(157),e(444),e(335),e(279),e(169),"2vZiVLA","1287DSJSxR",e(240),e(251),e(456),e(477),e(692),"96LHSqDE"];return(Ta=function(){return t})()}(function(){for(var e=yt,t=_o,n=wa();;)try{if(parseInt(t(196))/1*(parseInt(t(200))/2)+-parseInt(t(209))/3*(parseInt(t(214))/4)+parseInt(t(212))/5+parseInt(t(193))/6*(-parseInt(t(204))/7)+parseInt(t(203))/8+parseInt(t(192))/9*(parseInt(t(198))/10)+-parseInt(t(191))/11==844014)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(vn=Tt||(Tt={}))[(vt=_o)(210)]=vt(210),vn[vt(194)]=vt(194),vn[vt(211)]=vt(211),vn[R(773)]=vt(206),vn[vt(207)]=vt(207),vn[vt(197)]=vt(197),vn[vt(205)]=R(143),vn.UNHANDLED=vt(213),qt=_o,(It=wf||(wf={}))[It.OK=200]="OK",It[It[qt(199)]=400]=qt(199),It[It[qt(202)]=404]=qt(202),It[It[qt(208)]=500]=R(378),It[It[qt(201)]=408]=qt(201),It[It[qt(195)]=401]=qt(195),(function(){for(var e=R,t=Ea,n=Sa();;)try{if(-parseInt(t(211))/1+-parseInt(t(209))/2*(parseInt(t(210))/3)+-parseInt(t(212))/4*(parseInt(t(207))/5)+-parseInt(t(204))/6+-parseInt(t(206))/7*(parseInt(t(203))/8)+-parseInt(t(208))/9+parseInt(t(214))/10==660557)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),ya=Ea,(Sf=Ef||(Ef={}))[R(577)]=ya(205),Sf[ya(213)]=R(205),(function(){for(var e=R,t=_a,n=Ca();;)try{if(parseInt(t(167))/1+parseInt(t(175))/2+parseInt(t(178))/3+parseInt(t(176))/4*(-parseInt(t(172))/5)+-parseInt(t(170))/6+-parseInt(t(171))/7*(-parseInt(t(168))/8)+parseInt(t(174))/9==266134)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(_f=ba||(ba={}))[(So=_a)(166)]=So(173),_f[So(169)]=So(177),(function(){for(var e=R,t=Cf,n=Ta();;)try{if(parseInt(t(479))/1*(-parseInt(t(485))/2)+parseInt(t(478))/3*(parseInt(t(477))/4)+parseInt(t(481))/5*(-parseInt(t(475))/6)+parseInt(t(482))/7*(parseInt(t(474))/8)+parseInt(t(472))/9*(parseInt(t(476))/10)+-parseInt(t(484))/11*(parseInt(t(480))/12)+-parseInt(t(483))/13*(parseInt(t(473))/14)==639293)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const fr=To;(function(){var e=R;const t=To,n=Ia();for(;;)try{if(parseInt(t(494))/1+parseInt(t(487))/2*(-parseInt(t(497))/3)+-parseInt(t(485))/4*(parseInt(t(483))/5)+-parseInt(t(488))/6+parseInt(t(484))/7*(-parseInt(t(499))/8)+parseInt(t(469))/9*(-parseInt(t(480))/10)+parseInt(t(468))/11==507588)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const ui={isRequired:e=>e+fr(475),isUndefined:e=>e+fr(492),isInvalid:e=>e+fr(490),unableToFind:e=>fr(466)+e+".",notLoaded:e=>fr(473)+e+"."};let Co=class extends Error{constructor(t,n,r=!1){var i=R;const o=fr;let s=n;switch(t){case Tt[o(491)]:s=ui[o(470)](n);break;case Tt[o(479)]:s=ui.isInvalid(n);break;case Tt[o(486)]:s=ui[o(476)](n);break;case Tt[i(563)]:s=ui[o(495)](n);break;case Tt[o(481)]:s=ui[o(493)](n);break;case Tt[i(454)]:s=o(478)+n;break;case Tt[o(471)]:s=o(496)+n;break;case Tt[o(477)]:default:s=o(474)+n}var a,c,u;super(s),a=this,u=void 0,(c=o(482))in a?Object[To(489)](a,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[c]=u,Object[o(472)](this,new.target.prototype),this[o(467)]=t,this[o(482)]=r,Error[o(498)](this)}};function To(e,t){const n=Ia();return(To=function(r,i){return n[r-=466]})(e,t)}function Ia(){var e=R;const t=[e(348),e(524),e(442),e(143),e(713),"Failed to load the ",e(750)," is required.",e(417),e(192),e(671),e(328),e(164),e(773),e(257),e(645),e(358),e(784),"UNDEFINED","618834PMzmgD",e(519),e(520),e(290),e(656),e(398),"notLoaded",e(218),"unableToFind","[TIMEOUT]: ",e(357),"captureStackTrace",e(223),e(188),e(321)];return(Ia=function(){return t})()}function Tf(e,t){var n=xa();return(Tf=function(r,i){return n[r-=363]})(e,t)}function xa(){var e=R,t=[e(699),"10296792NSbaBf",e(144),e(237),e(713),e(171),"3JrHjWm",e(467),e(520),e(239),"httpCode",e(390),e(590),e(280),e(303)];return(xa=function(){return t})()}(function(){for(var e=R,t=Tf,n=xa();;)try{if(parseInt(t(365))/1*(-parseInt(t(374))/2)+-parseInt(t(368))/3*(-parseInt(t(367))/4)+-parseInt(t(373))/5*(-parseInt(t(376))/6)+parseInt(t(375))/7+-parseInt(t(377))/8*(parseInt(t(371))/9)+parseInt(t(369))/10+parseInt(t(363))/11==917605)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const li=ka;function Aa(){var e=R;const t=[e(683),e(336),e(629),e(541),e(446),"143705UhzlIi",e(141),e(193),e(176),e(147),e(674),e(688),e(234),e(173),e(406),e(606),"940hBWQzM"];return(Aa=function(){return t})()}function ka(e,t){const n=Aa();return(ka=function(r,i){return n[r-=127]})(e,t)}(function(){var e=R;const t=ka,n=Aa();for(;;)try{if(parseInt(t(139))/1*(-parseInt(t(140))/2)+parseInt(t(127))/3*(parseInt(t(142))/4)+-parseInt(t(137))/5+-parseInt(t(141))/6+-parseInt(t(129))/7+-parseInt(t(143))/8*(parseInt(t(134))/9)+-parseInt(t(133))/10*(-parseInt(t(128))/11)==195235)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();let Xb=class{static[li(135)](t){const n=li,r=new URLSearchParams(t),i={};return r[n(136)](((o,s)=>{var a=yt;const c=n;i[s]?Array[c(130)](i[s])?i[s][a(795)](o):i[s]=[i[s],o]:i[s]=o})),i}static parseObject(t){return this[li(135)](t)}static[li(131)](t){const n=li,r=new URLSearchParams;for(const i in t){const o=t[i];if(Array[n(130)](o))for(const s of o)r[n(132)](i,s);else r[n(132)](i,o?o[n(138)]():"")}return r[n(138)]()}};const Io=Ra;function Ra(e,t){const n=Pa();return(Ra=function(r,i){return n[r-=358]})(e,t)}(function(){var e=R;const t=Ra,n=Pa();for(;;)try{if(parseInt(t(368))/1+parseInt(t(367))/2*(parseInt(t(361))/3)+-parseInt(t(371))/4+-parseInt(t(358))/5*(-parseInt(t(370))/6)+parseInt(t(362))/7*(parseInt(t(366))/8)+parseInt(t(363))/9*(parseInt(t(364))/10)+-parseInt(t(372))/11==832538)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const pr={endpoints:{tokenizer:R(427),reveal:Io(365)},domians:{cdn:{production:Io(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:Io(359),sandbox:Io(360)}}};function Pa(){var e=R;const t=[e(393),e(786),e(471),"107952fYoopL",e(644),e(565),"5250978IBLHHK","2968388TUhYeT",e(236),e(537),e(200),e(158),e(317),e(780),e(677)];return(Pa=function(){return t})()}const Qb=Oa;function Oa(e,t){const n=La();return(Oa=function(r,i){return n[r-=466]})(e,t)}(function(){var e=R;const t=Oa,n=La();for(;;)try{if(parseInt(t(475))/1+parseInt(t(466))/2*(-parseInt(t(472))/3)+parseInt(t(471))/4+-parseInt(t(467))/5*(parseInt(t(473))/6)+parseInt(t(474))/7*(-parseInt(t(469))/8)+-parseInt(t(470))/9*(-parseInt(t(477))/10)+-parseInt(t(476))/11==221555)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const e2={environment:ba[Qb(468)],version:R(611)};function La(){var e=R;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(La=function(){return t})()}function Na(){var e=R;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(Na=function(){return t})()}function If(e,t){const n=Na();return(If=function(r,i){return n[r-=155]})(e,t)}(function(){var e=R;const t=If,n=Na();for(;;)try{if(parseInt(t(162))/1*(parseInt(t(155))/2)+parseInt(t(157))/3+-parseInt(t(159))/4+parseInt(t(160))/5*(-parseInt(t(163))/6)+-parseInt(t(158))/7*(parseInt(t(164))/8)+parseInt(t(161))/9*(parseInt(t(156))/10)+parseInt(t(165))/11==451934)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})();let Ma=e2;const Fn=()=>Ma,t2=Da;function Da(e,t){const n=Fa();return(Da=function(r,i){return n[r-=379]})(e,t)}(function(){var e=R;const t=Da,n=Fa();for(;;)try{if(parseInt(t(384))/1+-parseInt(t(389))/2+-parseInt(t(383))/3*(-parseInt(t(387))/4)+parseInt(t(388))/5+-parseInt(t(381))/6*(parseInt(t(385))/7)+-parseInt(t(382))/8+parseInt(t(379))/9*(parseInt(t(386))/10)==645524)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();const xf=(e,t)=>e[t2(380)](new RegExp(t+"$"),"");function Fa(){var e=R;const t=[e(306),e(288),e(372),e(155),e(232),e(632),"83594fyhqnZ",e(730),e(399),"3139375mafbsW",e(607)];return(Fa=function(){return t})()}const di=Ba;function Ua(){var e=R;const t=[e(535),e(602),e(582),e(266),e(416),e(172),"11uyatGf",e(402),e(269),"6nfgxja",e(698),e(150),e(219),"domians",e(363),e(790),e(720),e(501),e(215)];return(Ua=function(){return t})()}function Ba(e,t){const n=Ua();return(Ba=function(r,i){return n[r-=110]})(e,t)}(function(){var e=R;const t=Ba,n=Ua();for(;;)try{if(parseInt(t(124))/1+-parseInt(t(128))/2+parseInt(t(119))/3*(parseInt(t(127))/4)+parseInt(t(111))/5*(parseInt(t(117))/6)+parseInt(t(112))/7*(-parseInt(t(118))/8)+parseInt(t(120))/9*(-parseInt(t(125))/10)+parseInt(t(114))/11*(parseInt(t(110))/12)==961663)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class xo{static get[di(113)](){const t=di;return xf(pr[t(121)][t(123)][Fn()[t(126)]],"/")}static get[di(116)](){const t=di;return xf(pr[t(121)][t(122)][Fn()[t(126)]],"/")}static[R(241)](t,n,r){var i=R;const o=di,s=Xb[i(406)](r??{}),a=Fn(),c=s?n[i(636)]("?")?"&":"?":"";return xo[o(113)]+"/"+t+"/"+a[o(115)]+"/"+n+c+s}}var $a=za;function Va(){var e=R,t=[e(559),e(634),e(630),e(739),e(548),e(503),e(436),e(480),e(404),"1042584XPmVvk",e(172),e(473),e(289),e(745),"json",e(795),"2166WIGGYn",e(438),e(385),e(606),e(629),"173LKkRgC",e(391),e(498),e(282),e(614),e(710),e(247),e(621),e(255),"14XmrYdp",e(182),e(735),e(504),"Bearer ",e(697),e(694),e(474),"abort","defineProperty",e(321),e(680),e(496),e(587),e(309),e(344),e(406),e(248),"status",e(542),e(386),"keys",e(586)];return(Va=function(){return t})()}function za(e,t){var n=Va();return(za=function(r,i){return n[r-=115]})(e,t)}(function(){for(var e=R,t=za,n=Va();;)try{if(-parseInt(t(126))/1*(-parseInt(t(121))/2)+-parseInt(t(160))/3*(-parseInt(t(130))/4)+parseInt(t(140))/5*(-parseInt(t(123))/6)+parseInt(t(135))/7*(parseInt(t(167))/8)+-parseInt(t(158))/9+parseInt(t(159))/10+parseInt(t(157))/11==336922)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),$a(146),$a(164),$a(166);var Ao=Ha;function Ha(e,t){var n=ja();return(Ha=function(r,i){return n[r-=291]})(e,t)}(function(){for(var e=R,t=Ha,n=ja();;)try{if(-parseInt(t(301))/1+parseInt(t(307))/2+-parseInt(t(292))/3*(-parseInt(t(306))/4)+parseInt(t(291))/5+-parseInt(t(314))/6*(-parseInt(t(300))/7)+-parseInt(t(302))/8*(parseInt(t(303))/9)+-parseInt(t(293))/10==616185)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),R(597),Ao(294),R(779),Ao(305),Ao(296),Ao(315);function ja(){var e=R,t=[e(208),e(302),"336OqQgfm",e(755),e(494),e(423),e(647),"1179086uaDkqa",e(752),"emit","message",e(756),e(190),e(520),e(148),e(546),e(216),e(779),e(450),"listener",e(319),e(654),e(407),e(212),e(162),e(448),e(440),e(525),e(310)];return(ja=function(){return t})()}function qa(){var e=R;const t=[e(676),e(331),e(362),"2228304EqXFLn",e(512),e(778),e(387),e(721),e(673),"207AHFLGs",e(376),e(425)];return(qa=function(){return t})()}function Wa(e,t){const n=qa();return(Wa=function(r,i){return n[r-=254]})(e,t)}(function(){var e=R;const t=Wa,n=qa();for(;;)try{if(parseInt(t(257))/1+parseInt(t(260))/2+parseInt(t(254))/3*(-parseInt(t(261))/4)+parseInt(t(262))/5+-parseInt(t(258))/6+parseInt(t(256))/7+-parseInt(t(263))/8*(parseInt(t(264))/9)==716064)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();const Af=function(e){var t=R;const n=Wa,r=document[t(414)]||document[n(259)];if(!r)throw new Co(Tt[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=R;const t=Ga,n=Ka();for(;;)try{if(parseInt(t(128))/1+parseInt(t(125))/2+-parseInt(t(127))/3+parseInt(t(132))/4+-parseInt(t(131))/5+parseInt(t(133))/6+-parseInt(t(134))/7==688465)break;n.push(n[e(189)]())}catch{n[e(795)](n.shift())}})();const ko=function(e,t){const n=Ga,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,Af(r)};function Ga(e,t){const n=Ka();return(Ga=function(r,i){return n[r-=125]})(e,t)}function Ka(){var e=R;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(Ka=function(){return t})()}function Ya(){var e=R,t=[e(608),e(186),e(570),e(376),e(652),e(301),"10439181hcqJpc",e(593),e(434),e(441),"createTextNode",e(695),e(250),e(604),"ctr",e(665),e(785),"9136jiXoxV",e(238),e(203),e(324),e(723),e(177),e(278),"insertRule",e(540),"nonce",e(670),"flush",e(767),"forEach","7294661PRwxon",e(774),e(742),e(159),"ownerNode",e(795),e(255),"2555lCYkVH",e(252),e(684),e(481)];return(Ya=function(){return t})()}function Un(e,t){var n=Ya();return(Un=function(r,i){return n[r-=379]})(e,t)}(function(){for(var e=R,t=Un,n=Ya();;)try{if(parseInt(t(413))/1*(-parseInt(t(412))/2)+-parseInt(t(382))/3+-parseInt(t(381))/4*(-parseInt(t(387))/5)+parseInt(t(411))/6+parseInt(t(390))/7*(parseInt(t(408))/8)+parseInt(t(397))/9+-parseInt(t(404))/10*(parseInt(t(380))/11)==960039)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R,t=Un;function n(i){var o=yt,s=Un,a=this;this[o(203)]=function(c){var u,l=o,d=Un;u=a[d(391)][d(386)]===0?a[d(402)]?a[d(402)][d(409)]:a[d(406)]?a[d(389)][d(396)]:a[d(400)]:a[d(391)][a[d(391)][d(386)]-1][l(238)],a[d(389)][d(414)](c,u),a[d(391)][d(385)](c)},this[s(403)]=i[s(383)]===void 0||i[s(383)],this[s(391)]=[],this.ctr=0,this[s(417)]=i[o(318)],this[s(398)]=i[s(398)],this[s(389)]=i[o(684)],this[s(406)]=i[s(406)],this[s(402)]=i[s(402)],this.before=null}var r=n[e(332)];r[t(407)]=function(i){var o=e;i[t(379)](this[o(203)])},r[e(258)]=function(i){var o,s,a,c=e,u=t;this[u(405)]%(this[u(403)]?65e3:1)==0&&this[u(410)]((o=this,s=Un,(a=document[s(416)](c(156)))[s(399)](s(420),o[s(398)]),o[s(417)]!==void 0&&a[c(434)](c(318),o[c(318)]),a[s(394)](document[s(401)]("")),a[s(399)](s(388),""),a));var l=this[c(608)][this[u(391)][u(386)]-1];if(this[u(403)]){var d=(function(f){var h=c,p=Un;if(f[p(392)])return f.sheet;for(var g=0;g<document[p(395)][p(386)];g++)if(document[p(395)][g][p(384)]===f)return document[h(652)][g]})(l);try{d[u(415)](i,d[u(418)][u(386)])}catch{}}else l[u(394)](document[c(550)](i));this.ctr++},r[t(419)]=function(){var i=e,o=t;this[o(391)][i(629)]((function(s){var a,c=o;return(a=s.parentNode)==null?void 0:a[c(393)](s)})),this[o(391)]=[],this[i(397)]=0}})();var xt=Ja;function Ja(e,t){var n=Za();return(Ja=function(r,i){return n[r-=110]})(e,t)}function Za(){var e=R,t=[e(196),"152336OQhHhe",e(420),e(492),e(783),e(770),e(349),e(204),e(598),e(178),e(401),e(650),"4724nuSFUK",e(439),e(736),"@page",e(613),e(619),e(443),"@layer",e(174)];return(Za=function(){return t})()}(function(){for(var e=R,t=Ja,n=Za();;)try{if(-parseInt(t(119))/1+-parseInt(t(123))/2*(-parseInt(t(124))/3)+-parseInt(t(129))/4*(parseInt(t(122))/5)+-parseInt(t(114))/6+-parseInt(t(115))/7+parseInt(t(112))/8+parseInt(t(117))/9==198272)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),R(648),xt(121),R(700),R(600),xt(113),xt(126),xt(116),xt(118),xt(110),xt(111),xt(120),xt(128),xt(125),xt(127),xt(130);var Xa=Qa;function Qa(e,t){var n=ec();return(Qa=function(r,i){return n[r-=258]})(e,t)}function ec(){var e=R,t=[e(347),e(371),e(260),e(288),e(227),e(409),e(255),e(795),e(246),"10opKczI","charCodeAt",e(733),e(377),e(428),e(738),e(281),e(296),e(510),e(381),e(464),"3836294AMJKLE"];return(ec=function(){return t})()}function tc(){var e=R,t=[e(327),e(255),e(566),e(334),e(323),"14ejudnZ",e(201),"862542dyuBTR",e(552),"401898SBLqqH",e(184),e(705)];return(tc=function(){return t})()}function kf(e,t){var n=tc();return(kf=function(r,i){return n[r-=123]})(e,t)}function Rf(e,t){var n=nc();return(Rf=function(r,i){return n[r-=435]})(e,t)}function nc(){var e=R,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(nc=function(){return t})()}function rc(){var e=R,t=[e(458),"2134996QawHcC","return",e(693),e(558),"15490080Hutsfa",e(496),e(228),e(216),e(346),e(255),"1837002hgOqZq",e(531),e(516),e(484),"join"];return(rc=function(){return t})()}function Pf(e,t){var n=rc();return(Pf=function(r,i){return n[r-=147]})(e,t)}function Of(e,t){var n=ic();return(Of=function(r,i){return n[r-=398]})(e,t)}function ic(){var e=R,t=[e(551),"input-$1",e(273),e(468),"root",e(749),e(287),e(567),e(772),e(549),e(716),e(346),"global",e(229),e(294),"1314449boGmmT",e(527),"4549375QrRZcY",e(265),"type"];return(ic=function(){return t})()}function oc(){var e=R,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(oc=function(){return t})()}function Lf(e,t){var n=oc();return(Lf=function(r,i){return n[r-=484]})(e,t)}function sc(e,t){var n=ac();return(sc=function(r,i){return n[r-=236]})(e,t)}function ac(){var e=R,t=[e(584),"953666lBllkt",e(564),"48PHUuVy",e(437),e(214),e(627),e(149),e(272),e(307),e(483),e(800),e(370)];return(ac=function(){return t})()}(function(){for(var e=R,t=Qa,n=ec();;)try{if(-parseInt(t(259))/1*(parseInt(t(278))/2)+-parseInt(t(276))/3*(-parseInt(t(271))/4)+-parseInt(t(274))/5*(-parseInt(t(264))/6)+-parseInt(t(258))/7+-parseInt(t(263))/8+parseInt(t(261))/9*(-parseInt(t(268))/10)+parseInt(t(260))/11==402046)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),Math[Xa(275)],String[Xa(272)],Object[Xa(273)],(function(){for(var e=R,t=kf,n=tc();;)try{if(-parseInt(t(132))/1*(parseInt(t(123))/2)+-parseInt(t(125))/3+parseInt(t(129))/4+parseInt(t(134))/5*(parseInt(t(127))/6)+parseInt(t(126))/7*(parseInt(t(133))/8)+-parseInt(t(124))/9*(-parseInt(t(130))/10)+-parseInt(t(128))/11==366270)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=R,t=Rf,n=nc();;)try{if(parseInt(t(439))/1+parseInt(t(443))/2*(parseInt(t(442))/3)+parseInt(t(441))/4*(parseInt(t(440))/5)+parseInt(t(438))/6+-parseInt(t(436))/7+parseInt(t(435))/8+-parseInt(t(437))/9==637765)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=R,t=Pf,n=rc();;)try{if(-parseInt(t(158))/1+-parseInt(t(150))/2+parseInt(t(149))/3+-parseInt(t(155))/4*(-parseInt(t(151))/5)+-parseInt(t(152))/6+-parseInt(t(161))/7*(-parseInt(t(157))/8)+parseInt(t(159))/9==746841)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Of,n=ic();;)try{if(parseInt(t(398))/1+-parseInt(t(409))/2*(-parseInt(t(413))/3)+parseInt(t(405))/4+parseInt(t(400))/5+-parseInt(t(403))/6*(-parseInt(t(408))/7)+-parseInt(t(412))/8*(-parseInt(t(416))/9)+-parseInt(t(417))/10==921092)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=R,t=Lf,n=oc();;)try{if(parseInt(t(484))/1+-parseInt(t(485))/2*(-parseInt(t(490))/3)+parseInt(t(488))/4+parseInt(t(489))/5+parseInt(t(492))/6+-parseInt(t(486))/7*(parseInt(t(487))/8)+-parseInt(t(491))/9==521840)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=R,t=sc,n=ac();;)try{if(parseInt(t(246))/1*(parseInt(t(239))/2)+parseInt(t(248))/3*(-parseInt(t(241))/4)+parseInt(t(244))/5+-parseInt(t(236))/6*(parseInt(t(247))/7)+-parseInt(t(242))/8*(parseInt(t(243))/9)+-parseInt(t(238))/10+parseInt(t(237))/11*(parseInt(t(240))/12)==600322)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})();var n2=cc;function cc(e,t){var n=uc();return(cc=function(r,i){return n[r-=373]})(e,t)}function uc(){var e=R,t=[e(485),e(252),e(684),e(523),"column",e(337),e(515),e(275),e(159),e(366),e(332),e(312),e(197),e(265),e(321),e(601),e(752),e(603),"$2-$3",e(258),e(534),e(376),e(769),e(254),e(392),e(788),e(216),e(521),e(295),e(267),e(255),"preferred-size",e(629),"line",e(181),e(797),e(593),e(330),e(288),"compat",e(595),e(186),e(767),e(384),e(508),e(339),"prepend","push",e(503),e(496),e(472),e(276),'style[data-emotion^="',e(695),e(346),e(213),e(789),e(715),"head",e(567),"448GdQtAv",e(600),e(711),e(262),e(509),e(434),"flex-",e(626),e(318),e(389),e(560),e(468),e(463),e(431),e(781),"indexOf",e(618),e(207),e(640)];return(uc=function(){return t})()}function lc(){var e=R,t=[e(320),e(388),e(405),e(579),"35AIBzSb",e(534),e(505),e(411),"1274024Vuuviq","length",e(572),e(478)];return(lc=function(){return t})()}function Nf(e,t){var n=lc();return(Nf=function(r,i){return n[r-=484]})(e,t)}function Mf(e,t){var n=dc();return(Mf=function(r,i){return n[r-=106]})(e,t)}function dc(){var e=R,t=[e(526),e(340),e(765),e(703),e(487),e(489),e(146),e(639),e(729),e(664)];return(dc=function(){return t})()}(function(){for(var e=R,t=cc,n=uc();;)try{if(parseInt(t(444))/1+parseInt(t(411))/2*(-parseInt(t(397))/3)+-parseInt(t(442))/4*(-parseInt(t(410))/5)+parseInt(t(416))/6+parseInt(t(394))/7*(-parseInt(t(375))/8)+parseInt(t(409))/9*(parseInt(t(373))/10)+-parseInt(t(377))/11*(parseInt(t(426))/12)==928149)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),n2(387),(function(){for(var e=R,t=Nf,n=lc();;)try{if(-parseInt(t(487))/1+parseInt(t(489))/2+-parseInt(t(495))/3*(parseInt(t(484))/4)+-parseInt(t(492))/5*(parseInt(t(493))/6)+parseInt(t(485))/7*(-parseInt(t(494))/8)+-parseInt(t(488))/9+parseInt(t(491))/10==772143)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Mf,n=dc();;)try{if(-parseInt(t(106))/1*(-parseInt(t(114))/2)+parseInt(t(115))/3*(parseInt(t(107))/4)+parseInt(t(112))/5+parseInt(t(110))/6+parseInt(t(108))/7+parseInt(t(109))/8+parseInt(t(113))/9*(-parseInt(t(111))/10)==797311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})();var Df=pc;function fc(){var e=R,t=["animationName","2256550Ipcodt",e(173),"compiler transform.",e(746),e(462),e(288),e(801),e(211),e(500),e(255),"number",e(791),"NO_COMPONENT_SELECTOR","1182279EAtwWa",e(682),e(321),"1304688UcogLI",e(247),"string",e(569),"styles","45ISzOCs",e(246),e(777),e(167),e(672)];return(fc=function(){return t})()}(function(){for(var e=R,t=pc,n=fc();;)try{if(-parseInt(t(249))/1+-parseInt(t(242))/2+parseInt(t(250))/3+parseInt(t(258))/4+-parseInt(t(248))/5*(parseInt(t(256))/6)+-parseInt(t(255))/7+parseInt(t(261))/8*(parseInt(t(236))/9)==662021)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();function pc(e,t){var n=fc();return(pc=function(r,i){return n[r-=236]})(e,t)}function Ff(e,t){var n=hc();return(Ff=function(r,i){return n[r-=142]})(e,t)}function hc(){var e=R,t=[e(368),e(305),"registered",e(262),"styles",e(255),e(374),e(629),e(633),e(615),e(663),e(753),e(275),e(802),"push",e(593),e(321),e(491),e(258),e(666)];return(hc=function(){return t})()}function gc(){var e=R,t=[e(578),e(321),e(258),e(629),e(255),e(449),e(250),e(333),e(502),"bind",e(573),"281145OZnPDr",e(547),"3uNmnOL",e(159),e(186),e(291),e(275),e(476),e(593),e(365),e(173),e(515),e(753),"6198910frrjDN",e(413),e(300),"animation-",e(195),e(599),"object"];return(gc=function(){return t})()}function Uf(e,t){var n=gc();return(Uf=function(r,i){return n[r-=250]})(e,t)}Object[sc(245)](null),Df(246),R(408),Df(244),(function(){for(var e=R,t=Ff,n=hc();;)try{if(-parseInt(t(146))/1+-parseInt(t(155))/2+-parseInt(t(144))/3+-parseInt(t(157))/4+parseInt(t(156))/5*(parseInt(t(149))/6)+parseInt(t(153))/7*(parseInt(t(142))/8)+parseInt(t(145))/9==509549)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Uf,n=gc();;)try{if(parseInt(t(274))/1*(-parseInt(t(253))/2)+-parseInt(t(258))/3*(-parseInt(t(270))/4)+parseInt(t(256))/5*(parseInt(t(273))/6)+parseInt(t(250))/7+-parseInt(t(276))/8*(parseInt(t(261))/9)+parseInt(t(269))/10*(parseInt(t(263))/11)+-parseInt(t(257))/12==769621)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const de=yc;function mc(){var e=R;const t=[e(191),e(751),"toCamelCase",e(446),e(325),e(210),"toPascalCase",e(284),e(154),e(726),e(288),e(617),e(768),e(343),e(394),"4804168lIEQdb",e(410),e(539),e(430),e(678),e(353),"_lowerCase",e(596),e(733),e(518),"charAt",e(687),e(527),e(262),"42wLrOPC",e(285),"toLowerCase",e(470),e(514)];return(mc=function(){return t})()}function Bf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(){var e=R;const t=yc,n=mc();for(;;)try{if(-parseInt(t(224))/1+parseInt(t(230))/2+-parseInt(t(242))/3*(parseInt(t(238))/4)+-parseInt(t(236))/5+-parseInt(t(228))/6*(-parseInt(t(252))/7)+-parseInt(t(240))/8+parseInt(t(227))/9==959733)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();class vc{static[de(241)](t,n=!1){const r=de;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[R(429)](t,n=!1){var r=R;const i=de;return n?this[i(244)](t)[i(233)](/ /g," "):t[r(429)]()}static[R(741)](t){const n=de;return this[n(249)](n(241))(t)}static[de(234)](t){const n=de;return this[n(249)](n(220))(t)}static[de(225)](t){var n=R;const r=de;return this[r(239)](t)[n(527)](((i,o)=>o===0?i[n(429)]():this[r(222)](i[r(220)]())))[r(253)]("")}static[de(229)](t){var n=R;const r=de;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[de(243)](t){const n=de;return this[n(239)](t)[n(253)]("-")}static[R(761)](t){const n=de;return this[R(410)](t)[n(253)]("_")}static[de(245)](t){return this[de(244)](t).replace(/ /g,".")}static[de(221)](t){const n=de;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=de;return this[n(244)](t)[n(233)](/ /g,"-")}static[de(237)](t){return this[de(239)](t)}static[de(239)](t){const n=de;return t[n(233)](/([a-z])([A-Z])/g,n(231))[n(233)](/[\s_-]+/g," ")[n(220)]()[n(247)](/[a-zà-öø-ÿ0-9]+/gi)||[]}static[R(538)](t){var n=R;const r=de;return this[r(239)](t)[n(527)]((i=>i[r(220)]()))[r(253)](" ")}static[de(222)](t){const n=de;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=de;return this[R(410)](t)[n(250)]((r=>this[n(222)](r)))[n(253)](" ")}}function yc(e,t){const n=mc();return(yc=function(r,i){return n[r-=220]})(e,t)}Bf(vc,R(748),((e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:i=de(223)}={splitChar:" ",joinChar:" ",to:de(223)})=>{const o=de,s=e!==void 0?e[o(226)]():"";return s?t?vc[o(235)](s):s[o(251)](n).map((a=>{var c=yt;const u=o;return i===u(232)?a[u(248)](0)[c(571)]()+a[u(246)](1)[c(429)]():a[u(248)](0).toUpperCase()+a[u(246)](1)[u(220)]()}))[o(253)](r):""})),Bf(vc,de(249),(e=>t=>{var n=R;const r=de;if(!t)return"";const i=t[r(246)](0,1),o=t[r(246)](1);return i[e]!==void 0&&n(672)==typeof i[e]?i[e]()+o:t}));const r2=bc;function bc(e,t){const n=wc();return(bc=function(r,i){return n[r-=328]})(e,t)}function yt(e,t){var n=ma();return(yt=function(r,i){return n[r-=141]})(e,t)}function wc(){var e=R;const t=[e(460),e(638),"pascal",e(620),e(152),e(353),"object",e(796),e(719),e(761),e(536),e(222),e(758),e(356),e(747),e(704),e(527),e(194),e(681),e(561)];return(wc=function(){return t})()}(function(){var e=R;const t=bc,n=wc();for(;;)try{if(parseInt(t(337))/1*(parseInt(t(342))/2)+-parseInt(t(329))/3+parseInt(t(346))/4+parseInt(t(345))/5+-parseInt(t(341))/6+-parseInt(t(333))/7*(-parseInt(t(339))/8)+-parseInt(t(330))/9==892829)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),R(681),r2(332);function Ec(){var e=R;const t=[e(314),e(249),e(764),e(792),"7920680CrCzXO",e(776),"kebab",e(532),e(400),"1889976zPDrSf",e(681),e(165),"574270pCgwUB"];return(Ec=function(){return t})()}function $f(e,t){const n=Ec();return($f=function(r,i){return n[r-=199]})(e,t)}function Vf(e,t){const n=Sc();return(Vf=function(r,i){return n[r-=310]})(e,t)}function Sc(){var e=R;const t=["strategy","5941134AnJjDR",e(435),"REQUIRED",e(403),e(298),e(507),e(277),e(304),e(185),e(217),"168yAApGZ","210166RwrXjV",e(288),"replacer",e(660),e(341),e(431),e(422),e(497),"parameters.search"];return(Sc=function(){return t})()}function zf(e,t){const n=_c();return(zf=function(r,i){return n[r-=245]})(e,t)}function _c(){var e=R;const t=[e(757),e(288),"749930AnkLQM",e(345),e(475),e(244),e(395),e(316),"77UAdnad",e(161),e(245),e(446),e(286),e(725)];return(_c=function(){return t})()}function Cc(){var e=R;const t=[e(235),e(583),e(580),e(224),e(355),e(787),e(653),e(256),e(612),"90faVQnR",e(486)];return(Cc=function(){return t})()}function Hf(e,t){const n=Cc();return(Hf=function(r,i){return n[r-=199]})(e,t)}function Tc(){var e=R;const t=["location",e(728),e(574),"2xpcQKU","push","768628jYCGxS",e(756),"24FLVsmp",e(752),e(293),"978200aOzrna",e(488),"63KlvtSY",e(277),e(553),e(231),e(679),e(336),e(507),e(422),e(527)];return(Tc=function(){return t})()}function jf(e,t){const n=Tc();return(jf=function(r,i){return n[r-=482]})(e,t)}function Ic(e,t){const n=xc();return(Ic=function(r,i){return n[r-=252]})(e,t)}function xc(){var e=R;const t=[e(759),e(605),e(261),e(585),e(790),e(383),e(637),"104DOhoZO","preconnect",e(215),e(175),"5jiSoDi",e(658)];return(xc=function(){return t})()}(function(){var e=R;const t=$f,n=Ec();for(;;)try{if(parseInt(t(206))/1*(-parseInt(t(208))/2)+-parseInt(t(199))/3*(parseInt(t(210))/4)+parseInt(t(204))/5+-parseInt(t(201))/6+-parseInt(t(200))/7+parseInt(t(209))/8+parseInt(t(205))/9==606311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=R;const t=Vf,n=Sc();for(;;)try{if(parseInt(t(317))/1*(-parseInt(t(321))/2)+-parseInt(t(314))/3*(parseInt(t(319))/4)+parseInt(t(325))/5*(-parseInt(t(310))/6)+-parseInt(t(313))/7*(-parseInt(t(320))/8)+-parseInt(t(324))/9+parseInt(t(328))/10+parseInt(t(311))/11==808336)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=R;const t=zf,n=_c();for(;;)try{if(-parseInt(t(252))/1+-parseInt(t(249))/2*(-parseInt(t(257))/3)+parseInt(t(254))/4+-parseInt(t(253))/5*(-parseInt(t(258))/6)+parseInt(t(246))/7+-parseInt(t(245))/8*(parseInt(t(250))/9)+-parseInt(t(256))/10*(parseInt(t(248))/11)==300232)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=Hf,n=Cc();for(;;)try{if(-parseInt(t(200))/1*(parseInt(t(203))/2)+parseInt(t(209))/3+parseInt(t(202))/4+-parseInt(t(206))/5*(parseInt(t(201))/6)+-parseInt(t(199))/7*(parseInt(t(208))/8)+parseInt(t(207))/9*(parseInt(t(205))/10)+parseInt(t(204))/11==198596)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=jf,n=Tc();for(;;)try{if(parseInt(t(488))/1+-parseInt(t(497))/2*(parseInt(t(496))/3)+-parseInt(t(501))/4*(parseInt(t(487))/5)+-parseInt(t(482))/6+parseInt(t(499))/7+-parseInt(t(495))/8+-parseInt(t(485))/9*(-parseInt(t(483))/10)==155517)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(function(){var e=R;const t=Ic,n=xc();for(;;)try{if(parseInt(t(254))/1+parseInt(t(257))/2+parseInt(t(260))/3+-parseInt(t(252))/4*(-parseInt(t(253))/5)+-parseInt(t(258))/6+parseInt(t(256))/7+parseInt(t(262))/8*(-parseInt(t(261))/9)==402722)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=Ac,n=kc();for(;;)try{if(parseInt(t(397))/1*(-parseInt(t(389))/2)+-parseInt(t(394))/3*(parseInt(t(383))/4)+parseInt(t(391))/5+-parseInt(t(384))/6*(-parseInt(t(388))/7)+parseInt(t(382))/8*(-parseInt(t(393))/9)+parseInt(t(386))/10+parseInt(t(392))/11==453357)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();function Ac(e,t){const n=kc();return(Ac=function(r,i){return n[r-=382]})(e,t)}function kc(){var e=R;const t=[e(581),e(589),e(702),e(759),"api","9885ktAjwX","515144gJwABd",e(461),e(352),e(455),e(709),"environment",e(782),e(360),e(790),e(609)];return(kc=function(){return t})()}function Rc(e,t){const n=Pc();return(Rc=function(r,i){return n[r-=188]})(e,t)}function Pc(){var e=R;const t=[e(513),e(744),e(230),e(151),e(354),e(170),e(638),"42ZfbLkm",e(529),e(527),"length",e(656),e(793),e(328),e(479),e(737),"84AZtHRP"];return(Pc=function(){return t})()}(function(){var e=R;const t=Rc,n=Pc();for(;;)try{if(parseInt(t(200))/1*(-parseInt(t(191))/2)+parseInt(t(195))/3*(-parseInt(t(193))/4)+-parseInt(t(196))/5*(parseInt(t(192))/6)+-parseInt(t(188))/7+-parseInt(t(203))/8+-parseInt(t(190))/9*(parseInt(t(189))/10)+parseInt(t(202))/11*(parseInt(t(204))/12)==863321)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Ro=Oc;function Oc(e,t){const n=Lc();return(Oc=function(r,i){return n[r-=135]})(e,t)}(function(){var e=R;const t=Oc,n=Lc();for(;;)try{if(-parseInt(t(139))/1*(parseInt(t(147))/2)+-parseInt(t(142))/3+-parseInt(t(140))/4+-parseInt(t(143))/5*(-parseInt(t(148))/6)+parseInt(t(137))/7*(parseInt(t(141))/8)+-parseInt(t(138))/9+-parseInt(t(136))/10*(-parseInt(t(145))/11)==902131)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const i2={environment:e=>typeof e===Ro(146)&&/^(sandbox|production)$/[R(690)](e),version:e=>e===Ro(144)||typeof e===Ro(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[Ro(135)](e)},o2=e=>{var t;((n,r)=>{var i=R;const o=Rc;if(n&&r){const s=Object[i(359)](n)[i(422)]((a=>!r[o(194)](a)||r[a]===void 0||!n[a](r[a])))[o(197)]((a=>new Co(Tt[o(201)],a,!0)));if(s[o(198)]){const[a]=s;throw a}}})(i2,e),(t=e)&&(Ma=Object.assign({},Ma,t))};function Lc(){var e=R;const t=[e(591),e(576),e(611),"4202RbmDMY",e(445),e(727),e(517),e(690),e(624),e(292),e(717),e(299),"1611912xHkDlR",e(452)];return(Lc=function(){return t})()}function Nc(){var e=R;const t=[e(379),e(380),e(686),e(522),"248VddyCN","1828569LfJoFC","11940faSemP",e(661),e(482),"9YYlhsV",e(457),e(651),e(375),e(255),e(641),e(160)];return(Nc=function(){return t})()}(function(){var e=R;const t=Mc,n=Nc();for(;;)try{if(-parseInt(t(271))/1*(-parseInt(t(278))/2)+-parseInt(t(275))/3+-parseInt(t(274))/4*(-parseInt(t(266))/5)+-parseInt(t(280))/6*(-parseInt(t(272))/7)+parseInt(t(277))/8*(-parseInt(t(279))/9)+parseInt(t(269))/10*(-parseInt(t(270))/11)+-parseInt(t(276))/12*(-parseInt(t(268))/13)==356241)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();function Mc(e,t){const n=Nc();return(Mc=function(r,i){return n[r-=266]})(e,t)}function Dc(){var e=R;const t=[e(422),e(530),e(338),e(202),"push",e(183),e(740),e(763),"137247nsOmnY",e(544),e(554),e(628),e(297),e(555)];return(Dc=function(){return t})()}function qf(e,t){const n=Dc();return(qf=function(r,i){return n[r-=169]})(e,t)}function Wf(e,t){var n=Fc();return(Wf=function(r,i){return n[r-=337]})(e,t)}function Fc(){var e=R,t=[e(466),e(762),e(255),e(548),e(391),e(557),e(277),e(706),"2051dwZdDh",e(199),e(503),e(342),e(422),"182295YeOYne",e(382),e(575),e(520),e(629),"apply","40247440IrIkgT",e(672),"push","getOwnPropertyDescriptors","indexOf",e(326),e(359)];return(Fc=function(){return t})()}function Uc(){var e=R,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return(Uc=function(){return t})()}function Gf(e,t){var n=Uc();return(Gf=function(r,i){return n[r-=171]})(e,t)}function Bc(){var e=["INVALID","UNHANDLED","HTTP","UNAUTHORIZED","13163230kGdpsc","856juyAkB","TIMEOUT","350256uPlzjN","5054ruXNQI","2450577zCNjjI","2339148NeQscF","REQUEST_TIMEOUT","REQUIRED","BAD_REQUEST","60389xcocgx","11tPlygx","NOT_FOUND","301vJXIvb","UNABLE_TO_FIND","NOT_LOADED","6497910YprBBF","40ngIbUX","UNDEFINED"];return(Bc=function(){return e})()}var Po,yn,At,Kf,bt,bn,Yf,Jf,Oo,Zf,$c,Lo;function No(e,t){var n=Bc();return(No=function(r,i){return n[r-=335]})(e,t)}function Vc(e,t){var n=zc();return(Vc=function(r,i){return n[r-=341]})(e,t)}function zc(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(zc=function(){return e})()}function Hc(e,t){var n=jc();return(Hc=function(r,i){return n[r-=235]})(e,t)}function jc(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(jc=function(){return e})()}function qc(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(qc=function(){return e})()}function Xf(e,t){var n=qc();return(Xf=function(r,i){return n[r-=366]})(e,t)}function Mo(e,t){const n=Wc();return(Mo=function(r,i){return n[r-=152]})(e,t)}(function(){var e=R;const t=qf,n=Dc();for(;;)try{if(-parseInt(t(172))/1*(-parseInt(t(174))/2)+parseInt(t(179))/3+parseInt(t(177))/4*(-parseInt(t(173))/5)+-parseInt(t(182))/6*(-parseInt(t(181))/7)+parseInt(t(169))/8+-parseInt(t(170))/9+parseInt(t(178))/10*(-parseInt(t(180))/11)==757080)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Wf,n=Fc();;)try{if(parseInt(t(355))/1+parseInt(t(342))/2*(parseInt(t(357))/3)+parseInt(t(338))/4+-parseInt(t(362))/5+parseInt(t(340))/6*(parseInt(t(339))/7)+parseInt(t(358))/8*(parseInt(t(344))/9)+-parseInt(t(350))/10==959569)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Gf,n=Uc();;)try{if(-parseInt(t(172))/1+-parseInt(t(175))/2*(-parseInt(t(173))/3)+parseInt(t(174))/4+-parseInt(t(177))/5+-parseInt(t(171))/6*(-parseInt(t(180))/7)+-parseInt(t(178))/8*(parseInt(t(179))/9)+parseInt(t(176))/10==940869)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=No,t=Bc();;)try{if(parseInt(e(336))/1*(-parseInt(e(350))/2)+-parseInt(e(351))/3+parseInt(e(352))/4+parseInt(e(340))/5*(parseInt(e(349))/6)+parseInt(e(356))/7*(-parseInt(e(347))/8)+parseInt(e(339))/9+-parseInt(e(346))/10*(-parseInt(e(357))/11)===589533)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(yn=Po||(Po={}))[(At=No)(354)]="REQUIRED",yn[At(341)]=At(341),yn[At(337)]="UNABLE_TO_FIND",yn.NOT_LOADED=At(338),yn[At(342)]=At(342),yn.HTTP=At(344),yn[At(348)]=At(348),yn[At(343)]=At(343),bt=Kf||(Kf={}),bn=No,bt[bt.OK=200]="OK",bt[bt[bn(355)]=400]=bn(355),bt[bt[bn(335)]=404]=bn(335),bt[bt.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",bt[bt[bn(353)]=408]=bn(353),bt[bt.UNAUTHORIZED=401]=bn(345),(function(){for(var e=Vc,t=zc();;)try{if(parseInt(e(345))/1+-parseInt(e(344))/2+-parseInt(e(351))/3+parseInt(e(347))/4+-parseInt(e(350))/5*(-parseInt(e(346))/6)+parseInt(e(343))/7+parseInt(e(348))/8===704730)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(Jf=Yf||(Yf={}))[(Oo=Vc)(349)]=Oo(342),Jf[Oo(352)]=Oo(341),(function(){for(var e=Hc,t=jc();;)try{if(-parseInt(e(236))/1+-parseInt(e(248))/2+parseInt(e(243))/3*(parseInt(e(245))/4)+parseInt(e(242))/5*(-parseInt(e(239))/6)+parseInt(e(237))/7*(-parseInt(e(244))/8)+parseInt(e(246))/9+-parseInt(e(238))/10*(-parseInt(e(241))/11)===902110)break;t.push(t.shift())}catch{t.push(t.shift())}})(),$c=Zf||(Zf={}),Lo=Hc,$c.PRODUCTION=Lo(240),$c[Lo(235)]=Lo(247),(function(){for(var e=Xf,t=qc();;)try{if(-parseInt(e(368))/1*(-parseInt(e(376))/2)+-parseInt(e(371))/3*(parseInt(e(367))/4)+parseInt(e(374))/5*(parseInt(e(373))/6)+parseInt(e(370))/7*(parseInt(e(372))/8)+-parseInt(e(366))/9+-parseInt(e(377))/10*(-parseInt(e(378))/11)+-parseInt(e(369))/12*(parseInt(e(375))/13)===152250)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(function(){const e=Mo,t=Wc();for(;;)try{if(-parseInt(e(166))/1*(parseInt(e(155))/2)+parseInt(e(157))/3+parseInt(e(164))/4+-parseInt(e(159))/5+parseInt(e(158))/6*(parseInt(e(168))/7)+parseInt(e(165))/8*(-parseInt(e(152))/9)+parseInt(e(154))/10===424938)break;t.push(t.shift())}catch{t.push(t.shift())}})();const s2=()=>new Promise(((e,t)=>{const n=Mo;if(((r=xo[R(172)])=>{const i=Mc;try{return document.querySelectorAll(i(273)+r+i(281))[i(267)]>0}catch{return!1}})()&&window[n(153)])e(window[n(153)]);else if(!window[n(153)]){const r=(()=>{const i=Mo,o=document.createElement(i(161));return o.src=xo.getFullCdn(i(156),i(163)),Af(o),o})();return r.onload=()=>{const i=n;window[i(153)]?e(window.APTokenizer):t(new Co(Po[i(167)],i(160),!0))},void(r[n(162)]=()=>t(new Co(Po[n(169)],"SCRIPT",!0)))}}));function Wc(){const e=["31456JYMHzf","928wCafiN","156wRIJHE","UNDEFINED","2317DECIua","NOT_LOADED","62802oYTinX","APTokenizer","20534150rAmYXS","8482vGJDwh","tokenizer-sdk","793641JyeeYi","2676hrMTeo","2887350YWJLUu","Astropay Web Tokenizer","script","onerror","astropay-tokenizer.min.js"];return(Wc=function(){return e})()}var Gc=cn;function Qf(e,t,n,r,i,o,s){var a=cn;try{var c=e[o](s),u=c[a(293)]}catch(l){return void n(l)}c[a(304)]?t(u):Promise.resolve(u)[a(303)](r,i)}(function(){for(var e=cn,t=Kc();;)try{if(-parseInt(e(297))/1+-parseInt(e(301))/2*(parseInt(e(302))/3)+parseInt(e(292))/4+parseInt(e(305))/5+-parseInt(e(300))/6+parseInt(e(295))/7*(parseInt(e(294))/8)+parseInt(e(306))/9*(parseInt(e(298))/10)===667472)break;t.push(t.shift())}catch{t.push(t.shift())}})(),Promise[Gc(308)]()[Gc(303)]((()=>{var e=Gc;typeof window!==e(299)&&!window[e(291)]&&((()=>{const t=Ac;ko(t(385),pr[t(395)][t(390)][Fn()[t(387)]]),ko(t(385),pr[t(395)][t(396)][Fn()[t(387)]])})(),(()=>{var t=R;const n=Ic;ko(n(263),pr[n(255)][n(259)][Fn()[n(264)]]),ko(n(263),pr[n(255)][t(363)][Fn()[n(264)]])})())}));const a2=(ep=function*(e){o2(e);const t={initRevealer:(n=e)=>{var r,i=cn;return(r=window[i(291)])===null||r===void 0?void 0:r[i(307)](n)},initCollector:(n=e)=>{var r,i=cn;return(r=window[i(291)])===null||r===void 0?void 0:r[i(289)](n)}};return new Promise(((n,r)=>{var i=cn;typeof window!==i(299)?window[i(291)]?n(t):s2()[i(303)]((()=>{n(t)}))[i(296)]((o=>{r(o)})):r(i(290))}))},tp=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=ep[cn(309)](e,t);function o(a){Qf(i,n,r,o,s,"next",a)}function s(a){Qf(i,n,r,o,s,"throw",a)}o(void 0)}))},function(e){return tp[cn(309)](this,arguments)});var ep,tp;function cn(e,t){var n=Kc();return(cn=function(r,i){return n[r-=289]})(e,t)}function Kc(){var e=["APTokenizer","4582976tSGCgi","value","373232tEwSlg","63KVvFap","catch","1156122MmdZsQ","142260eHWUOj","undefined","7303908VsgDsd","6URBYWa","276963Gnzkoo","then","done","3355345JCZnlM","684orEnOE","initRevealer","resolve","apply","initCollector","new SDKError(ErrorType.UNDEFINED, 'window', true)"];return(Kc=function(){return e})()}var Yc=function(e,t){return Yc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Yc(e,t)};function nt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var U=function(){return U=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},U.apply(this,arguments)};function Do(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function M(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function N(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(l){u=[6,l],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Q(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function ee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function hr(e){return this instanceof hr?(this.v=e,this):new hr(e)}function c2(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){r[h]&&(i[h]=function(g){return new Promise(function(m,v){o.push([h,g,m,v])>1||c(h,g)})},p&&(i[h]=p(i[h])))}function c(h,p){try{u(r[h](p))}catch(g){f(o[0][3],g)}}function u(h){h.value instanceof hr?Promise.resolve(h.value.v).then(l,d):f(o[0][2],h)}function l(h){c("next",h)}function d(h){c("throw",h)}function f(h,p){h(p),o.shift(),o.length&&c(o[0][0],o[0][1])}}function u2(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Q=="function"?Q(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;var wn;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(wn||(wn={}));var Nt;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(Nt||(Nt={}));var np="-",Fo="AMP",l2="".concat(Fo,"_unsent"),rp="$default_instance",ip="https://api2.amplitude.com/2/httpapi",d2="https://api.eu.amplitude.com/2/httpapi",f2="https://api2.amplitude.com/batch",p2="https://api.eu.amplitude.com/batch",h2="utm_campaign",g2="utm_content",m2="utm_id",v2="utm_medium",y2="utm_source",b2="utm_term",op="dclid",sp="fbclid",ap="gbraid",cp="gclid",up="ko_click_id",lp="li_fat_id",dp="msclkid",fp="rdt_cid",pp="ttclid",hp="twclid",gp="wbraid",Uo={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},Bo=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],w2=["authorization","cookie","set-cookie"],E2=1e3,Jc=function(e){if(Object.keys(e).length>E2)return!1;for(var t in e){var n=e[t];if(!mp(t,n))return!1}return!0},mp=function(e,t){var n,r;if(typeof e!="string")return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if(typeof a=="object")i=i&&Jc(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(t==null)return!1;if(typeof t=="object")return Jc(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},fi=(function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return U({},this._properties)},e.prototype.set=function(t,n){return this._safeSet(we.SET,t,n),this},e.prototype.setOnce=function(t,n){return this._safeSet(we.SET_ONCE,t,n),this},e.prototype.append=function(t,n){return this._safeSet(we.APPEND,t,n),this},e.prototype.prepend=function(t,n){return this._safeSet(we.PREPEND,t,n),this},e.prototype.postInsert=function(t,n){return this._safeSet(we.POSTINSERT,t,n),this},e.prototype.preInsert=function(t,n){return this._safeSet(we.PREINSERT,t,n),this},e.prototype.remove=function(t,n){return this._safeSet(we.REMOVE,t,n),this},e.prototype.add=function(t,n){return this._safeSet(we.ADD,t,n),this},e.prototype.unset=function(t){return this._safeSet(we.UNSET,t,np),this},e.prototype.clearAll=function(){return this._properties={},this._properties[we.CLEAR_ALL]=np,this},e.prototype._safeSet=function(t,n,r){if(this._validate(t,n,r)){var i=this._properties[t];return i===void 0&&(i={},this._properties[t]=i),i[n]=r,this._propertySet.add(n),!0}return!1},e.prototype._validate=function(t,n,r){return this._properties[we.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:t===we.ADD?typeof r=="number":t!==we.UNSET&&t!==we.REMOVE?mp(n,r):!0},e})(),we;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(we||(we={}));var S2=[we.CLEAR_ALL,we.UNSET,we.SET,we.SET_ONCE,we.ADD,we.APPEND,we.PREPEND,we.PREINSERT,we.POSTINSERT,we.REMOVE],_2="Event tracked successfully",C2="Unexpected error occurred",T2="Event rejected due to exceeded retry count",I2="Event skipped due to optOut config",x2="Event rejected due to missing API key",A2="Invalid API key",k2="Client not initialized",Ne;(function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"})(Ne||(Ne={}));var gr=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Ne.Unknown),{event:e,code:t,message:n}},Ae=function(){var e="ampIntegrationContext";if(typeof globalThis<"u"&&typeof globalThis[e]<"u")return globalThis[e];if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},R2=function(e){return e?(e^Math.random()*16>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,En)},vp=ee([],$(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),En=function(e){var t,n=Ae();if(!(!((t=n==null?void 0:n.crypto)===null||t===void 0)&&t.getRandomValues))return R2(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ee([],$(r.entries()),!1).map(function(i){var o=$(i,2),s=o[0],a=o[1];return[4,6,8,10].includes(s)?"-".concat(vp[a]):vp[a]}).join("")},P2=(function(){function e(t){this.client=t,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(t,n){var r,i;return M(this,void 0,void 0,function(){return N(this,function(o){switch(o.label){case 0:return this.plugins.some(function(s){return s.name===t.name})?(this.loggerProvider.warn("Plugin with name ".concat(t.name," already exists, skipping registration")),[2]):(t.name===void 0&&(t.name=En(),this.loggerProvider.warn(`Plugin name is undefined.
|
|
541
|
+
Generating a random UUID for plugin name: `.concat(t.name,`.
|
|
542
|
+
Set a name for the plugin to prevent it from being added multiple times.`))),t.type=(r=t.type)!==null&&r!==void 0?r:"enrichment",[4,(i=t.setup)===null||i===void 0?void 0:i.call(t,n,this.client)]);case 1:return o.sent(),this.plugins.push(t),[2]}})})},e.prototype.deregister=function(t,n){var r;return M(this,void 0,void 0,function(){var i,o;return N(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(a){return a.name===t}),i===-1?(n.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(r=o.teardown)===null||r===void 0?void 0:r.call(o)]);case 1:return s.sent(),[2]}})})},e.prototype.reset=function(t){this.applying=!1;var n=this.plugins;n.map(function(r){var i;return(i=r.teardown)===null||i===void 0?void 0:i.call(r)}),this.plugins=[],this.client=t},e.prototype.push=function(t){var n=this;return new Promise(function(r){n.queue.push([t,r]),n.scheduleApply(0)})},e.prototype.scheduleApply=function(t){var n=this;this.applying||(this.applying=!0,setTimeout(function(){n.apply(n.queue.shift()).then(function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)})},t))},e.prototype.apply=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s,a,c,h,p,u,l,d,f,h,p,g,m,v,y,b,w,C;return N(this,function(_){switch(_.label){case 0:if(!t)return[2];n=$(t,1),r=n[0],i=$(t,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",r),s=this.plugins.filter(function(E){return E.type==="before"}),_.label=1;case 1:_.trys.push([1,6,7,8]),a=Q(s),c=a.next(),_.label=2;case 2:return c.done?[3,5]:(h=c.value,h.execute?[4,h.execute(U({},r))]:[3,4]);case 3:if(p=_.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),_.label=4;case 4:return c=a.next(),[3,2];case 5:return[3,8];case 6:return u=_.sent(),y={error:u},[3,8];case 7:try{c&&!c.done&&(b=a.return)&&b.call(a)}finally{if(y)throw y.error}return[7];case 8:l=this.plugins.filter(function(E){return E.type==="enrichment"||E.type===void 0}),_.label=9;case 9:_.trys.push([9,14,15,16]),d=Q(l),f=d.next(),_.label=10;case 10:return f.done?[3,13]:(h=f.value,h.execute?[4,h.execute(U({},r))]:[3,12]);case 11:if(p=_.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),_.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return g=_.sent(),w={error:g},[3,16];case 15:try{f&&!f.done&&(C=d.return)&&C.call(d)}finally{if(w)throw w.error}return[7];case 16:return m=this.plugins.filter(function(E){return E.type==="destination"}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(r))),v=m.map(function(E){var P=U({},r);return E.execute(P).catch(function(T){return gr(P,0,String(T))})}),Promise.all(v).then(function(E){var P=$(E,1),T=P[0],I=T||gr(r,100,"Event not tracked, no destination plugins on the instance");o(I)}),[2]}})})},e.prototype.flush=function(){return M(this,void 0,void 0,function(){var t,n,r,i=this;return N(this,function(o){switch(o.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map(function(s){return i.apply(s)}))];case 1:return o.sent(),n=this.plugins.filter(function(s){return s.type==="destination"}),r=n.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(r)];case 2:return o.sent(),[2]}})})},e.prototype.onIdentityChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onIdentityChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onSessionIdChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onSessionIdChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onOptOutChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onOptOutChanged)===null||r===void 0||r.call(n,t)})},e})(),O2=function(e,t,n){var r=typeof e=="string"?{event_type:e}:e;return U(U(U({},r),n),t&&{event_properties:t})},yp=function(e,t){var n=U(U({},t),{event_type:Nt.IDENTIFY,user_properties:e.getUserProperties()});return n},L2=function(e,t,n,r){var i,o=U(U({},r),{event_type:Nt.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)});return o},N2=function(e,t,n){var r,i=new fi;i.set(e,t);var o=U(U({},n),{event_type:Nt.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)});return o},M2=function(e,t){return U(U({},t),{event_type:Nt.REVENUE,event_properties:e.getEventProperties()})},at=function(e){return{promise:e||Promise.resolve()}},D2=(function(){function e(t){t===void 0&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new P2(this),this.name=t}return e.prototype._init=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){switch(n.label){case 0:return this.config=t,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return n.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s,a,c,u;return N(this,function(l){switch(l.label){case 0:n=this[t],this[t]=[],l.label=1;case 1:l.trys.push([1,8,9,10]),r=Q(n),i=r.next(),l.label=2;case 2:return i.done?[3,7]:(o=i.value,s=o(),s&&"promise"in s?[4,s.promise]:[3,4]);case 3:return l.sent(),[3,6];case 4:return[4,s];case 5:l.sent(),l.label=6;case 6:return i=r.next(),[3,2];case 7:return[3,10];case 8:return a=l.sent(),c={error:a},[3,10];case 9:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(c)throw c.error}return[7];case 10:return this[t].length?[4,this.runQueuedFunctions(t)]:[3,12];case 11:l.sent(),l.label=12;case 12:return[2]}})})},e.prototype.track=function(t,n,r){var i=O2(t,n,r);return at(this.dispatch(i))},e.prototype.identify=function(t,n){var r=yp(t,n);return at(this.dispatch(r))},e.prototype.groupIdentify=function(t,n,r,i){var o=L2(t,n,r,i);return at(this.dispatch(o))},e.prototype.setGroup=function(t,n,r){var i=N2(t,n,r);return at(this.dispatch(i))},e.prototype.revenue=function(t,n){var r=M2(t,n);return at(this.dispatch(r))},e.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),at())},e.prototype._addPlugin=function(t){return at(this.timeline.register(t,this.config))},e.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),at())},e.prototype._removePlugin=function(t){return at(this.timeline.deregister(t,this.config))},e.prototype.dispatchWithCallback=function(t,n){if(!this.isReady)return n(gr(t,0,k2));this.process(t).then(n)},e.prototype.dispatch=function(t){return M(this,void 0,void 0,function(){var n=this;return N(this,function(r){return this.isReady?[2,this.process(t)]:[2,new Promise(function(i){n.dispatchQ.push(n.dispatchWithCallback.bind(n,t,i))})]})})},e.prototype.getOperationAppliedUserProperties=function(t){var n={};if(t===void 0)return n;var r={};return Object.keys(t).forEach(function(i){Object.values(wn).includes(i)||(r[i]=t[i])}),S2.forEach(function(i){if(Object.keys(t).includes(i)){var o=t[i];switch(i){case wn.CLEAR_ALL:Object.keys(n).forEach(function(s){delete n[s]});break;case wn.UNSET:Object.keys(o).forEach(function(s){delete n[s]});break;case wn.SET:Object.assign(n,o);break}}}),Object.assign(n,r),n},e.prototype.process=function(t){return M(this,void 0,void 0,function(){var n,o,r,i,o;return N(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,gr(t,0,I2)]:(t.event_type===Nt.IDENTIFY&&(n=this.getOperationAppliedUserProperties(t.user_properties),this.timeline.onIdentityChanged({userProperties:n})),[4,this.timeline.push(t)]);case 1:return o=s.sent(),o.code===200?this.config.loggerProvider.log(o.message):o.code===100?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=s.sent(),i=String(r),this.config.loggerProvider.error(i),o=gr(t,0,i),[2,o];case 3:return[2]}})})},e.prototype.setOptOut=function(t){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!t));return}this._setOptOut(t)},e.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.timeline.onOptOutChanged(t),this.config.optOut=!!t)},e.prototype.flush=function(){return at(this.timeline.flush())},e.prototype.plugin=function(t){var n=this.timeline.plugins.find(function(r){return r.name===t});if(n===void 0){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t));return}return n},e.prototype.plugins=function(t){return this.timeline.plugins.filter(function(n){return n instanceof t})},e})(),F2=(function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(t){return this.productId=t,this},e.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},e.prototype.setPrice=function(t){return this.price=t,this},e.prototype.setRevenueType=function(t){return this.revenueType=t,this},e.prototype.setCurrency=function(t){return this.currency=t,this},e.prototype.setRevenue=function(t){return this.revenue=t,this},e.prototype.setReceipt=function(t){return this.receipt=t,this},e.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},e.prototype.setEventProperties=function(t){return Jc(t)&&(this.properties=t),this},e.prototype.getEventProperties=function(){var t=this.properties?U({},this.properties):{};return t[Wt.REVENUE_PRODUCT_ID]=this.productId,t[Wt.REVENUE_QUANTITY]=this.quantity,t[Wt.REVENUE_PRICE]=this.price,t[Wt.REVENUE_TYPE]=this.revenueType,t[Wt.REVENUE_CURRENCY]=this.currency,t[Wt.REVENUE]=this.revenue,t[Wt.RECEIPT]=this.receipt,t[Wt.RECEIPT_SIG]=this.receiptSig,t},e})(),Wt;(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"})(Wt||(Wt={}));var U2=function(e,t){var n=Math.max(t,1);return e.reduce(function(r,i,o){var s=Math.floor(o/n);return r[s]||(r[s]=[]),r[s].push(i),r},[])},wt;(function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"})(wt||(wt={}));var $o="Amplitude Logger ",bp=(function(){function e(){this.logLevel=wt.None}return e.prototype.disable=function(){this.logLevel=wt.None},e.prototype.enable=function(t){t===void 0&&(t=wt.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Verbose||console.log("".concat($o,"[Log]: ").concat(t.join(" ")))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Warn||console.warn("".concat($o,"[Warn]: ").concat(t.join(" ")))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Error||console.error("".concat($o,"[Error]: ").concat(t.join(" ")))},e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Debug||console.log("".concat($o,"[Debug]: ").concat(t.join(" ")))},e})(),Vo=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:rp,logLevel:wt.Warn,loggerProvider:new bp,offline:!1,optOut:!1,serverUrl:ip,serverZone:"US",useBatch:!1}},B2=(function(){function e(t){var n,r,i,o;this._optOut=!1;var s=Vo();this.apiKey=t.apiKey,this.flushIntervalMillis=(n=t.flushIntervalMillis)!==null&&n!==void 0?n:s.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||s.flushQueueSize,this.instanceName=t.instanceName||s.instanceName,this.loggerProvider=t.loggerProvider||s.loggerProvider,this.logLevel=(r=t.logLevel)!==null&&r!==void 0?r:s.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.offline=t.offline!==void 0?t.offline:s.offline,this.optOut=(i=t.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||s.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=(o=t.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var a=wp(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(t){this._optOut=t},enumerable:!1,configurable:!0}),e})(),$2=function(e,t){return e==="EU"?t?p2:d2:t?f2:ip},wp=function(e,t,n){if(e===void 0&&(e=""),t===void 0&&(t=Vo().serverZone),n===void 0&&(n=Vo().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Vo().serverZone;return{serverZone:r,serverUrl:$2(r,n)}},V2=(function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(t,n){this.sdk.metrics.histogram[t]=n},e})();function Ep(e){return e>=200&&e<300}var Sp=function(e){e===void 0&&(e=0);var t=new Error().stack||"";return t.split(`
|
|
543
|
+
`).slice(2+e).map(function(n){return n.trim()})},Te=function(e){return function(){var t=U({},e.config),n=t.loggerProvider,r=t.logLevel;return{logger:n,logLevel:r}}},z2=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");try{for(var i=Q(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in e)e=e[s];else return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Ie=function(e,t){return function(){var n,r,i={};try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=z2(e,a)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},xe=function(e,t,n,r,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),c=a.logger,u=a.logLevel;if(u&&u<wt.Debug||!u||!c)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:Sp(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),c.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),c.debug(JSON.stringify(l,null,2))),d}};function H2(e){return e instanceof Error?e.message:String(e)}function zo(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var j2=(function(){function e(t){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=t==null?void 0:t.diagnosticsClient}return e.prototype.setup=function(t){var n;return M(this,void 0,void 0,function(){var r,i=this;return N(this,function(o){switch(o.label){case 0:return this.config=t,this.storageKey="".concat(l2,"_").concat(this.config.apiKey.substring(0,10)),[4,(n=this.config.storageProvider)===null||n===void 0?void 0:n.get(this.storageKey)];case 1:return r=o.sent(),r&&r.length>0&&Promise.all(r.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(t){var n=this;return t.insert_id||(t.insert_id=En()),new Promise(function(r){var i={event:t,attempts:0,callback:function(o){return r(o)},timeout:0};n.queue.push(i),n.schedule(n.config.flushIntervalMillis),n.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(t){var n=this;return t.filter(function(r){return r.attempts+=1,r.attempts<n.config.flushMaxRetries?!0:(n.fulfillRequest([r],500,T2),!1)})},e.prototype.scheduleEvents=function(t){var n=this;t.forEach(function(r){n.schedule(r.timeout===0?n.config.flushIntervalMillis:r.timeout)})},e.prototype.schedule=function(t){var n=this;if(!this.config.offline&&(this.scheduleId===null||this.scheduleId&&t>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=t,this.scheduleId=setTimeout(function(){n.queue=n.queue.map(function(r){return r.timeout=0,r}),n.flush(!0)},t);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(t){return t===void 0&&(t=!1),M(this,void 0,void 0,function(){var n,r,i,o=this;return N(this,function(s){switch(s.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),n=[],r=[],this.queue.forEach(function(a){return a.timeout===0?n.push(a):r.push(a)}),i=U2(n,this.config.flushQueueSize),[4,i.reduce(function(a,c){return M(o,void 0,void 0,function(){return N(this,function(u){switch(u.label){case 0:return[4,a];case 1:return u.sent(),[4,this.send(c,t)];case 2:return[2,u.sent()]}})})},Promise.resolve())]);case 1:return s.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(t,n){return n===void 0&&(n=!0),M(this,void 0,void 0,function(){var r,i,o,s,a;return N(this,function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,x2)];r={api_key:this.config.apiKey,events:t.map(function(u){var l=u.event;l.extra;var d=Do(l,["extra"]);return d}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new V2,c.label=1;case 1:return c.trys.push([1,3,,4]),i=wp(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,r)];case 2:return o=c.sent(),o===null?(this.fulfillRequest(t,0,C2),[2]):n?(this.handleResponse(o,t),[3,4]):("body"in o?this.fulfillRequest(t,o.statusCode,"".concat(o.status,": ").concat(zo(o))):this.fulfillRequest(t,o.statusCode,o.status),[2]);case 3:return s=c.sent(),a=H2(s),this.config.loggerProvider.error(a),this.handleResponse({status:Ne.Failed,statusCode:0},t),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,n){var r=t.status;switch(r){case Ne.Success:{this.handleSuccessResponse(t,n);break}case Ne.Invalid:{this.handleInvalidResponse(t,n);break}case Ne.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,n);break}case Ne.RateLimit:{this.handleRateLimitResponse(t,n);break}default:{this.config.loggerProvider.warn(`{code: 0, error: "Status '`.concat(r,"' provided for ").concat(n.length,' events"}')),this.handleOtherResponse(n);break}}},e.prototype.handleSuccessResponse=function(t,n){this.fulfillRequest(n,t.statusCode,_2)},e.prototype.handleInvalidResponse=function(t,n){var r=this;if(t.body.missingField||t.body.error.startsWith(A2)){this.fulfillRequest(n,t.statusCode,t.body.error);return}var i=ee(ee(ee(ee([],$(Object.values(t.body.eventsWithInvalidFields)),!1),$(Object.values(t.body.eventsWithMissingFields)),!1),$(Object.values(t.body.eventsWithInvalidIdLengths)),!1),$(t.body.silencedEvents),!1).flat(),o=new Set(i),s=n.filter(function(c,u){if(o.has(u)){r.fulfillRequest([c],t.statusCode,t.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(zo(t));var a=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(a)},e.prototype.handlePayloadTooLargeResponse=function(t,n){if(n.length===1){this.fulfillRequest(n,t.statusCode,t.body.error);return}this.config.loggerProvider.warn(zo(t)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(t,n){var r=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),s=t.body.throttledEvents,a=new Set(i),c=new Set(o),u=new Set(s),l=n.filter(function(f,h){if(f.event.user_id&&a.has(f.event.user_id)||f.event.device_id&&c.has(f.event.device_id)){r.fulfillRequest([f],t.statusCode,t.body.error);return}return u.has(h)&&(f.timeout=r.throttleTimeout),!0});l.length>0&&this.config.loggerProvider.warn(zo(t));var d=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(d)},e.prototype.handleOtherResponse=function(t){var n=this,r=t.map(function(o){return o.timeout=o.attempts*n.retryTimeout,o}),i=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(i)},e.prototype.fulfillRequest=function(t,n,r){var i,o,s;Ep(n)?(s=this.diagnosticsClient)===null||s===void 0||s.increment("analytics.events.sent",t.length):((i=this.diagnosticsClient)===null||i===void 0||i.increment("analytics.events.dropped",t.length),(o=this.diagnosticsClient)===null||o===void 0||o.recordEvent("analytics.events.dropped",{events:t.map(function(a){return a.event.event_type}),code:n,message:r,stack_trace:Sp()})),this.removeEvents(t),t.forEach(function(a){return a.callback(gr(a.event,n,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var t=this.queue.map(function(n){return n.event});this.config.storageProvider.set(this.storageKey,t)}},e.prototype.removeEvents=function(t){this.queue=this.queue.filter(function(n){return!t.some(function(r){return r.event.insert_id===n.event.insert_id})}),this.saveEvents()},e})(),q2=(function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:W2(),platform:"Web",os:void 0,deviceModel:void 0}},e})(),W2=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},G2=(function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(n){t(n)}),this.queue=[])},e})(),Sn=function(){return Sn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Sn.apply(this,arguments)};function Ho(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _p(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}typeof SuppressedError=="function"&&SuppressedError;var jo=function(e,t){var n,r,i=["string","number","boolean","undefined"],o=typeof e,s=typeof t;if(o!==s)return!1;try{for(var a=Ho(i),c=a.next();!c.done;c=a.next()){var u=c.value;if(u===o)return e===t}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var l=Array.isArray(e),d=Array.isArray(t);if(l!==d)return!1;if(l&&d){for(var f=0;f<e.length;f++)if(!jo(e[f],t[f]))return!1}else{var h=Object.keys(e).sort(),p=Object.keys(t).sort();if(!jo(h,p))return!1;var g=!0;return Object.keys(e).forEach(function(m){jo(e[m],t[m])||(g=!1)}),g}return!0},K2="$set",Y2="$unset",J2="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var Z2=(function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,n=Sn({},this.identity.userProperties),r=Sn(Sn({},this.identity),{userProperties:n});return{setUserId:function(i){return r.userId=i,this},setDeviceId:function(i){return r.deviceId=i,this},setUserProperties:function(i){return r.userProperties=i,this},setOptOut:function(i){return r.optOut=i,this},updateUserProperties:function(i){var o,s,a,c,u,l,d=r.userProperties||{};try{for(var f=Ho(Object.entries(i)),h=f.next();!h.done;h=f.next()){var p=_p(h.value,2),g=p[0],m=p[1];switch(g){case K2:try{for(var v=(a=void 0,Ho(Object.entries(m))),y=v.next();!y.done;y=v.next()){var b=_p(y.value,2),w=b[0],C=b[1];d[w]=C}}catch(P){a={error:P}}finally{try{y&&!y.done&&(c=v.return)&&c.call(v)}finally{if(a)throw a.error}}break;case Y2:try{for(var _=(u=void 0,Ho(Object.keys(m))),E=_.next();!E.done;E=_.next()){var w=E.value;delete d[w]}}catch(P){u={error:P}}finally{try{E&&!E.done&&(l=_.return)&&l.call(_)}finally{if(u)throw u.error}}break;case J2:d={};break}}}catch(P){o={error:P}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return r.userProperties=d,this},commit:function(){return t.setIdentity(r),this}}},e.prototype.getIdentity=function(){return Sn({},this.identity)},e.prototype.setIdentity=function(t){var n=Sn({},this.identity);this.identity=Sn({},t),jo(n,this.identity)||this.listeners.forEach(function(r){r(t)})},e.prototype.addIdentityListener=function(t){this.listeners.add(t)},e.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},e})(),pi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,X2=(function(){function e(){this.identityStore=new Z2,this.eventBridge=new G2,this.applicationContextProvider=new q2}return e.getInstance=function(t){return pi.analyticsConnectorInstances||(pi.analyticsConnectorInstances={}),pi.analyticsConnectorInstances[t]||(pi.analyticsConnectorInstances[t]=new e),pi.analyticsConnectorInstances[t]},e})(),hi=function(e){return e===void 0&&(e=rp),X2.getInstance(e)},Q2=function(e,t){hi(t).identityStore.editIdentity().setUserId(e).commit()},ew=function(e,t){hi(t).identityStore.editIdentity().setDeviceId(e).commit()},tw=(function(){function e(){this.name="identity",this.type="before",this.identityStore=hi().identityStore}return e.prototype.execute=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){return n=t.user_properties,n&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,t]})})},e.prototype.setup=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return t.instanceName&&(this.identityStore=hi(t.instanceName).identityStore),[2]})})},e})(),Cp=function(e,t){t===void 0&&(t=Date.now());var n=Date.now(),r=n-t;return r>e},Tp=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Fo,t,e.substring(0,n)].filter(Boolean).join("_")},nw=function(e){return"".concat(Fo.toLowerCase(),"_").concat(e.substring(0,6))},rw=function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(r=(n=(t=(e=navigator.languages)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:navigator.language)!==null&&n!==void 0?n:i)!==null&&r!==void 0?r:""},qo=function(){var e,t=Ae();if(!(!((e=t==null?void 0:t.location)===null||e===void 0)&&e.search))return{};var n=t.location.search.substring(1).split("&").filter(Boolean),r=n.reduce(function(i,o){var s=o.split("=",2),a=Ip(s[0]),c=Ip(s[1]);return c&&(i[a]=c),i},{});return r},Ip=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}},Zc=function(e,t){return!t||!t.length?!0:t.some(function(n){return typeof n=="string"?e===n:e.match(n)})},gi=function(e,t){var n=e;try{n=decodeURI(e)}catch(r){t==null||t.error("Malformed URI sequence: ",r)}return n},iw=function(e){var t=0;if(e.length===0)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t},xp=function(e,t){var n=iw(e.toString()),r=Math.abs(n),i=r*31,o=i%1e5;return o/1e5<t},Xc=(function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2,!0]})})},e.prototype.get=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return[2,this.memoryStorage.get(t)]})})},e.prototype.getRaw=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return[4,this.get(t)];case 1:return n=r.sent(),[2,n?JSON.stringify(n):void 0]}})})},e.prototype.set=function(t,n){return M(this,void 0,void 0,function(){return N(this,function(r){return this.memoryStorage.set(t,n),[2]})})},e.prototype.remove=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return this.memoryStorage.delete(t),[2]})})},e.prototype.reset=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return this.memoryStorage.clear(),[2]})})},e})(),Qc=(function(){function e(t){this.options=U({},t)}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:if(!Ae())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return i.sent(),[4,t.get(n)];case 3:return r=i.sent(),[2,r===e.testValue];case 4:return i.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){var n;return M(this,void 0,void 0,function(){var r,i;return N(this,function(o){switch(o.label){case 0:return[4,this.getRaw(t)];case 1:if(r=o.sent(),!r)return[2,void 0];try{return i=(n=ow(r))!==null&&n!==void 0?n:sw(r),i===void 0?(console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]):[2,JSON.parse(i)]}catch{return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]}return[2]}})})},e.prototype.getRaw=function(t){var n,r;return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){return i=Ae(),o=(r=(n=i==null?void 0:i.document)===null||n===void 0?void 0:n.cookie.split("; "))!==null&&r!==void 0?r:[],s=o.find(function(c){return c.indexOf(t+"=")===0}),s?[2,s.substring(t.length+1)]:[2,void 0]})})},e.prototype.set=function(t,n){var r;return M(this,void 0,void 0,function(){var i,o,s,a,c,u,l;return N(this,function(d){try{i=(r=this.options.expirationDays)!==null&&r!==void 0?r:0,o=n!==null?i:-1,s=void 0,o&&(a=new Date,a.setTime(a.getTime()+o*24*60*60*1e3),s=a),c="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(c+="; expires=".concat(s.toUTCString())),c+="; path=/",this.options.domain&&(c+="; domain=".concat(this.options.domain)),this.options.secure&&(c+="; Secure"),this.options.sameSite&&(c+="; SameSite=".concat(this.options.sameSite)),u=Ae(),u&&(u.document.cookie=c)}catch(f){l=f instanceof Error?f.message:String(f),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(l))}return[2]})})},e.prototype.remove=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){switch(n.label){case 0:return[4,this.set(t,null)];case 1:return n.sent(),[2]}})})},e.prototype.reset=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2]})})},e})(),ow=function(e){try{return decodeURIComponent(atob(e))}catch{return}},sw=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},Ap=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Fo,t,e.substring(0,n)].filter(Boolean).join("_")},eu=(function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){var t,n,r,i;return N(this,function(o){switch(o.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return o.sent(),[4,n.get(r)];case 3:return i=o.sent(),[2,i===t];case 4:return o.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return o.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(t)];case 1:return n=r.sent(),n?[2,JSON.parse(n)]:[2,void 0];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(t){var n;return M(this,void 0,void 0,function(){return N(this,function(r){return[2,((n=this.storage)===null||n===void 0?void 0:n.getItem(t))||void 0]})})},e.prototype.set=function(t,n){var r;return M(this,void 0,void 0,function(){return N(this,function(i){try{(r=this.storage)===null||r===void 0||r.setItem(t,JSON.stringify(n))}catch{}return[2]})})},e.prototype.remove=function(t){var n;return M(this,void 0,void 0,function(){return N(this,function(r){try{(n=this.storage)===null||n===void 0||n.removeItem(t)}catch{}return[2]})})},e.prototype.reset=function(){var t;return M(this,void 0,void 0,function(){return N(this,function(n){try{(t=this.storage)===null||t===void 0||t.clear()}catch{}return[2]})})},e})(),aw=10,cw=1,ie={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},kp={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},Rp=(function(){function e(t,n){this.dbPromise=null,this.logger=n,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return e.isSupported=function(){var t;return((t=Ae())===null||t===void 0?void 0:t.indexedDB)!==void 0},e.prototype.getDB=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var t=this;return new Promise(function(n,r){var i=indexedDB.open(t.dbName,cw);i.onerror=function(){t.dbPromise=null,r(new Error("Failed to open IndexedDB"))},i.onsuccess=function(){var o=i.result;o.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},o.onerror=function(s){t.logger.debug("DiagnosticsStorage: A global database error occurred.",s),o.close()},n(o)},i.onupgradeneeded=function(o){var s=o.target.result;t.createTables(s)}})},e.prototype.createTables=function(t){if(t.objectStoreNames.contains(ie.TAGS)||t.createObjectStore(ie.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(ie.COUNTERS)||t.createObjectStore(ie.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(ie.HISTOGRAMS)||t.createObjectStore(ie.HISTOGRAMS,{keyPath:"key"}),!t.objectStoreNames.contains(ie.EVENTS)){var n=t.createObjectStore(ie.EVENTS,{keyPath:"id",autoIncrement:!0});n.createIndex("time_idx","time",{unique:!1})}t.objectStoreNames.contains(ie.INTERNAL)||t.createObjectStore(ie.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.TAGS],"readwrite"),i=r.objectStore(ie.TAGS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to set tags",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.put({key:f,value:h});p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to set tag",f,h,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",o),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.COUNTERS],"readwrite"),i=r.objectStore(ie.COUNTERS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to increment counters",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.get(f);p.onsuccess=function(){var g=p.result,m=g?g.value:0,v=i.put({key:f,value:m+h});v.onerror=function(y){s.logger.debug("DiagnosticsStorage: Failed to update counter",f,y)}},p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to read existing counter",f,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",o),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.HISTOGRAMS],"readwrite"),i=r.objectStore(ie.HISTOGRAMS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.get(f);p.onsuccess=function(){var g=p.result,m;g?m={key:f,count:g.count+h.count,min:Math.min(g.min,h.min),max:Math.max(g.max,h.max),sum:g.sum+h.sum}:m={key:f,count:h.count,min:h.min,max:h.max,sum:h.sum};var v=i.put(m);v.onerror=function(y){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",f,y)}},p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",f,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",o),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t.length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.EVENTS],"readwrite"),i=r.objectStore(ie.EVENTS),[2,new Promise(function(c){r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to add event records",l),c()};var u=i.count();u.onsuccess=function(){var l=u.result,d=Math.max(0,aw-l);d<t.length&&s.logger.debug("DiagnosticsStorage: Only added ".concat(d," of ").concat(t.length," events due to storage limit")),t.slice(0,d).forEach(function(f){var h=i.add(f);h.onerror=function(p){s.logger.debug("DiagnosticsStorage: Failed to add event record",p)}})},u.onerror=function(l){s.logger.debug("DiagnosticsStorage: Failed to count existing events",l)}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",o),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(t,n){return M(this,void 0,void 0,function(){var r,i,o,s;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=a.sent(),i=r.transaction([ie.INTERNAL],"readwrite"),o=i.objectStore(ie.INTERNAL),[2,new Promise(function(c,u){i.onabort=function(){return u(new Error("Failed to set internal value"))};var l=o.put({key:t,value:n});l.onsuccess=function(){return c()},l.onerror=function(){return u(new Error("Failed to set internal value"))}})];case 2:return s=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",s),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(t){return M(this,void 0,void 0,function(){var n,r,i,o;return N(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([ie.INTERNAL],"readonly"),i=r.objectStore(ie.INTERNAL),[2,new Promise(function(a,c){r.onabort=function(){return c(new Error("Failed to get internal value"))};var u=i.get(t);u.onsuccess=function(){return a(u.result)},u.onerror=function(){return c(new Error("Failed to get internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",o),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return M(this,void 0,void 0,function(){var t,n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(kp.LAST_FLUSH_TIMESTAMP)];case 1:return t=r.sent(),[2,t?parseInt(t.value,10):void 0];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",n),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(kp.LAST_FLUSH_TIMESTAMP,t.toString())];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",n),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.clear();s.onsuccess=function(){return r()},s.onerror=function(){return i(new Error("Failed to clear table ".concat(n)))}})},e.prototype.getAllAndClear=function(){return M(this,void 0,void 0,function(){var t,n,r,i,o,s,a,c;return N(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=u.sent(),n=t.transaction([ie.TAGS,ie.COUNTERS,ie.HISTOGRAMS,ie.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(n,ie.TAGS),this.getAllFromStore(n,ie.COUNTERS),this.getAllFromStore(n,ie.HISTOGRAMS),this.getAllFromStore(n,ie.EVENTS)])];case 2:return r=$.apply(void 0,[u.sent(),4]),i=r[0],o=r[1],s=r[2],a=r[3],[4,Promise.all([this.clearTable(n,ie.COUNTERS),this.clearTable(n,ie.HISTOGRAMS),this.clearTable(n,ie.EVENTS)])];case 3:return u.sent(),[2,{tags:i,counters:o,histogramStats:s,events:a}];case 4:return c=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",c),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.getAll();s.onsuccess=function(){return r(s.result)},s.onerror=function(){return i(new Error("Failed to get all from ".concat(n)))}})},e})(),uw=1e3,Wo=300*1e3,lw="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",dw="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",tu=1e4,fw=10,pw=(function(){function e(t,n,r,i){r===void 0&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=t,this.logger=n,this.serverUrl=r==="US"?lw:dw,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=U({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=xp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,Rp.isSupported()?this.storage=new Rp(t,n):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&this.increment("sdk.diagnostics.sampled.in.and.enabled")}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(t,n){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=tu){this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");return}this.inMemoryTags[t]=n,this.startTimersIfNeeded()}},e.prototype.increment=function(t,n){if(n===void 0&&(n=1),!!this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=tu){this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");return}this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+n,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(t,n){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=tu){this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");return}var r=this.inMemoryHistograms[t];r?(r.count+=1,r.min=Math.min(r.min,n),r.max=Math.max(r.max,n),r.sum+=n):this.inMemoryHistograms[t]={count:1,min:n,max:n,sum:n},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(t,n){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=fw){this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");return}this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:n}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout(function(){t.saveAllDataToStorage().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",n)}).finally(function(){t.saveTimer=null})},uw)),this.flushTimer||(this.flushTimer=setTimeout(function(){t._flush().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to flush",n)}).finally(function(){t.flushTimer=null})},Wo))},e.prototype.saveAllDataToStorage=function(){return M(this,void 0,void 0,function(){var t,n,r,i;return N(this,function(o){switch(o.label){case 0:return this.storage?(t=U({},this.inMemoryTags),n=U({},this.inMemoryCounters),r=U({},this.inMemoryHistograms),i=ee([],$(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(t),this.storage.incrementCounters(n),this.storage.setHistogramStats(r),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return M(this,void 0,void 0,function(){var t,n,r,i,o,s,a,c,u,l;return N(this,function(d){switch(d.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return d.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=d.sent(),n=t.tags,r=t.counters,i=t.histogramStats,o=t.events,this.storage.setLastFlushTimestamp(Date.now()),s={},n.forEach(function(f){s[f.key]=f.value}),a={},r.forEach(function(f){a[f.key]=f.value}),c={},i.forEach(function(f){c[f.key]={count:f.count,min:f.min,max:f.max,avg:Math.round(f.sum/f.count*100)/100}}),u=o.map(function(f){return{event_name:f.event_name,time:f.time,event_properties:f.event_properties}}),Object.keys(a).length===0&&Object.keys(c).length===0&&u.length===0?[2]:(l={tags:s,histogram:c,counters:a,events:u},this.fetch(l),[2])}})})},e.prototype.fetch=function(t){return M(this,void 0,void 0,function(){var n,r;return N(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!Ae())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return n=i.sent(),n.ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return r=i.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",r),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return n=i.sent()||-1,n===-1?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(Wo),[2]):(r=t-n,r>=Wo?(this._flush(),[2]):(this._setFlushTimer(Wo-r),[2]))}})})},e.prototype._setFlushTimer=function(t){var n=this;this.flushTimer=setTimeout(function(){n._flush().catch(function(r){n.logger.debug("DiagnosticsClient: Failed to flush",r)}).finally(function(){n.flushTimer=null})},t)},e.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=xp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e})(),nu=(function(){function e(){}return e.prototype.send=function(t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(t){var n,r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E;if(typeof t!="object")return null;var P=t.code||0,T=this.buildStatus(P);switch(T){case Ne.Success:return{status:T,statusCode:P,body:{eventsIngested:(n=t.events_ingested)!==null&&n!==void 0?n:0,payloadSizeBytes:(r=t.payload_size_bytes)!==null&&r!==void 0?r:0,serverUploadTime:(i=t.server_upload_time)!==null&&i!==void 0?i:0}};case Ne.Invalid:return{status:T,statusCode:P,body:{error:(o=t.error)!==null&&o!==void 0?o:"",missingField:(s=t.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(a=t.events_with_invalid_fields)!==null&&a!==void 0?a:{},eventsWithMissingFields:(c=t.events_with_missing_fields)!==null&&c!==void 0?c:{},eventsWithInvalidIdLengths:(u=t.events_with_invalid_id_lengths)!==null&&u!==void 0?u:{},epsThreshold:(l=t.eps_threshold)!==null&&l!==void 0?l:0,exceededDailyQuotaDevices:(d=t.exceeded_daily_quota_devices)!==null&&d!==void 0?d:{},silencedDevices:(f=t.silenced_devices)!==null&&f!==void 0?f:[],silencedEvents:(h=t.silenced_events)!==null&&h!==void 0?h:[],throttledDevices:(p=t.throttled_devices)!==null&&p!==void 0?p:{},throttledEvents:(g=t.throttled_events)!==null&&g!==void 0?g:[]}};case Ne.PayloadTooLarge:return{status:T,statusCode:P,body:{error:(m=t.error)!==null&&m!==void 0?m:""}};case Ne.RateLimit:return{status:T,statusCode:P,body:{error:(v=t.error)!==null&&v!==void 0?v:"",epsThreshold:(y=t.eps_threshold)!==null&&y!==void 0?y:0,throttledDevices:(b=t.throttled_devices)!==null&&b!==void 0?b:{},throttledUsers:(w=t.throttled_users)!==null&&w!==void 0?w:{},exceededDailyQuotaDevices:(C=t.exceeded_daily_quota_devices)!==null&&C!==void 0?C:{},exceededDailyQuotaUsers:(_=t.exceeded_daily_quota_users)!==null&&_!==void 0?_:{},throttledEvents:(E=t.throttled_events)!==null&&E!==void 0?E:[]}};case Ne.Timeout:default:return{status:T,statusCode:P}}},e.prototype.buildStatus=function(t){return Ep(t)?Ne.Success:t===429?Ne.RateLimit:t===413?Ne.PayloadTooLarge:t===408?Ne.Timeout:t>=400&&t<500?Ne.Invalid:t>=500?Ne.Failed:Ne.Unknown},e})(),hw=(function(e){nt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){switch(a.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(n,i)];case 1:return o=a.sent(),[4,o.text()];case 2:s=a.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},t})(nu),gw=(function(){function e(t,n){this.key="AMP_remote_config_".concat(t.substring(0,10)),this.logger=n}return e.prototype.fetchConfig=function(){var t=null,n={remoteConfig:null,lastFetch:new Date};try{t=localStorage.getItem(this.key)}catch(i){return this.logger.debug("Remote config localstorage failed to access: ",i),Promise.resolve(n)}if(t===null)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(n);try{var r=JSON.parse(t);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(i){return this.logger.debug("Remote config localstorage failed to parse: ",i),localStorage.removeItem(this.key),Promise.resolve(n)}},e.prototype.setConfig=function(t){try{return localStorage.setItem(this.key,JSON.stringify(t)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(n){this.logger.debug("Remote config localstorage failed to set: ",n)}return Promise.resolve(!1)},e})(),mw="https://sr-client-cfg.amplitude.com/config",vw="https://sr-client-cfg.eu.amplitude.com/config",yw=3,bw=1e3,ww=(function(){function e(t,n,r,i){r===void 0&&(r="US"),this.callbackInfos=[],this.apiKey=t,this.serverUrl=i||(r==="US"?mw:vw),this.logger=n,this.storage=new gw(t,n)}return e.prototype.subscribe=function(t,n,r){var i=En(),o={id:i,key:t,deliveryMode:n,callback:r};return this.callbackInfos.push(o),n==="all"?this.subscribeAll(o):this.subscribeWaitForRemote(o,n.timeout),i},e.prototype.unsubscribe=function(t){var n=this.callbackInfos.findIndex(function(r){return r.id===t});return n===-1?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(t," doesn't exist.")),!1):(this.callbackInfos.splice(n,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(t,".")),!0)},e.prototype.updateConfigs=function(){return M(this,void 0,void 0,function(){var t,n=this;return N(this,function(r){switch(r.label){case 0:return[4,this.fetch()];case 1:return t=r.sent(),this.storage.setConfig(t),this.callbackInfos.forEach(function(i){n.sendCallback(i,t,"remote")}),[2]}})})},e.prototype.subscribeAll=function(t){return M(this,void 0,void 0,function(){var n,r,i,o=this;return N(this,function(s){switch(s.label){case 0:return n=this.fetch().then(function(a){o.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(a))),o.sendCallback(t,a,"remote"),o.storage.setConfig(a)}),r=this.storage.fetchConfig().then(function(a){return a}),[4,Promise.race([n,r])];case 1:return i=s.sent(),i!==void 0&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),this.sendCallback(t,i,"cache")),[4,n];case 2:return s.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(t,n){return M(this,void 0,void 0,function(){var r,i,i;return N(this,function(o){switch(o.label){case 0:r=new Promise(function(s,a){setTimeout(function(){a("Timeout exceeded")},n)}),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,Promise.race([this.fetch(),r])];case 2:return i=o.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(t,i,"remote"),this.storage.setConfig(i),[3,5];case 3:return o.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return i=o.sent(),i.remoteConfig!==null?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(t,i,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(t,i,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(t,n,r){t.lastCallback=new Date;var i;t.key?i=t.key.split(".").reduce(function(o,s){return o===null?o:s in o?o[s]:null},n.remoteConfig):i=n.remoteConfig,t.callback(i,r,n.lastFetch)},e.prototype.fetch=function(t,n){return t===void 0&&(t=yw),n===void 0&&(n=bw),M(this,void 0,void 0,function(){var r,i,o,s,a,c,u=this;return N(this,function(l){switch(l.label){case 0:r=n/t,i={remoteConfig:null,lastFetch:new Date},o=function(d){var f,h,p,g,m,v;return N(this,function(y){switch(y.label){case 0:f=new AbortController,h=setTimeout(function(){return f.abort()},n),y.label=1;case 1:return y.trys.push([1,7,8,9]),[4,fetch(s.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:f.signal})];case 2:return p=y.sent(),p.ok?[3,4]:[4,p.text()];case 3:return g=y.sent(),s.logger.debug("Remote config client fetch with retry time ".concat(t," failed with ").concat(p.status,": ").concat(g)),[3,6];case 4:return[4,p.json()];case 5:return m=y.sent(),[2,{value:{remoteConfig:m,lastFetch:new Date}}];case 6:return[3,9];case 7:return v=y.sent(),v instanceof Error&&v.name==="AbortError"?s.logger.debug("Remote config client fetch with retry time ".concat(t," timed out after ").concat(n,"ms")):s.logger.debug("Remote config client fetch with retry time ".concat(t," is rejected because: "),v),[3,9];case 8:return clearTimeout(h),[7];case 9:return d<t-1?[4,new Promise(function(b){return setTimeout(b,u.getJitterDelay(r))})]:[3,11];case 10:y.sent(),y.label=11;case 11:return[2]}})},s=this,a=0,l.label=1;case 1:return a<t?[5,o(a)]:[3,4];case 2:if(c=l.sent(),typeof c=="object")return[2,c.value];l.label=3;case 3:return a++,[3,1];case 4:return[2,i]}})})},e.prototype.getJitterDelay=function(t){return Math.floor(Math.random()*t)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e})(),Ew=null,Sw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],Pp="data-amp-track-",_w=["div","span","h1","h2","h3","h4","h5","h6"],Cw=["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]'],Tw=ee(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],$(Cw),!1),Iw=["*"],xw=1e3,Aw=4,kw=50;function Rw(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function Op(e,t,n){if(e){var r=t.map(Np),i=n.map(Np);Lp({json:e,allowlist:r,excludelist:i,ancestors:[]})}}function Lp(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,c=e.parentObject,u=e.targetKey;i||(i=r);var l=Object.keys(i);try{for(var d=Q(l),f=d.next();!f.done;f=d.next()){var h=f.value,p=ee(ee([],$(a),!1),[h],!1);Rw(i[h])?(!Mp(p,o)||Mp(p,s))&&delete i[h]:Lp({json:r,targetObject:i[h],allowlist:o,excludelist:s,ancestors:p,parentObject:i,targetKey:h})}}catch(g){t={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}Object.keys(i).length===0&&c&&u&&delete c[u]}function Np(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function ru(e,t,n,r){if(n===void 0&&(n=0),r===void 0&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&t[r]==="**";)r++;return r===t.length}var i=t[r];if(i==="**"){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(ru(e,t,o,r+1))return!0;return!1}else return i==="*"||i===e[n]?ru(e,t,n+1,r+1):!1}function Mp(e,t){return t.some(function(n){return ru(e,n)})}var Pw=500,Dp=100,Ow=(function(){function e(t){this.request=t}return e.prototype.headers=function(t){var n,r;t===void 0&&(t=[]);var i=this.request.headers,o={};if(Array.isArray(i))i.forEach(function(d){var f=$(d,2),h=f[0],p=f[1];o[h]=p});else if(i instanceof Headers)i.forEach(function(d,f){o[f]=d});else if(typeof i=="object"&&i!==null)try{for(var s=Q(Object.entries(i)),a=s.next();!a.done;a=s.next()){var c=$(a.value,2),u=c[0],l=c[1];o[u]=l}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Go(o,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(typeof this._bodySize=="number")return this._bodySize;var t=Ae();if(t!=null&&t.TextEncoder){var n=this.request.body;return this._bodySize=Fp(n,Dp),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.request.body=="string"?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,iu(r,t,n)])})})},e})(),Lw=(function(){function e(t,n){this.bodyRaw=t,this.requestHeaders=n}return e.prototype.headers=function(t){return t===void 0&&(t=[]),Go(this.requestHeaders,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Fp(this.bodyRaw,Dp)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.bodyRaw=="string"?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,iu(r,t,n)])})})},e})();function Fp(e,t){var n,r,i,o=Ae(),s=o==null?void 0:o.TextEncoder;if(s){var a;if(typeof e=="string")a=e,i=new s().encode(a).length;else if(e instanceof Blob)a=e,i=a.size;else if(e instanceof URLSearchParams)a=e,i=new s().encode(a.toString()).length;else if(ArrayBuffer.isView(e))a=e,i=a.byteLength;else if(e instanceof ArrayBuffer)a=e,i=a.byteLength;else if(e instanceof FormData){var c=e,u=0,l=0;try{for(var d=Q(c.entries()),f=d.next();!f.done;f=d.next()){var h=$(f.value,2),p=h[0],g=h[1];if(u+=p.length,typeof g=="string")u+=new s().encode(g).length;else if(g instanceof Blob)u+=g.size;else return;if(++l>=t)return}}catch(m){n={error:m}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=u}else if(e instanceof ReadableStream){a=e;return}return i}}var Nw=(function(){function e(t){this.response=t}return e.prototype.headers=function(t){var n;if(t===void 0&&(t=[]),this.response.headers instanceof Headers){var r=this.response.headers,i={};return(n=r==null?void 0:r.forEach)===null||n===void 0||n.call(r,function(o,s){i[s]=o}),Go(i,{allow:t})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var t,n;if(this._bodySize!==void 0)return this._bodySize;var r=(n=(t=this.response.headers)===null||t===void 0?void 0:t.get)===null||n===void 0?void 0:n.call(t,"content-length"),i=r?parseInt(r,10):void 0;return this._bodySize=i,i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),i.label=1;case 1:return i.trys.push([1,3,,4]),t=this.clonedResponse.text(),n=new Promise(function(o){return setTimeout(function(){return o(null)},Pw)}),[4,Promise.race([t,n])];case 2:return r=i.sent(),[2,r];case 3:return i.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){switch(i.label){case 0:return t.length===0?[2,null]:[4,this.text()];case 1:return r=i.sent(),[2,iu(r,t,n)]}})})},e})(),Mw=(function(){function e(t,n,r,i){this.statusCode=t,this.headersString=n,this.size=r,this.getJson=i}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(t){var n,r;if(t===void 0&&(t=[]),!this.headersString)return{};var i={},o=this.headersString.split(`\r
|
|
544
|
+
`);try{for(var s=Q(o),a=s.next();!a.done;a=s.next()){var c=a.value,u=$(c.split(": "),2),l=u[0],d=u[1];l&&d&&(i[l]=d)}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Go(i,{allow:t})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.getJson(),r?(Op(r,t,n),[2,r]):[2,null])})})},e})();function iu(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Op(r,t,n),r}catch{return null}}var mi;(function(e){e.REDACT="redact",e.REMOVE="remove"})(mi||(mi={}));var Up="[REDACTED]",Go=function(e,t){var n,r,i=t.allow,o=i===void 0?[]:i,s=t.strategy,a=s===void 0?mi.REMOVE:s,c=ee([],$(w2),!1),u={},l=function(p){var g=p.toLowerCase();c.find(function(m){return m.toLowerCase()===g})?a===mi.REDACT&&(u[p]=Up):o.find(function(m){return m.toLowerCase()===g})?u[p]=e[p]:a===mi.REDACT&&(u[p]=Up)};try{for(var d=Q(Object.keys(e)),f=d.next();!f.done;f=d.next()){var h=f.value;l(h)}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return u},Dw=(function(){function e(t,n,r,i,o,s,a,c,u,l,d){a===void 0&&(a=0),this.type=t,this.method=n,this.timestamp=r,this.startTime=i,this.url=o,this.requestWrapper=s,this.status=a,this.duration=c,this.responseWrapper=u,this.error=l,this.endTime=d}return e.prototype.toSerializable=function(){var t,n,r,i,o={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:(t=this.requestWrapper)===null||t===void 0?void 0:t.headers(ee([],$(Bo),!1)),requestBodySize:(n=this.requestWrapper)===null||n===void 0?void 0:n.bodySize,responseHeaders:(r=this.responseWrapper)===null||r===void 0?void 0:r.headers(ee([],$(Bo),!1)),responseBodySize:(i=this.responseWrapper)===null||i===void 0?void 0:i.bodySize};return Object.fromEntries(Object.entries(o).filter(function(s){var a=$(s,2);a[0];var c=a[1];return c!==void 0}))},e})();function Fw(e){return typeof e=="object"&&e!==null&&"url"in e&&"method"in e}var Uw=(function(){function e(t,n){n===void 0&&(n=En()),this.callback=t,this.id=n}return e})(),Bw=(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=Ae();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var t=Ae();return!!t&&!!t.fetch},e.prototype.subscribe=function(t,n){var r,i,o,s,a,c,u,l,d,f;if(this.logger||(this.logger=n),this.eventCallbacks.set(t.id,t),!this.isObserving){var h=(o=(i=(r=this.globalScope)===null||r===void 0?void 0:r.XMLHttpRequest)===null||i===void 0?void 0:i.prototype)===null||o===void 0?void 0:o.open,p=(c=(a=(s=this.globalScope)===null||s===void 0?void 0:s.XMLHttpRequest)===null||a===void 0?void 0:a.prototype)===null||c===void 0?void 0:c.send,g=(d=(l=(u=this.globalScope)===null||u===void 0?void 0:u.XMLHttpRequest)===null||l===void 0?void 0:l.prototype)===null||d===void 0?void 0:d.setRequestHeader;h&&p&&g&&this.observeXhr(h,p,g);var m=(f=this.globalScope)===null||f===void 0?void 0:f.fetch;m&&this.observeFetch(m),this.isObserving=!0}},e.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},e.prototype.triggerEventCallbacks=function(t){var n=this;this.eventCallbacks.forEach(function(r){var i;try{r.callback(t)}catch(o){(i=n.logger)===null||i===void 0||i.debug("an unexpected error occurred while triggering event callbacks",o)}})},e.prototype.handleNetworkRequestEvent=function(t,n,r,i,o,s,a){var c;if(!(s===void 0||a===void 0)){var u,l="GET";if(Fw(n)?(u=n.url,l=n.method):u=(c=n==null?void 0:n.toString)===null||c===void 0?void 0:c.call(n),u)try{var d=new URL(u);u="".concat(d.protocol,"//").concat(d.host).concat(d.pathname).concat(d.search).concat(d.hash)}catch{}l=(r==null?void 0:r.method)||l;var f,h;i&&(f=i.status),o&&(h={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},f=0);var p=Math.floor(performance.now()-a),g=Math.floor(s+p),m=new Dw(t,l,s,s,u,r,f,p,i,h,g);this.triggerEventCallbacks(m)}},e.prototype.getTimestamps=function(){var t,n;return{startTime:(t=Date.now)===null||t===void 0?void 0:t.call(Date),durationStart:(n=performance==null?void 0:performance.now)===null||n===void 0?void 0:n.call(performance)}},e.prototype.observeFetch=function(t){var n=this;!this.globalScope||!t||(this.globalScope.fetch=function(r,i){return M(n,void 0,void 0,function(){var o,s,a,c,u,l;return N(this,function(d){switch(d.label){case 0:try{o=this.getTimestamps()}catch(f){(u=this.logger)===null||u===void 0||u.debug("an unexpected error occurred while retrieving timestamps",f)}d.label=1;case 1:return d.trys.push([1,3,,4]),[4,t(r,i)];case 2:return s=d.sent(),[3,4];case 3:return c=d.sent(),a=c,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,i?new Ow(i):void 0,s?new Nw(s):void 0,a,o==null?void 0:o.startTime,o==null?void 0:o.durationStart)}catch(f){(l=this.logger)===null||l===void 0||l.debug("an unexpected error occurred while handling fetch",f)}if(s)return[2,s];throw a}})})})},e.createXhrJsonParser=function(t,n){return function(){var r,i;try{if(t.responseType==="json"){if(!((r=n.globalScope)===null||r===void 0)&&r.structuredClone)return n.globalScope.structuredClone(t.response)}else if(["text",""].includes(t.responseType))return JSON.parse(t.responseText)}catch(o){return o instanceof Error&&o.name==="InvalidStateError"&&((i=n.logger)===null||i===void 0||i.error("unexpected error when retrieving responseText. responseType='".concat(t.responseType,"'"))),null}return null}},e.prototype.observeXhr=function(t,n,r){if(!(!this.globalScope||!t||!n)){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var s,a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var l=this,d=$(c,2),f=d[0],h=d[1];try{l.$$AmplitudeAnalyticsEvent=U({method:f,url:(s=h==null?void 0:h.toString)===null||s===void 0?void 0:s.call(h),headers:{}},o.getTimestamps())}catch(p){(a=o.logger)===null||a===void 0||a.error("an unexpected error occurred while calling xhr open",p)}return t.apply(l,c)},i.send=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var c=this,u=c,l=e.createXhrJsonParser(c,o),d=s[0],f=u.$$AmplitudeAnalyticsEvent;return u.addEventListener("loadend",function(){var h;try{var p=u.getAllResponseHeaders(),g=u.getResponseHeader("content-length"),m=new Mw(u.status,p,g?parseInt(g,10):void 0,l),v=u.$$AmplitudeAnalyticsEvent.headers,y=new Lw(d,v);f.status=u.status,o.handleNetworkRequestEvent("xhr",{url:f.url,method:f.method},y,m,void 0,f.startTime,f.durationStart)}catch(b){(h=o.logger)===null||h===void 0||h.error("an unexpected error occurred while handling xhr send",b)}}),n.apply(u,s)},i.setRequestHeader=function(s,a){var c,u=this;try{u.$$AmplitudeAnalyticsEvent.headers[s]=a}catch(l){(c=o.logger)===null||c===void 0||c.error("an unexpected error occurred while calling xhr setRequestHeader",l)}r.apply(u,[s,a])}}},e})(),Bp=new Bw,$p=(function(){function e(){}return e.prototype.parse=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2,U(U(U(U({},Uo),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=qo(),n=t[h2],r=t[g2],i=t[m2],o=t[v2],s=t[y2],a=t[b2];return{utm_campaign:n,utm_content:r,utm_id:i,utm_medium:o,utm_source:s,utm_term:a}},e.prototype.getReferrer=function(){var t,n,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=(n=(t=r.referrer)===null||t===void 0?void 0:t.split("/")[2])!==null&&n!==void 0?n:void 0}catch{}return r},e.prototype.getClickIds=function(){var t,n=qo();return t={},t[op]=n[op],t[sp]=n[sp],t[ap]=n[ap],t[cp]=n[cp],t[up]=n[up],t[lp]=n[lp],t[dp]=n[dp],t[fp]=n[fp],t[pp]=n[pp],t[hp]=n[hp],t[gp]=n[gp],t},e})(),vi="data-amp-mask",_n="*****",$w=/\b(?:\d[ -]*?){13,16}\b/,Vw=/(\d{3}-?\d{2}-?\d{4})/g,zw=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,ou=function(e,t){var n,r;if(t===void 0&&(t=[]),typeof e!="string")return"";var i=e;i=i.replace($w,_n),i=i.replace(Vw,_n),i=i.replace(zw,_n);try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,_n)}catch{}}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},su=function(e){if(typeof document>"u"||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(vi)?_n:e?e(document.title):document.title},mr=function(e,t){return typeof e=="boolean"?e:(e==null?void 0:e[t])!==!1},Vp=function(e){return mr(e,"attribution")},Hw=function(e){return mr(e,"fileDownloads")},jw=function(e){return mr(e,"formInteractions")},zp=function(e){return mr(e,"pageViews")},Hp=function(e){return mr(e,"sessions")},qw=function(e){return mr(e,"pageUrlEnrichment")},jp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.networkTracking===!0||typeof e.networkTracking=="object")},qp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.elementInteractions===!0||typeof e.elementInteractions=="object")},Ww=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e.webVitals===!0},Wp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions=="object")},Gw=function(e){if(qp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.elementInteractions=="object")return e.autocapture.elementInteractions},Kw=function(e){if(Wp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.frustrationInteractions=="object")return e.autocapture.frustrationInteractions},Yw=function(e){var t;if(jp(e.autocapture)){var n=void 0;return typeof e.autocapture=="object"&&typeof e.autocapture.networkTracking=="object"?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),U(U({},n),{captureRules:(t=n==null?void 0:n.captureRules)===null||t===void 0?void 0:t.map(function(r){var i,o,s;if(!((i=r.urls)===null||i===void 0)&&i.length&&(!((o=r.hosts)===null||o===void 0)&&o.length)){var a=JSON.stringify(r.hosts),c=JSON.stringify(r.urls);return(s=e.loggerProvider)===null||s===void 0||s.warn("Found network capture rule with both urls='".concat(c,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),U(U({},r),{hosts:void 0})}return r})})}},Jw=function(e){var t=function(){return!1},n=void 0,r,i=e.pageCounter,o=zp(e.defaultTracking);return o&&(t=void 0,r=void 0,e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews=="object"&&("trackOn"in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(r=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:n,eventType:r,pageCounter:i}},Zw=function(e){return Vp(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?U({},e.defaultTracking.attribution):{}},au=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if(typeof a=="function"){var c=a.apply(e,o);typeof s=="function"&&s(c==null?void 0:c.promise)}}return e},cu=function(e){var t=e;return t&&t._q!==void 0},uu="2.30.0",Gp="amplitude-ts",Xw="Web",Qw="$remote",eE=(function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(Gp,"/").concat(uu),typeof navigator<"u"&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(t){return this.config=t,Promise.resolve(void 0)},e.prototype.execute=function(t){var n,r;return M(this,void 0,void 0,function(){var i,o,s,a;return N(this,function(c){return i=new Date().getTime(),o=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1,s=(r=t.event_id)!==null&&r!==void 0?r:o+1,this.config.lastEventId=s,t.time||(this.config.lastEventTime=i),a=U(U(U(U(U(U(U(U({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Xw}),this.config.trackingOptions.language&&{language:rw()}),this.config.trackingOptions.ipAddress&&{ip:Qw}),{insert_id:En(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),t),{event_id:s,library:this.library,user_agent:this.userAgent}),[2,a]})})},e})(),Ko=1e3,Kp=(function(e){nt(t,e);function t(n){var r=this,i,o,s;try{s=(i=Ae())===null||i===void 0?void 0:i.localStorage}catch(a){(o=n==null?void 0:n.loggerProvider)===null||o===void 0||o.debug("Failed to access localStorage. error=".concat(JSON.stringify(a))),s=void 0}return r=e.call(this,s)||this,r.loggerProvider=n==null?void 0:n.loggerProvider,r}return t.prototype.set=function(n,r){var i;return M(this,void 0,void 0,function(){var o;return N(this,function(s){switch(s.label){case 0:return Array.isArray(r)&&r.length>Ko?(o=r.length-Ko,[4,e.prototype.set.call(this,n,r.slice(0,Ko))]):[3,2];case 1:return s.sent(),(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(o," events because the queue length exceeded ").concat(Ko,".")),[3,4];case 2:return[4,e.prototype.set.call(this,n,r)];case 3:s.sent(),s.label=4;case 4:return[2]}})})},t})(eu),tE=(function(e){nt(t,e);function t(){var n;return e.call(this,(n=Ae())===null||n===void 0?void 0:n.sessionStorage)||this}return t})(eu),nE=(function(e){nt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={done:4},n}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i=this;return N(this,function(o){return[2,new Promise(function(s,a){typeof XMLHttpRequest>"u"&&a(new Error("XHRTransport is not supported."));var c=new XMLHttpRequest;c.open("POST",n,!0),c.onreadystatechange=function(){if(c.readyState===i.state.done){var u=c.responseText;try{s(i.buildResponse(JSON.parse(u)))}catch{s(i.buildResponse({code:c.status}))}}},c.setRequestHeader("Content-Type","application/json"),c.setRequestHeader("Accept","*/*"),c.send(JSON.stringify(r))})]})})},t})(nu),rE=(function(e){nt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i=this;return N(this,function(o){return[2,new Promise(function(s,a){var c=Ae();if(!(c!=null&&c.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var u=JSON.stringify(r),l=c.navigator.sendBeacon(n,JSON.stringify(r));return s(l?i.buildResponse({code:200,events_ingested:r.events.length,payload_size_bytes:u.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(d){a(d)}})]})})},t})(nu),iE=function(e,t,n){return n===void 0&&(n=!0),M(void 0,void 0,void 0,function(){var r,i,o,s,a,c,u,l,d;return N(this,function(f){switch(f.label){case 0:return r=nw(e),[4,t.getRaw(r)];case 1:return i=f.sent(),i?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;case 3:return o=$(i.split("."),6),s=o[0],a=o[1],c=o[2],u=o[3],l=o[4],d=o[5],[2,{deviceId:s,userId:oE(a),sessionId:lu(u),lastEventId:lu(d),lastEventTime:lu(l),optOut:!!c}]}})})},lu=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},oE=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Mt="[Amplitude]",Yp="".concat(Mt," Form Started"),sE="".concat(Mt," Form Submitted"),aE="".concat(Mt," File Downloaded"),Jp="session_start",Zp="session_end",cE="".concat(Mt," File Extension"),uE="".concat(Mt," File Name"),lE="".concat(Mt," Link ID"),dE="".concat(Mt," Link Text"),fE="".concat(Mt," Link URL"),du="".concat(Mt," Form ID"),fu="".concat(Mt," Form Name"),pu="".concat(Mt," Form Destination"),Yo="cookie",pE="US",hE=(function(e){nt(t,e);function t(n,r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E,P,T,I,k,O,D,F,V,z,ye,oe,J,re,W,ce,te,_e,pe){i===void 0&&(i=new Xc),o===void 0&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),u===void 0&&(u=1e3),l===void 0&&(l=5),d===void 0&&(d=30),f===void 0&&(f=Yo),v===void 0&&(v=new bp),y===void 0&&(y=wt.Warn),w===void 0&&(w=!1),C===void 0&&(C=!1),P===void 0&&(P=""),T===void 0&&(T=pE),k===void 0&&(k=1800*1e3),O===void 0&&(O=new Kp({loggerProvider:v})),D===void 0&&(D={ipAddress:!0,language:!0,platform:!0}),F===void 0&&(F="fetch"),V===void 0&&(V=!1),z===void 0&&(z=!0),ce===void 0&&(ce=!0),te===void 0&&(te=0);var B=e.call(this,{apiKey:n,storageProvider:O,transportProvider:Xp(F)})||this;return B.apiKey=n,B.appVersion=r,B.cookieOptions=o,B.defaultTracking=s,B.autocapture=a,B.flushIntervalMillis=u,B.flushMaxRetries=l,B.flushQueueSize=d,B.identityStorage=f,B.ingestionMetadata=h,B.instanceName=p,B.loggerProvider=v,B.logLevel=y,B.minIdLength=b,B.offline=w,B.partnerId=_,B.plan=E,B.serverUrl=P,B.serverZone=T,B.sessionTimeout=k,B.storageProvider=O,B.trackingOptions=D,B.transport=F,B.useBatch=V,B.fetchRemoteConfig=z,B.networkTrackingOptions=re,B.identify=W,B.enableDiagnostics=ce,B.diagnosticsSampleRate=te,B.diagnosticsClient=_e,B.remoteConfig=pe,B.version=uu,B._optOut=!1,B._cookieStorage=i,B.deviceId=c,B.lastEventId=g,B.lastEventTime=m,B.optOut=C,B.sessionId=I,B.pageCounter=oe,B.userId=ye,B.debugLogsEnabled=J,B.loggerProvider.enable(J?wt.Debug:B.logLevel),B.networkTrackingOptions=re,B.identify=W,B.enableDiagnostics=ce,B.diagnosticsSampleRate=te,B.diagnosticsClient=_e,z&&(B.remoteConfig||(B.remoteConfig={fetchRemoteConfig:z}),B.remoteConfig.fetchRemoteConfig||(B.remoteConfig.fetchRemoteConfig=z)),B}return Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(n){this._cookieStorage!==n&&(this._cookieStorage=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(n){this._deviceId!==n&&(this._deviceId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(n){this._userId!==n&&(this._userId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(n){this._sessionId!==n&&(this._sessionId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(n){this._optOut!==n&&(this._optOut=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(n){this._lastEventTime!==n&&(this._lastEventTime=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(n){this._lastEventId!==n&&(this._lastEventId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(n){this._pageCounter!==n&&(this._pageCounter=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(n){this._debugLogsEnabled!==n&&(this._debugLogsEnabled=n,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var n={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(Tp(this.apiKey),n)},t})(B2),gE=function(e,t,n){return t===void 0&&(t={}),M(void 0,void 0,void 0,function(){var r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E,P,T,I,k,O,D,F,V,z,ye,oe,J,re,W,ce,te,_e,pe,B,_t,Ct,rn,ir,Cd;return N(this,function(or){switch(or.label){case 0:return r=t.identityStorage||Yo,E={},r===Yo?[3,1]:(o="",[3,5]);case 1:return(T=(P=t.cookieOptions)===null||P===void 0?void 0:P.domain)!==null&&T!==void 0?(s=T,[3,4]):[3,2];case 2:return[4,vE()];case 3:s=or.sent(),or.label=4;case 4:o=s,or.label=5;case 5:return i=U.apply(void 0,[(E.domain=o,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),t.cookieOptions]),a=mE(t.identityStorage,i),[4,iE(e,a,(k=(I=t.cookieOptions)===null||I===void 0?void 0:I.upgrade)!==null&&k!==void 0?k:!0)];case 6:return c=or.sent(),[4,a.get(Tp(e))];case 7:return u=or.sent(),l=qo(),d=l.ampTimestamp?Number(l.ampTimestamp):void 0,f=d?Date.now()<d:!0,h=(z=(V=(F=(O=t.deviceId)!==null&&O!==void 0?O:f?(D=l.ampDeviceId)!==null&&D!==void 0?D:l.deviceId:void 0)!==null&&F!==void 0?F:u==null?void 0:u.deviceId)!==null&&V!==void 0?V:c.deviceId)!==null&&z!==void 0?z:En(),p=(ye=u==null?void 0:u.lastEventId)!==null&&ye!==void 0?ye:c.lastEventId,g=(oe=u==null?void 0:u.lastEventTime)!==null&&oe!==void 0?oe:c.lastEventTime,m=(re=(J=t.optOut)!==null&&J!==void 0?J:u==null?void 0:u.optOut)!==null&&re!==void 0?re:c.optOut,v=(W=u==null?void 0:u.sessionId)!==null&&W!==void 0?W:c.sessionId,y=(te=(ce=t.userId)!==null&&ce!==void 0?ce:u==null?void 0:u.userId)!==null&&te!==void 0?te:c.userId,n.previousSessionDeviceId=(_e=u==null?void 0:u.deviceId)!==null&&_e!==void 0?_e:c.deviceId,n.previousSessionUserId=(pe=u==null?void 0:u.userId)!==null&&pe!==void 0?pe:c.userId,b={ipAddress:(_t=(B=t.trackingOptions)===null||B===void 0?void 0:B.ipAddress)!==null&&_t!==void 0?_t:!0,language:(rn=(Ct=t.trackingOptions)===null||Ct===void 0?void 0:Ct.language)!==null&&rn!==void 0?rn:!0,platform:(Cd=(ir=t.trackingOptions)===null||ir===void 0?void 0:ir.platform)!==null&&Cd!==void 0?Cd:!0},w=u==null?void 0:u.pageCounter,C=u==null?void 0:u.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),_=new hE(e,t.appVersion,a,i,t.defaultTracking,t.autocapture,h,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,r,t.ingestionMetadata,t.instanceName,p,g,t.loggerProvider,t.logLevel,t.minIdLength,t.offline,m,t.partnerId,t.plan,t.serverUrl,t.serverZone,v,t.sessionTimeout,t.storageProvider,b,t.transport,t.useBatch,t.fetchRemoteConfig,y,w,C,t.networkTrackingOptions,t.identify,t.enableDiagnostics,void 0,void 0,t.remoteConfig),[4,_.storageProvider.isEnabled()];case 8:return or.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new Xc),[2,_]}})})},mE=function(e,t){switch(e===void 0&&(e=Yo),t===void 0&&(t={}),e){case"localStorage":return new Kp;case"sessionStorage":return new tE;case"none":return new Xc;case"cookie":default:return new Qc(U(U({},t),{expirationDays:t.expiration}))}},Xp=function(e){return e==="xhr"?new nE:e==="beacon"?new rE:new hw},vE=function(e){return M(void 0,void 0,void 0,function(){var t,n,r,i,o,o,s,a,c,u;return N(this,function(l){switch(l.label){case 0:return[4,new Qc().isEnabled()];case 1:if(!l.sent()||typeof location>"u"||!location.hostname)return[2,""];for(t=location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],a={domain:"."+s},c=new Qc(a),[4,c.set(i,1)]):[3,7];case 3:return l.sent(),[4,c.get(i)];case 4:return u=l.sent(),u?[4,c.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}})})},yE=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},bE="[Amplitude] Page Viewed",wE=function(e){e===void 0&&(e={});var t,n=Ae(),r=void 0,i=!1,o,s=e.trackOn,a=e.trackHistoryChanges,c=e.eventType,u=c===void 0?bE:c,l=function(v){var y=v;try{y=decodeURI(v)}catch(b){r==null||r.error("Malformed URI sequence: ",b)}return y},d=function(){return M(void 0,void 0,void 0,function(){var v,y,b;return N(this,function(w){switch(w.label){case 0:return v=l(typeof location<"u"&&location.href||""),b={event_type:u},y=[{}],[4,EE()];case 1:return[2,(b.event_properties=U.apply(void 0,[U.apply(void 0,y.concat([w.sent()])),{"[Amplitude] Page Domain":typeof location<"u"&&location.hostname||"","[Amplitude] Page Location":v,"[Amplitude] Page Path":typeof location<"u"&&l(location.pathname)||"","[Amplitude] Page Title":su(ou),"[Amplitude] Page URL":v.split("?")[0]}]),b)]}})})},f=function(){return typeof s>"u"||typeof s=="function"&&s()},h=typeof location<"u"?location.href:null,p=function(){return M(void 0,void 0,void 0,function(){var v,y,b,w;return N(this,function(C){switch(C.label){case 0:return v=location.href,y=_E(a,v,h||"")&&f(),h=v,y?(r==null||r.log("Tracking page view event"),t!=null?[3,1]:[3,3]):[3,4];case 1:return w=(b=t).track,[4,d()];case 2:w.apply(b,[C.sent()]),C.label=3;case 3:C.label=4;case 4:return[2]}})})},g=function(){p()},m={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(v,y){return M(void 0,void 0,void 0,function(){var b,w;return N(this,function(C){switch(C.label){case 0:return t=y,o=v,r=v.loggerProvider,r.log("Installing @amplitude/plugin-page-view-tracking-browser"),i=!0,n&&(n.addEventListener("popstate",g),n.history.pushState=new Proxy(n.history.pushState,{apply:function(_,E,P){var T=$(P,3),I=T[0],k=T[1],O=T[2];_.apply(E,[I,k,O]),i&&p()}})),f()?(r.log("Tracking page view event"),w=(b=t).track,[4,d()]):[3,2];case 1:w.apply(b,[C.sent()]),C.label=2;case 2:return[2]}})})},execute:function(v){return M(void 0,void 0,void 0,function(){var y;return N(this,function(b){switch(b.label){case 0:return s==="attribution"&&SE(v)?(r==null||r.log("Enriching campaign event to page view event with campaign parameters"),[4,d()]):[3,2];case 1:y=b.sent(),v.event_type=y.event_type,v.event_properties=U(U({},v.event_properties),y.event_properties),b.label=2;case 2:return o&&v.event_type===u&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,v.event_properties=U(U({},v.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,v]}})})},teardown:function(){return M(void 0,void 0,void 0,function(){return N(this,function(v){return n&&(n.removeEventListener("popstate",g),i=!1),[2]})})}};return m},EE=function(){return M(void 0,void 0,void 0,function(){var e;return N(this,function(t){switch(t.label){case 0:return e=yE,[4,new $p().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},SE=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,n=t[wn.SET]||{},r=t[wn.UNSET]||{},i=ee(ee([],$(Object.keys(n)),!1),$(Object.keys(r)),!1);return Object.keys(Uo).every(function(o){return i.includes(o)})}return!1},_E=function(e,t,n){switch(e){case"pathOnly":{if(n=="")return!0;var r=new URL(t),i=new URL(n),o=r.origin+r.pathname,s=i.origin+i.pathname;return o!==s}default:return t!==n}},CE=function(){var e,t=[],n=function(u,l,d){u.addEventListener(l,d),t.push({element:u,type:l,handler:d})},r=function(){t.forEach(function(u){var l=u.element,d=u.type,f=u.handler;l==null||l.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o="enrichment",s=function(u,l){return M(void 0,void 0,void 0,function(){var d,f;return N(this,function(h){return d=function(){if(!l){u.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if(!(typeof document>"u")){var p=function(m){var v=!1;n(m,"change",function(){var y,b=Qp(m);v||l.track(Yp,(y={},y[du]=vr(m.id),y[fu]=vr(m.name),y[pu]=b,y)),v=!0}),n(m,"submit",function(){var y,b,w=Qp(m);v||l.track(Yp,(y={},y[du]=vr(m.id),y[fu]=vr(m.name),y[pu]=w,y)),l.track(sE,(b={},b[du]=vr(m.id),b[fu]=vr(m.name),b[pu]=w,b)),v=!1})},g=Array.from(document.getElementsByTagName("form"));g.forEach(p),typeof MutationObserver<"u"&&(e=new MutationObserver(function(m){m.forEach(function(v){v.addedNodes.forEach(function(y){y.nodeName==="FORM"&&p(y),"querySelectorAll"in y&&typeof y.querySelectorAll=="function"&&Array.from(y.querySelectorAll("form")).map(p)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=Ae(),f?f.addEventListener("load",d):u.loggerProvider.debug("Form interaction tracking is not installed because global is undefined.")),[2]})})},a=function(u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return[2,u]})})},c=function(){return M(void 0,void 0,void 0,function(){return N(this,function(u){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:c}},vr=function(e){if(typeof e=="string")return e},Qp=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(t??""),window.location.href).href}catch{}return t},TE=function(){var e,t=[],n=function(u,l,d){u.addEventListener(l,d),t.push({element:u,type:l,handler:d})},r=function(){t.forEach(function(u){var l=u.element,d=u.type,f=u.handler;l==null||l.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-file-download-tracking-browser",o="enrichment",s=function(u,l){return M(void 0,void 0,void 0,function(){var d,f;return N(this,function(h){return d=function(){if(!l){u.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if(!(typeof document>"u")){var p=function(v){var y;try{y=new URL(v.href,window.location.href)}catch{return}var b=g.exec(y.href),w=b==null?void 0:b[1];w&&n(v,"click",function(){var C;w&&l.track(aE,(C={},C[cE]=w,C[uE]=y.pathname,C[lE]=v.id,C[dE]=v.text,C[fE]=v.href,C))})},g=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/,m=Array.from(document.getElementsByTagName("a"));m.forEach(p),typeof MutationObserver<"u"&&(e=new MutationObserver(function(v){v.forEach(function(y){y.addedNodes.forEach(function(b){b.nodeName==="A"&&p(b),"querySelectorAll"in b&&typeof b.querySelectorAll=="function"&&Array.from(b.querySelectorAll("a")).map(p)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=Ae(),f?f.addEventListener("load",d):u.loggerProvider.debug("File download tracking is not installed because global is undefined.")),[2]})})},a=function(u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return[2,u]})})},c=function(){return M(void 0,void 0,void 0,function(){return N(this,function(u){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:c}},eh=!1,IE=function(e){if(!(eh||e.defaultTracking!==void 0)){var t=`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:
|
|
545
|
+
|
|
546
|
+
amplitude.init(<YOUR_API_KEY>, {
|
|
547
|
+
defaultTracking: true,
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),eh=!0}},xE=function(){var e="@amplitude/plugin-network-checker-browser",t="before",n=Ae(),r=[],i=function(c,u){n!=null&&n.addEventListener&&(n==null||n.addEventListener(c,u),r.push({type:c,handler:u}))},o=function(){r.forEach(function(c){var u=c.type,l=c.handler;n==null||n.removeEventListener(u,l)}),r=[]},s=function(c,u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return typeof navigator>"u"?(c.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),c.offline=!1,[2]):(c.offline=!navigator.onLine,i("online",function(){c.loggerProvider.debug("Network connectivity changed to online."),c.offline=!1,setTimeout(function(){u.flush()},c.flushIntervalMillis)}),i("offline",function(){c.loggerProvider.debug("Network connectivity changed to offline."),c.offline=!0}),[2])})})},a=function(){return M(void 0,void 0,void 0,function(){return N(this,function(c){return o(),[2]})})};return{name:e,type:t,setup:s,teardown:a}};function th(e){var t,n,r,i,o,s,a,c,u,l,d;if(!(typeof e!="object"||e===null)&&!Array.isArray(e)){var f=Object.keys(e);try{for(var h=Q(f),p=h.next();!p.done;p=h.next()){var g=p.value;try{var m=e[g];typeof(m==null?void 0:m.enabled)=="boolean"&&(m.enabled?(delete m.enabled,Object.keys(m).length===0&&(e[g]=!0)):e[g]=!1),th(m)}catch{}}}catch(k){t={error:k}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}try{if(!((u=(c=(a=e.autocapture)===null||a===void 0?void 0:a.networkTracking)===null||c===void 0?void 0:c.captureRules)===null||u===void 0)&&u.length)try{for(var v=Q(e.autocapture.networkTracking.captureRules),y=v.next();!y.done;y=v.next()){var b=y.value;try{for(var w=(o=void 0,Q(["responseHeaders","requestHeaders"])),C=w.next();!C.done;C=w.next()){var _=C.value,E=(l=b[_])!==null&&l!==void 0?l:{},P=E.captureSafeHeaders,T=E.allowlist;if(!(!P&&!T)){if(T!==void 0&&!Array.isArray(T)){delete b[_];continue}b[_]=ee(ee([],$(P?Bo:[]),!1),$(T??[]),!1)}}}catch(k){o={error:k}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}}}catch(k){r={error:k}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}}catch{}var I=(d=e.autocapture)===null||d===void 0?void 0:d.frustrationInteractions;I&&(I.rageClick&&(I.rageClicks=I.rageClick,delete I.rageClick),I.deadClick&&(I.deadClicks=I.deadClick,delete I.deadClick))}}function nh(e,t,n){var r,i,o=[];try{for(var s=Q(t??[]),a=s.next();!a.done;a=s.next()){var c=a.value;try{o.push(new RegExp(c))}catch(u){n.loggerProvider.warn("Invalid regex pattern: ".concat(c),u)}}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)}function AE(e,t){var n,r,i,o,s,a,c;if(e){th(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e));var u=e;if(u&&"autocapture"in u){if(typeof u.autocapture=="boolean"&&(t.autocapture=u.autocapture),typeof u.autocapture=="object"&&u.autocapture!==null){var l=U({},u.autocapture);if(t.autocapture===void 0&&(t.autocapture=u.autocapture),typeof u.autocapture.elementInteractions=="object"&&u.autocapture.elementInteractions!==null&&(!((i=u.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||i===void 0)&&i.length)){l.elementInteractions=U({},u.autocapture.elementInteractions);var d=l.elementInteractions,f=(o=d.pageUrlAllowlist)!==null&&o!==void 0?o:[],h=u.autocapture.elementInteractions.pageUrlAllowlistRegex;d.pageUrlAllowlist=nh(f,h,t),delete d.pageUrlAllowlistRegex}if(typeof u.autocapture.networkTracking=="object"&&u.autocapture.networkTracking!==null&&(!((s=u.autocapture.networkTracking.captureRules)===null||s===void 0)&&s.length)){l.networkTracking=U({},u.autocapture.networkTracking);var p=l.networkTracking,g=(a=p.captureRules)!==null&&a!==void 0?a:[];try{for(var m=Q(g),v=m.next();!v.done;v=m.next()){var y=v.value;y.urls=nh((c=y.urls)!==null&&c!==void 0?c:[],y.urlsRegex,t),delete y.urlsRegex}}catch(b){n={error:b}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}typeof t.autocapture=="boolean"&&(t.autocapture=U({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},l)),typeof t.autocapture=="object"&&(t.autocapture=U(U({},t.autocapture),l))}t.defaultTracking=t.autocapture}t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(b){t.loggerProvider.error("Failed to apply remote configuration because of error: ",b)}}}var kE="@amplitude/plugin-autocapture-browser",RE="@amplitude/plugin-frustration-browser",hu="[Amplitude] Element Clicked",PE="[Amplitude] Dead Click",rh="[Amplitude] Rage Click",OE="[Amplitude] Element Changed",LE="[Amplitude] Element ID",NE="[Amplitude] Element Class",ih="[Amplitude] Element Tag",oh="[Amplitude] Element Text",ME="[Amplitude] Element Hierarchy",DE="[Amplitude] Element Href",FE="[Amplitude] Element Position Left",UE="[Amplitude] Element Position Top",BE="[Amplitude] Element Aria Label",$E="[Amplitude] Element Attributes",VE="[Amplitude] Element Parent Label",sh="[Amplitude] Page URL",zE="[Amplitude] Page Title",HE="[Amplitude] Viewport Height",jE="[Amplitude] Viewport Width",Jo="https://app.amplitude.com",qE="https://app.eu.amplitude.com",WE="https://apps.stag2.amplitude.com",GE={US:Jo,EU:qE,STAGING:WE},KE="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",YE="amp-visual-tagging-selector-highlight",ah="data-amp-mask-attributes",JE=25;function Ee(e){return typeof e=="function"}function gu(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var mu=gu(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
551
|
+
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
552
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Zo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yi=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Q(s),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(Ee(l))try{l()}catch(g){o=g instanceof mu?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Q(d),h=f.next();!h.done;h=f.next()){var p=h.value;try{lh(p)}catch(g){o=o??[],g instanceof mu?o=ee(ee([],$(o)),$(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new mu(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)lh(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Zo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Zo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),ch=yi.EMPTY;function uh(e){return e instanceof yi||e&&"closed"in e&&Ee(e.remove)&&Ee(e.add)&&Ee(e.unsubscribe)}function lh(e){Ee(e)?e():e.unsubscribe()}var ZE={Promise:void 0},XE={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ee([e,t],$(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function dh(e){XE.setTimeout(function(){throw e})}function vu(){}function Xo(e){e()}var yu=(function(e){nt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,uh(n)&&n.add(r)):r.destination=tS,r}return t.create=function(n,r,i){return new bi(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(yi),QE=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Qo(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Qo(r)}else Qo(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Qo(n)}},e})(),bi=(function(e){nt(t,e);function t(n,r,i){var o=e.call(this)||this,s;return Ee(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,o.destination=new QE(s),o}return t})(yu);function Qo(e){dh(e)}function eS(e){throw e}var tS={closed:!0,next:vu,error:eS,complete:vu},bu=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function fh(e){return e}function nS(e){return e.length===0?fh:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Me=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=iS(t)?t:new bi(t,n,r);return Xo(function(){var s=i,a=s.operator,c=s.source;o.add(a?a.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=ph(n),new n(function(i,o){var s=new bi({next:function(a){try{t(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[bu]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return nS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ph(t),new t(function(r,i){var o;n.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},e.create=function(t){return new e(t)},e})();function ph(e){var t;return(t=e??ZE.Promise)!==null&&t!==void 0?t:Promise}function rS(e){return e&&Ee(e.next)&&Ee(e.error)&&Ee(e.complete)}function iS(e){return e&&e instanceof yu||rS(e)&&uh(e)}function oS(e){return Ee(e==null?void 0:e.lift)}function Et(e){return function(t){if(oS(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Je(e,t,n,r,i){return new sS(e,t,n,r,i)}var sS=(function(e){nt(t,e);function t(n,r,i,o,s,a){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=r?function(u){try{r(u)}catch(l){n.error(l)}}:e.prototype._next,c._error=o?function(u){try{o(u)}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(yu),aS=gu(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),hh=(function(e){nt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new gh(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new aS},t.prototype.next=function(n){var r=this;Xo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Q(r.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(n)}}catch(u){i={error:u}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Xo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Xo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?ch:(this.currentObservers=null,a.push(n),new yi(function(){r.currentObservers=null,Zo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new Me;return n.source=this,n},t.create=function(n,r){return new gh(n,r)},t})(Me),gh=(function(e){nt(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ch},t})(hh),cS={now:function(){return Date.now()}},uS=(function(e){nt(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(yi),mh={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ee([e,t],$(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},lS=(function(e){nt(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,s=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(s,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),mh.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&mh.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(s){i=!0,o=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Zo(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(uS),vh=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=cS.now,e})(),dS=(function(e){nt(t,e);function t(n,r){r===void 0&&(r=vh.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(vh),wi=new dS(lS),fS=wi,wu=new Me(function(e){return e.complete()});function yh(e){return e&&Ee(e.schedule)}function bh(e){return e[e.length-1]}function pS(e){return yh(bh(e))?e.pop():void 0}function hS(e,t){return typeof bh(e)=="number"?e.pop():t}var Eu=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function wh(e){return Ee(e==null?void 0:e.then)}function Eh(e){return Ee(e[bu])}function Sh(e){return Symbol.asyncIterator&&Ee(e==null?void 0:e[Symbol.asyncIterator])}function _h(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function gS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ch=gS();function Th(e){return Ee(e==null?void 0:e[Ch])}function Ih(e){return c2(this,arguments,function(){var n,r,i,o;return N(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,hr(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,hr(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,hr(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function xh(e){return Ee(e==null?void 0:e.getReader)}function Ze(e){if(e instanceof Me)return e;if(e!=null){if(Eh(e))return mS(e);if(Eu(e))return vS(e);if(wh(e))return yS(e);if(Sh(e))return Ah(e);if(Th(e))return bS(e);if(xh(e))return wS(e)}throw _h(e)}function mS(e){return new Me(function(t){var n=e[bu]();if(Ee(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function vS(e){return new Me(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function yS(e){return new Me(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,dh)})}function bS(e){return new Me(function(t){var n,r;try{for(var i=Q(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function Ah(e){return new Me(function(t){ES(e,t).catch(function(n){return t.error(n)})})}function wS(e){return Ah(Ih(e))}function ES(e,t){var n,r,i,o;return M(this,void 0,void 0,function(){var s,a;return N(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=u2(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Cn(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function kh(e,t){return t===void 0&&(t=0),Et(function(n,r){n.subscribe(Je(r,function(i){return Cn(r,e,function(){return r.next(i)},t)},function(){return Cn(r,e,function(){return r.complete()},t)},function(i){return Cn(r,e,function(){return r.error(i)},t)}))})}function Rh(e,t){return t===void 0&&(t=0),Et(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function SS(e,t){return Ze(e).pipe(Rh(t),kh(t))}function _S(e,t){return Ze(e).pipe(Rh(t),kh(t))}function CS(e,t){return new Me(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function TS(e,t){return new Me(function(n){var r;return Cn(n,t,function(){r=e[Ch](),Cn(n,t,function(){var i,o,s;try{i=r.next(),o=i.value,s=i.done}catch(a){n.error(a);return}s?n.complete():n.next(o)},0,!0)}),function(){return Ee(r==null?void 0:r.return)&&r.return()}})}function Ph(e,t){if(!e)throw new Error("Iterable cannot be null");return new Me(function(n){Cn(n,t,function(){var r=e[Symbol.asyncIterator]();Cn(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function IS(e,t){return Ph(Ih(e),t)}function xS(e,t){if(e!=null){if(Eh(e))return SS(e,t);if(Eu(e))return CS(e,t);if(wh(e))return _S(e,t);if(Sh(e))return Ph(e,t);if(Th(e))return TS(e,t);if(xh(e))return IS(e,t)}throw _h(e)}function AS(e,t){return t?xS(e,t):Ze(e)}function Oh(e){return e instanceof Date&&!isNaN(e)}var kS=gu(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function RS(e,t){var n=Oh(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,o=n.with,s=o===void 0?PS:o,a=n.scheduler,c=a===void 0?wi:a,u=n.meta,l=u===void 0?null:u;if(r==null&&i==null)throw new TypeError("No timeout provided.");return Et(function(d,f){var h,p,g=null,m=0,v=function(y){p=Cn(f,c,function(){try{h.unsubscribe(),Ze(s({meta:l,lastValue:g,seen:m})).subscribe(f)}catch(b){f.error(b)}},y)};h=d.subscribe(Je(f,function(y){p==null||p.unsubscribe(),m++,f.next(g=y),i>0&&v(i)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),g=null})),!m&&v(r!=null?typeof r=="number"?r:+r-c.now():i)})}function PS(e){throw new kS(e)}function ze(e,t){return Et(function(n,r){var i=0;n.subscribe(Je(r,function(o){r.next(e.call(t,o,i++))}))})}var OS=Array.isArray;function LS(e,t){return OS(t)?e.apply(void 0,ee([],$(t))):e(t)}function NS(e){return ze(function(t){return LS(e,t)})}function MS(e,t,n,r,i,o,s,a){var c=[],u=0,l=0,d=!1,f=function(){d&&!c.length&&!u&&t.complete()},h=function(g){return u<r?p(g):c.push(g)},p=function(g){u++;var m=!1;Ze(n(g,l++)).subscribe(Je(t,function(v){t.next(v)},function(){m=!0},void 0,function(){if(m)try{u--;for(var v=function(){var y=c.shift();s||p(y)};c.length&&u<r;)v();f()}catch(y){t.error(y)}}))};return e.subscribe(Je(t,h,function(){d=!0,f()})),function(){}}function Ei(e,t,n){return n===void 0&&(n=1/0),Ee(t)?Ei(function(r,i){return ze(function(o,s){return t(r,o,i,s)})(Ze(e(r,i)))},n):(typeof t=="number"&&(n=t),Et(function(r,i){return MS(r,i,e,n)}))}function DS(e){return e===void 0&&(e=1/0),Ei(fh,e)}var FS=["addListener","removeListener"],US=["addEventListener","removeEventListener"],BS=["on","off"];function yr(e,t,n,r){if(Ee(n)&&(r=n,n=void 0),r)return yr(e,t,n).pipe(NS(r));var i=$(zS(e)?US.map(function(a){return function(c){return e[a](t,c,n)}}):$S(e)?FS.map(Lh(e,t)):VS(e)?BS.map(Lh(e,t)):[],2),o=i[0],s=i[1];if(!o&&Eu(e))return Ei(function(a){return yr(a,t,n)})(Ze(e));if(!o)throw new TypeError("Invalid event target");return new Me(function(a){var c=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return a.next(1<u.length?u:u[0])};return o(c),function(){return s(c)}})}function Lh(e,t){return function(n){return function(r){return e[n](t,r)}}}function $S(e){return Ee(e.addListener)&&Ee(e.removeListener)}function VS(e){return Ee(e.on)&&Ee(e.off)}function zS(e){return Ee(e.addEventListener)&&Ee(e.removeEventListener)}function Nh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=fS);var r=-1;return t!=null&&(yh(t)?n=t:r=t),new Me(function(i){var o=Oh(e)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function Su(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=pS(e),r=hS(e,1/0),i=e;return i.length?i.length===1?Ze(i[0]):DS(r)(AS(i,n)):wu}var HS=Array.isArray;function jS(e){return e.length===1&&HS(e[0])?e[0]:e}function Xe(e,t){return Et(function(n,r){var i=0;n.subscribe(Je(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function qS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=jS(e),e.length===1?Ze(e[0]):new Me(WS(e))}function WS(e){return function(t){for(var n=[],r=function(o){n.push(Ze(e[o]).subscribe(Je(t,function(s){if(n){for(var a=0;a<n.length;a++)a!==o&&n[a].unsubscribe();n=null}t.next(s)})))},i=0;n&&!t.closed&&i<e.length;i++)r(i)}}function GS(e){return Et(function(t,n){var r=[];return t.subscribe(Je(n,function(i){return r.push(i)},function(){n.next(r),n.complete()})),Ze(e).subscribe(Je(n,function(){var i=r;r=[],n.next(i)},vu)),function(){r=null}})}function KS(e,t){return t===void 0&&(t=wi),Et(function(n,r){var i=null,o=null,s=null,a=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,r.next(u)}};function c(){var u=s+e,l=t.now();if(l<u){i=this.schedule(void 0,u-l),r.add(i);return}a()}n.subscribe(Je(r,function(u){o=u,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function _u(e){return e<=0?function(){return wu}:Et(function(t,n){var r=0;t.subscribe(Je(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function YS(e){return ze(function(){return e})}function JS(e,t){return Ei(function(n,r){return Ze(e(n,r)).pipe(_u(1),YS(n))})}function ZS(e,t){t===void 0&&(t=wi);var n=Nh(e,t);return JS(function(){return n})}function XS(){return Et(function(e,t){var n,r=!1;e.subscribe(Je(t,function(i){var o=n;n=i,r&&t.next([o,i]),r=!0}))})}function Bn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new hh}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,s=o===void 0?!0:o,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(u){var l,d,f,h=0,p=!1,g=!1,m=function(){d==null||d.unsubscribe(),d=void 0},v=function(){m(),l=f=void 0,p=g=!1},y=function(){var b=l;v(),b==null||b.unsubscribe()};return Et(function(b,w){h++,!g&&!p&&m();var C=f=f??n();w.add(function(){h--,h===0&&!g&&!p&&(d=Cu(y,c))}),C.subscribe(w),!l&&h>0&&(l=new bi({next:function(_){return C.next(_)},error:function(_){g=!0,m(),d=Cu(v,i,_),C.error(_)},complete:function(){p=!0,m(),d=Cu(v,s),C.complete()}}),Ze(b).subscribe(l))})(u)}}function Cu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new bi({next:function(){i.unsubscribe(),e()}});return Ze(t.apply(void 0,ee([],$(n)))).subscribe(i)}}function QS(e,t){return Et(function(n,r){var i=null,o=0,s=!1,a=function(){return s&&!i&&r.complete()};n.subscribe(Je(r,function(c){i==null||i.unsubscribe();var u=0,l=o++;Ze(e(c,l)).subscribe(i=Je(r,function(d){return r.next(t?t(c,d,l,u++):d)},function(){i=null,a()}))},function(){s=!0,a()}))})}function e_(e,t){return Et(function(n,r){var i=t??{},o=i.leading,s=o===void 0?!0:o,a=i.trailing,c=a===void 0?!1:a,u=!1,l=null,d=null,f=!1,h=function(){d==null||d.unsubscribe(),d=null,c&&(m(),f&&r.complete())},p=function(){d=null,f&&r.complete()},g=function(v){return d=Ze(e(v)).subscribe(Je(r,h,p))},m=function(){if(u){u=!1;var v=l;l=null,r.next(v),!f&&g(v)}};n.subscribe(Je(r,function(v){u=!0,l=v,!(d&&!d.closed)&&(s?m():g(v))},function(){f=!0,!(c&&u&&d&&!d.closed)&&r.complete()}))})}function t_(e,t,n){t===void 0&&(t=wi);var r=Nh(e,t);return e_(function(){return r},n)}var n_=["input","select","textarea"],Mh=function(e,t){var n,r=(n=window==null?void 0:window.getComputedStyle)===null||n===void 0?void 0:n.call(window,e);return(r==null?void 0:r.getPropertyValue("cursor"))==="pointer"&&t==="click"},Si=function(e,t,n){return n===void 0&&(n=!1),function(r,i){var o,s,a=e.pageUrlAllowlist,c=e.pageUrlExcludelist,u=e.shouldTrackEventResolver,l=(s=(o=i==null?void 0:i.tagName)===null||o===void 0?void 0:o.toLowerCase)===null||s===void 0?void 0:s.call(o);if(!l)return!1;if(u)return u(r,i);if(!Zc(window.location.href,a)||c&&c.length>0&&Zc(window.location.href,c))return!1;var d=String(i==null?void 0:i.getAttribute("type"))||"";if(typeof d=="string")switch(d.toLowerCase()){case"hidden":return!1;case"password":return!1}var f=Mh(i,r);if(n&&f)return!0;if(t){var h=t.some(function(p){var g;return!!(!((g=i==null?void 0:i.matches)===null||g===void 0)&&g.call(i,p))});if(!h)return!1}switch(l){case"input":case"select":case"textarea":return r==="change"||r==="click";default:return f?!0:r==="click"}}},r_=function(e){var t,n,r,i=(n=(t=e==null?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||n===void 0?void 0:n.call(t),o=e instanceof HTMLElement?((r=e.getAttribute("contenteditable"))===null||r===void 0?void 0:r.toLowerCase())==="true":!1;return!n_.includes(i)&&!o},i_=function(e){return e?e.split(",").map(function(t){return t.trim()}).filter(function(t){return t.length>0&&t!=="id"&&t!=="class"}):[]},o_=function(e,t){return Object.entries(e).reduce(function(n,r){var i=$(r,2),o=i[0],s=i[1];if(o.startsWith(t)){var a=o.replace(t,"");a&&(n[a]=s||"")}return n},{})},s_=function(e){return e==null||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0},Dh=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return s_(r)||(t[n]=r),t},{})},Tu=function(e,t){return e?t.some(function(n){var r;return(r=e==null?void 0:e.matches)===null||r===void 0?void 0:r.call(e,n)})?e:Tu(e==null?void 0:e.parentElement,t):null},a_=function(e){return new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),(r=document.head)===null||r===void 0||r.appendChild(i)}catch(o){n(o)}})};function c_(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var _i=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function u_(e){return e.type==="click"||e.type==="change"}var Fh="1.17.0",l_=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",ah,vi]),d_=["type"],f_=["svg","path","g"],p_=["password","hidden"],h_=128;function g_(e,t){var n,r,i,o,s,a;if(e===null)return null;var c=String(e.tagName).toLowerCase(),u={tag:c},l=Array.from((o=(i=e.parentElement)===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[]);l.length&&(u.index=l.indexOf(e),u.indexOfType=l.filter(function(C){return C.tagName===e.tagName}).indexOf(e));var d=(a=(s=e.previousElementSibling)===null||s===void 0?void 0:s.tagName)===null||a===void 0?void 0:a.toLowerCase();d&&(u.prevSib=String(d));var f=e.getAttribute("id");f&&(u.id=String(f));var h=Array.from(e.classList);h.length&&(u.classes=h);var p={},g=Array.from(e.attributes),m=g.filter(function(C){return!l_.has(C.name)}),v=!r_(e);if(!p_.includes(String(e.getAttribute("type")))&&!f_.includes(c))try{for(var y=Q(m),b=y.next();!b.done;b=y.next()){var w=b.value;if(!(v&&!d_.includes(w.name))){if(t.has(w.name)){p[w.name]=_n;continue}p[w.name]=String(w.value).substring(0,h_)}}}catch(C){n={error:C}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(p).length&&(u.attrs=p),u}function m_(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&n.tagName!=="HTML";)t.push(n),n=n.parentElement;return t}var v_=function(e,t){try{if(e.sourceType==="DOM_ELEMENT"){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch{return}},y_=function(e,t,n){e.forEach(function(r){if(typeof r!="string"&&r.actionType==="ATTACH_EVENT_PROPERTY"){var i=n.extractDataFromDataSource(r.dataSource,t.closestTrackedAncestor);t.targetElementProperties[r.destinationKey]=i}})},Iu=(function(){function e(t,n){var r,i,o=this,s;this.replaceSensitiveString=function(f){return ou(f,o.additionalMaskTextPatterns)},this.getHierarchy=function(f){var h,p,g,m,v=performance.now(),y=[];if(!f)return[];for(var b=m_(f),w=new Map,C=b.length-1;C>=0;C--){var _=b[C];if(_){var E=i_(_.getAttribute(ah)),P=C===b.length-1?[]:(g=w.get(b[C+1]))!==null&&g!==void 0?g:new Set,T=new Set(ee(ee([],$(P),!1),$(E),!1));w.set(_,T)}}y=b.map(function(V){var z;return g_(V,(z=w.get(V))!==null&&z!==void 0?z:new Set)});var I=function(V){V!=null&&V.attrs&&Object.entries(V.attrs).forEach(function(z){var ye=$(z,2),oe=ye[0],J=ye[1];V.attrs&&(V.attrs[oe]=o.replaceSensitiveString(J))})};try{for(var k=Q(y),O=k.next();!O.done;O=k.next()){var D=O.value;I(D)}}catch(V){h={error:V}}finally{try{O&&!O.done&&(p=k.return)&&p.call(k)}finally{if(h)throw h.error}}var F=performance.now();return(m=o.diagnosticsClient)===null||m===void 0||m.recordHistogram("autocapturePlugin.getHierarchy",F-v),y},this.getNearestLabel=function(f){var h=f.parentElement;if(!h)return"";var p;try{p=h.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{p=null}return p?o.getText(p):o.getNearestLabel(h)},this.getEventProperties=function(f,h,p){var g,m,v,y,b=(v=(m=h==null?void 0:h.tagName)===null||m===void 0?void 0:m.toLowerCase)===null||v===void 0?void 0:v.call(m),w=typeof h.getBoundingClientRect=="function"?h.getBoundingClientRect():{left:null,top:null},C=o.getHierarchy(h),_=(y=C[0])===null||y===void 0?void 0:y.attrs,E=o.getNearestLabel(h),P=o_(_??{},p),T=(g={},g[ME]=C,g[ih]=b,g[oh]=o.getText(h),g[FE]=w.left==null?null:Math.round(w.left),g[UE]=w.top==null?null:Math.round(w.top),g[$E]=P,g[VE]=E,g[sh]=gi(window.location.href.split("?")[0]),g[zE]=su(o.replaceSensitiveString),g[HE]=window.innerHeight,g[jE]=window.innerWidth,g);return T[LE]=h.getAttribute("id")||"",T[NE]=h.getAttribute("class"),T[BE]=_==null?void 0:_["aria-label"],b==="a"&&f==="click"&&h instanceof HTMLAnchorElement&&(T[DE]=o.replaceSensitiveString(h.href)),Dh(T)},this.addAdditionalEventProperties=function(f,h,p,g,m){m===void 0&&(m=!1);var v={event:f,timestamp:Date.now(),type:h};if(u_(v)&&v.event.target!==null){if(m){var y=Mh(v.event.target,v.type);if(y)return v.closestTrackedAncestor=v.event.target,v.targetElementProperties=o.getEventProperties(v.type,v.closestTrackedAncestor,g),v}var b=Tu(v.event.target,p);return b&&(v.closestTrackedAncestor=b,v.targetElementProperties=o.getEventProperties(v.type,b,g)),v}return v},this.extractDataFromDataSource=function(f,h){if(f.sourceType==="DOM_ELEMENT"){var p=v_(f,h);return p?f.elementExtractType==="TEXT"?o.getText(p):f.elementExtractType==="ATTRIBUTE"&&f.attribute?p.getAttribute(f.attribute):void 0:void 0}},this.getText=function(f){var h=f.closest("[".concat(vi,"]"))!==null;if(h)return _n;var p="";if(!f.querySelector("[".concat(vi,"], [contenteditable]")))p=f.innerText||"";else{var g=f.cloneNode(!0);g.querySelectorAll("[".concat(vi,"], [contenteditable]")).forEach(function(m){m.innerText=_n}),p=g.innerText||""}return o.replaceSensitiveString(p.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(f){var h,p,g;if(!f)return{};var m=(g=(p=f==null?void 0:f.tagName)===null||p===void 0?void 0:p.toLowerCase)===null||g===void 0?void 0:g.call(p),v=(h={},h[ih]=m,h[oh]=o.getText(f),h[sh]=window.location.href.split("?")[0],h);return Dh(v)},this.diagnosticsClient=n==null?void 0:n.diagnosticsClient;var a=(s=t.maskTextRegex)!==null&&s!==void 0?s:[],c=[];try{for(var u=Q(a),l=u.next();!l.done;l=u.next()){var d=l.value;if(c.length>=JE)break;if(d instanceof RegExp)c.push(d);else if("pattern"in d&&typeof d.pattern=="string")try{c.push(new RegExp(d.pattern,"i"))}catch{}}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=c}return e})(),b_=(function(){function e(t){var n=t===void 0?{}:t,r=n.origin,i=r===void 0?Jo:r,o=this;this.endpoint=Jo,this.requestCallbacks={},this.onSelect=function(s){o.notify({action:"element-selected",data:s})},this.onTrack=function(s,a){s==="selector-mode-changed"?o.notify({action:"track-selector-mode-changed",data:a}):s==="selector-moved"&&o.notify({action:"track-selector-moved",data:a})},this.endpoint=i}return e.prototype.notify=function(t){var n,r,i,o;(r=(n=this.logger)===null||n===void 0?void 0:n.debug)===null||r===void 0||r.call(n,"Message sent: ",JSON.stringify(t)),(o=(i=window.opener)===null||i===void 0?void 0:i.postMessage)===null||o===void 0||o.call(i,t,this.endpoint)},e.prototype.sendRequest=function(t,n,r){var i=this;r===void 0&&(r={timeout:15e3});var o=c_(),s={id:o,action:t,args:n},a=new Promise(function(c,u){i.requestCallbacks[o]={resolve:c,reject:u},i.notify(s),(r==null?void 0:r.timeout)>0&&setTimeout(function(){u(new Error("".concat(t," timed out (id: ").concat(o,")"))),delete i.requestCallbacks[o]},r.timeout)});return a},e.prototype.handleResponse=function(t){var n;if(!this.requestCallbacks[t.id]){(n=this.logger)===null||n===void 0||n.warn("No callback found for request id: ".concat(t.id));return}this.requestCallbacks[t.id].resolve(t.responseData),delete this.requestCallbacks[t.id]},e.prototype.setup=function(t){var n=this,r=t===void 0?{dataExtractor:new Iu({})}:t,i=r.logger,o=r.endpoint,s=r.isElementSelectable,a=r.cssSelectorAllowlist,c=r.actionClickAllowlist,u=r.dataExtractor;this.logger=i,o&&this.endpoint===Jo&&(this.endpoint=o);var l=null;window.addEventListener("message",function(d){var f,h,p,g,m;if((h=(f=n.logger)===null||f===void 0?void 0:f.debug)===null||h===void 0||h.call(f,"Message received: ",JSON.stringify(d)),n.endpoint===d.origin){var v=d==null?void 0:d.data,y=v==null?void 0:v.action;if(y)if("id"in v)(g=(p=n.logger)===null||p===void 0?void 0:p.debug)===null||g===void 0||g.call(p,"Received Response to previous request: ",JSON.stringify(d)),n.handleResponse(v);else if(y==="ping")n.notify({action:"pong"});else if(y==="initialize-visual-tagging-selector"){var b=v==null?void 0:v.data;a_(KE).then(function(){var w;l=(w=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||w===void 0?void 0:w.call(window,{getEventTagProps:u.getEventTagProps,isElementSelectable:function(C){return s?s((b==null?void 0:b.actionType)||"click",C):!0},onTrack:n.onTrack,onSelect:n.onSelect,visualHighlightClass:YE,messenger:n,cssSelectorAllowlist:a,actionClickAllowlist:c,extractDataFromDataSource:u.extractDataFromDataSource,dataExtractor:u,diagnostics:{autocapture:{version:Fh}}}),n.notify({action:"selector-loaded"})}).catch(function(){var w;(w=n.logger)===null||w===void 0||w.warn("Failed to initialize visual tagging selector")})}else y==="close-visual-tagging-selector"&&((m=l==null?void 0:l.close)===null||m===void 0||m.call(l))}}),this.notify({action:"page-loaded"})},e})(),w_=5;function E_(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.clickObservable,a=s.pipe(XS(),Xe(function(d){var f=$(d,2),h=f[0],p=f[1],g=h.event.target!==p.event.target,m=Math.abs(p.event.screenX-h.event.screenX)<=20&&Math.abs(p.event.screenY-h.event.screenY)<=20;return g&&!m})),c=s.pipe(KS(r.debounceTime),ze(function(){return"timeout"})),u=Su(a,c),l=s.pipe(ZS(0),Xe(_i),Xe(function(d){return i("click",d.closestTrackedAncestor)}),ze(function(d){return o(d)}),GS(u));return l.subscribe(function(d){var f,h,p=(d.length>=w_,hu);try{for(var g=Q(d),m=g.next();!m.done;m=g.next()){var v=m.value;t==null||t.track(p,v.targetElementProperties)}}catch(y){f={error:y}}finally{try{m&&!m.done&&(h=g.return)&&h.call(g)}finally{if(f)throw f.error}}})}function S_(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.changeObservable,a=s.pipe(Xe(_i),Xe(function(c){return i("change",c.closestTrackedAncestor)}),ze(function(c){return o(c)}));return a.subscribe(function(c){t==null||t.track(OE,r("change",c.closestTrackedAncestor))})}function __(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,c=n.mutationObservable,u=n.navigateObservable,l=a.pipe(Xe(function(p){return!o("click",p.closestTrackedAncestor)}),ze(function(p){var g=Tu(p.event.target,r.actionClickAllowlist);return p.closestTrackedAncestor=g,p.closestTrackedAncestor!==null&&(p.targetElementProperties=i(p.type,p.closestTrackedAncestor)),p}),Xe(_i),Xe(function(p){return s("click",p.closestTrackedAncestor)})),d=[c];u&&d.push(u);var f=Su.apply(void 0,ee([],$(d),!1)),h=l.pipe(QS(function(p){return f.pipe(_u(1),RS({first:500,with:function(){return wu}}),ze(function(){return p}))}));return h.subscribe(function(p){t==null||t.track(hu,i("click",p.closestTrackedAncestor))})}var Uh=function(){return new Me(function(e){var t=new MutationObserver(function(n){e.next(n)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Bh=function(e){return e===void 0&&(e="click"),yr(document,e,{capture:!0})},C_=function(e,t){try{if(t.subprop_key==="[Amplitude] Element Text")return t.subprop_op==="is"&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if(t.subprop_key==="[Amplitude] Element Hierarchy")return t.subprop_op==="autotrack css match"&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(n){return console.error("Error matching event to filter",n),!1}return!1},xu={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},$h=function(e){var t,n,r,i,o=Object.values(xu).reduce(function(h,p){return h[p]=new Set,h},{});if(!e)return o;try{for(var s=Q(e),a=s.next();!a.done;a=s.next()){var c=a.value;try{try{for(var u=(r=void 0,Q(c.definition)),l=u.next();!l.done;l=u.next()){var d=l.value,f=xu[d.event_type];f&&o[f].add(c.id)}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}catch(h){console.warn("Skipping Labeled Event due to malformed definition",c==null?void 0:c.id,h)}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},Vh=function(e){var t,n,r,i,o=new Map;try{for(var s=Q(e),a=s.next();!a.done;a=s.next()){var c=a.value;try{for(var u=(r=void 0,Q(c.conditions)),l=u.next();!l.done;l=u.next()){var d=l.value;if(d.type==="LABELED_EVENT"){var f=d.match.eventId,h=o.get(f);h||(h=[],o.set(f,h)),h.push(c)}}}catch(p){r={error:p}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(p){t={error:p}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},T_=function(e,t){return t.filter(function(n){return n.definition.some(function(r){return xu[r.event_type]===e.type&&r.filters.every(function(i){return C_(e,i)})})})},I_=function(e,t){var n,r,i,o,s=new Set;try{for(var a=Q(e),c=a.next();!c.done;c=a.next()){var u=c.value,l=t.get(u.id);if(l)try{for(var d=(i=void 0,Q(l)),f=d.next();!f.done;f=d.next()){var h=f.value;s.add(h)}}catch(p){i={error:p}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)},x_=(function(){function e(t,n,r,i){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.dataExtractor=r,this.options=i}return e.prototype.evaluate=function(t){var n,r,i=this.options.pageActions;if(!i)return t;var o=T_(t,Array.from(this.groupedLabeledEvents[t.type]).map(function(l){return i.labeledEvents[l]})),s=I_(o,this.labeledEventToTriggerMap);try{for(var a=Q(s),c=a.next();!c.done;c=a.next()){var u=c.value;y_(u.actions,t,this.dataExtractor)}}catch(l){n={error:l}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return t},e.prototype.update=function(t,n,r){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.options=r},e})(),A_=function(e,t,n,r){return new x_(e,t,n,r)},Gt;(function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"})(Gt||(Gt={}));var k_=function(e,t){var n,r,i,o,s,a,c,u;e===void 0&&(e={}),t==null||t.diagnosticsClient.setTag("plugin.autocapture.version",Fh);var l=e.dataAttributePrefix,d=l===void 0?Pp:l,f=e.visualTaggingOptions,h=f===void 0?{enabled:!0,messenger:new b_}:f;e.cssSelectorAllowlist=(n=e.cssSelectorAllowlist)!==null&&n!==void 0?n:Sw,e.actionClickAllowlist=(r=e.actionClickAllowlist)!==null&&r!==void 0?r:_w,e.debounceTime=(i=e.debounceTime)!==null&&i!==void 0?i:0,e.pageUrlExcludelist=(o=e.pageUrlExcludelist)===null||o===void 0?void 0:o.reduce(function(I,k){if(typeof k=="string"&&I.push(k),k instanceof RegExp&&I.push(k),typeof k=="object"&&k!==null&&"pattern"in k)try{I.push(new RegExp(k.pattern))}catch(O){return console.warn("Invalid regex pattern: ".concat(k.pattern),O),I}return I},[]);var p=kE,g="enrichment",m=[],v=new Iu(e,t),y=function(){var I,k=Bh().pipe(ze(function(V){return v.addAdditionalEventProperties(V,"click",e.cssSelectorAllowlist,d)}),Bn()),O=yr(document,"change",{capture:!0}).pipe(ze(function(V){return v.addAdditionalEventProperties(V,"change",e.cssSelectorAllowlist,d)}),Bn()),D;window.navigation&&(D=yr(window.navigation,"navigate").pipe(ze(function(V){return v.addAdditionalEventProperties(V,"navigate",e.cssSelectorAllowlist,d)}),Bn()));var F=Uh().pipe(ze(function(V){return v.addAdditionalEventProperties(V,"mutation",e.cssSelectorAllowlist,d)}),Bn());return I={},I[Gt.ClickObservable]=k,I[Gt.ChangeObservable]=O,I[Gt.NavigateObservable]=D,I[Gt.MutationObservable]=F,I},b=$h(Object.values((a=(s=e.pageActions)===null||s===void 0?void 0:s.labeledEvents)!==null&&a!==void 0?a:{})),w=Vh((u=(c=e.pageActions)===null||c===void 0?void 0:c.triggers)!==null&&u!==void 0?u:[]),C=A_(b,w,v,e),_=function(I){var k,O;I&&(e.pageActions=U(U({},e.pageActions),I),b=$h(Object.values((k=e.pageActions.labeledEvents)!==null&&k!==void 0?k:{})),w=Vh((O=e.pageActions.triggers)!==null&&O!==void 0?O:[]),C.update(b,w,e))},E=function(I,k){return M(void 0,void 0,void 0,function(){var O,D,F,V,z,ye,oe,J,re,W;return N(this,function(ce){return typeof document>"u"?[2]:(I.fetchRemoteConfig&&(I.remoteConfigClient?I.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(te){_(te)}):I.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),O=Si(e,e.cssSelectorAllowlist),D=Si(e,e.actionClickAllowlist),F=y(),V=E_({allObservables:F,options:e,amplitude:k,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(V),z=S_({allObservables:F,getEventProperties:function(){for(var te=[],_e=0;_e<arguments.length;_e++)te[_e]=arguments[_e];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:k,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(z),ye=__({allObservables:F,options:e,getEventProperties:function(){for(var te=[],_e=0;_e<arguments.length;_e++)te[_e]=arguments[_e];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:k,shouldTrackEvent:O,shouldTrackActionClick:D}),m.push(ye),(re=I==null?void 0:I.loggerProvider)===null||re===void 0||re.log("".concat(p," has been successfully added.")),window.opener&&h.enabled&&(oe=e.cssSelectorAllowlist,J=e.actionClickAllowlist,(W=h.messenger)===null||W===void 0||W.setup(U(U({dataExtractor:v,logger:I==null?void 0:I.loggerProvider},(I==null?void 0:I.serverZone)&&{endpoint:GE[I.serverZone]}),{isElementSelectable:Si(e,ee(ee([],$(oe),!1),$(J),!1)),cssSelectorAllowlist:oe,actionClickAllowlist:J}))),[2])})})},P=function(I){return M(void 0,void 0,void 0,function(){return N(this,function(k){return[2,I]})})},T=function(){return M(void 0,void 0,void 0,function(){var I,k,O,D,F;return N(this,function(V){try{for(I=Q(m),k=I.next();!k.done;k=I.next())O=k.value,O.unsubscribe()}catch(z){D={error:z}}finally{try{k&&!k.done&&(F=I.return)&&F.call(I)}finally{if(D)throw D.error}}return[2]})})};return{name:p,type:g,setup:E,execute:P,teardown:T}},zh=3e3;function R_(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,o=n.clickObservable,s=n.mutationObservable,a=n.navigateObservable,c=o.pipe(Xe(_i),Xe(function(f){return i("click",f.closestTrackedAncestor)}),Xe(function(f){var h=f.event.target;return h.closest('a[target="_blank"]')===null})),u=[s];a&&u.push(a);var l=Su.apply(void 0,ee([],$(u),!1)),d=c.pipe(Ei(function(f){var h,p=new Me(function(g){return h=setTimeout(function(){return g.next(f)},zh),function(){clearTimeout(h)}});return qS(p,l.pipe(_u(1),ze(function(){return null}))).pipe(Xe(function(g){return g!==null}))}),t_(zh));return d.subscribe(function(f){var h={"[Amplitude] X":f.event.clientX,"[Amplitude] Y":f.event.clientY};t.track(PE,U(U({},r("click",f.closestTrackedAncestor)),h),{time:f.timestamp})})}var Au=Aw,Hh=xw,jh=kw;function qh(e,t){var n,r,i,o,s=t.event,a=s.clientX,c=s.clientY;e.yMin=Math.min((n=e.yMin)!==null&&n!==void 0?n:c,c),e.yMax=Math.max((r=e.yMax)!==null&&r!==void 0?r:c,c),e.xMin=Math.min((i=e.xMin)!==null&&i!==void 0?i:a,a),e.xMax=Math.max((o=e.xMax)!==null&&o!==void 0?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>jh||e.xMax-e.xMin>jh}function Wh(e){var t=e[0],n=e[e.length-1],r=U({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(i){return{X:i.event.clientX,Y:i.event.clientY,Time:i.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties);return{rageClickEvent:r,time:t.timestamp}}function P_(e,t){var n=Math.max(0,e.length-Au+1),r=e[n];return t.timestamp-r.timestamp>=Hh}function O_(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function L_(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackRageClick,i=n.clickObservable,o=[],s={},a;function c(u){o=[],s={},u&&(qh(s,u),o.push(u))}return i.pipe(Xe(_i),Xe(function(u){return r("click",u.closestTrackedAncestor)}),ze(function(u){if(a&&clearTimeout(a),qh(s,u),o.length===0)return o.push(u),null;if(O_(o,u)||P_(o,u)||s.isOutOfBounds){var l=o.length>=Au?Wh(o):null;return c(u),l}return o.push(u),o.length>=Au&&(a=setTimeout(function(){var d=Wh(o),f=d.rageClickEvent,h=d.time;t.track(rh,f,{time:h}),c()},Hh)),null}),Xe(function(u){return u!==null})).subscribe(function(u){u!==null&&t.track(rh,u.rageClickEvent,{time:u.time})})}var N_=function(e){var t,n,r,i,o;e===void 0&&(e={});var s=RE,a="enrichment",c=[],u=(n=(t=e.rageClicks)===null||t===void 0?void 0:t.cssSelectorAllowlist)!==null&&n!==void 0?n:Iw,l=(i=(r=e.deadClicks)===null||r===void 0?void 0:r.cssSelectorAllowlist)!==null&&i!==void 0?i:Tw,d=(o=e.dataAttributePrefix)!==null&&o!==void 0?o:Pp,f=new Iu(e),h=ee([],$(new Set(ee(ee([],$(u),!1),$(l),!1))),!1),p=function(){var y,b=Bh("pointerdown").pipe(ze(function(_){return f.addAdditionalEventProperties(_,"click",h,d,!0)}),Bn()),w;window.navigation&&(w=yr(window.navigation,"navigate").pipe(ze(function(_){return f.addAdditionalEventProperties(_,"navigate",h,d)}),Bn()));var C=Uh().pipe(ze(function(_){return f.addAdditionalEventProperties(_,"mutation",h,d)}),Bn());return y={},y[Gt.ClickObservable]=b,y[Gt.ChangeObservable]=new Me,y[Gt.NavigateObservable]=w,y[Gt.MutationObservable]=C,y},g=function(y,b){return M(void 0,void 0,void 0,function(){var w,C,_,E,P,T;return N(this,function(I){return typeof document>"u"?[2]:(w=Si(e,u),C=Si(e,l),_=p(),E=L_({allObservables:_,amplitude:b,shouldTrackRageClick:w}),c.push(E),P=R_({amplitude:b,allObservables:_,getEventProperties:function(k,O){return f.getEventProperties(k,O,d)},shouldTrackDeadClick:C}),c.push(P),(T=y==null?void 0:y.loggerProvider)===null||T===void 0||T.log("".concat(s," has been successfully added.")),[2])})})},m=function(y){return M(void 0,void 0,void 0,function(){return N(this,function(b){return[2,y]})})},v=function(){return M(void 0,void 0,void 0,function(){var y,b,w,C,_;return N(this,function(E){try{for(y=Q(c),b=y.next();!b.done;b=y.next())w=b.value,w.unsubscribe()}catch(P){C={error:P}}finally{try{b&&!b.done&&(_=y.return)&&_.call(y)}finally{if(C)throw C.error}}return[2]})})};return{name:s,type:a,setup:g,execute:m,teardown:v}},M_="@amplitude/plugin-network-capture-browser",Gh="[Amplitude] Network Request",Kh="500-599";function es(e,t){var n=t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),r="^"+n.replace(/\*/g,".*")+"$",i=new RegExp(r);return i.test(e)}function Yh(e,t){var n,r,i=t.split(",");try{for(var o=Q(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=$(a.split("-").map(Number),2),u=c[0],l=c[1];if(e===u&&l===void 0||e>=u&&e<=l)return!0}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function D_(e,t,n,r,i){if(!(e.hosts&&!e.hosts.find(function(s){return es(t,s)}))&&!(r&&e.urls&&!Zc(r,e.urls))&&!(i&&e.methods&&!e.methods.find(function(s){return i.toLowerCase()===s.toLowerCase()||s==="*"}))){if(n||n===0){var o=e.statusCodeRange||Kh;if(!Yh(n,o))return!1}return!0}}function Jh(e){var t;if(e)try{var n=(t=Ae())===null||t===void 0?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;r.hash="",r.search="";var c=r.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:c,host:a}}catch{return}}function F_(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if(typeof n!="string")return!1;var r=JSON.parse(n),i=r.events;if(i.find(function(o){return o.event_type===Gh}))return!0}catch{}return!1}function Zh(e){if(typeof e!="object"||e===null){if(e)return ee([],$(Bo),!1);if(e===void 0){var t=void 0;return t}return}if(e.length!==0)return e}function Xh(e){var t,n;return!(!((t=e==null?void 0:e.allowlist)===null||t===void 0)&&t.length)&&!(!((n=e==null?void 0:e.blocklist)===null||n===void 0)&&n.length)}function U_(e,t){var n;t===void 0&&(t={});var r=Jh(e.url);if(!r)return!1;var i=r.host;if(t.ignoreAmplitudeRequests!==!1&&(es(i,"*.amplitude.com")||es(i,"amplitude.com"))||!((n=t.ignoreHosts)===null||n===void 0)&&n.find(function(s){return es(i,s)})||!t.captureRules&&e.status!==void 0&&!Yh(e.status,Kh))return!1;if(t.captureRules){var o;if(ee([],$(t.captureRules),!1).reverse().find(function(s){if(o=D_(s,i,e.status,e.url,e.method),o){var a=Zh(s.responseHeaders);if(e.responseWrapper&&a){var c=e.responseWrapper.headers(a);c&&(e.responseHeaders=c)}var u=Zh(s.requestHeaders);if(e.requestWrapper&&u){var l=e.requestWrapper.headers(u);l&&(e.requestHeaders=l)}e.responseWrapper&&s.responseBody&&!Xh(s.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(s.responseBody.allowlist,s.responseBody.blocklist)),e.requestWrapper&&s.requestBody&&!Xh(s.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(s.requestBody.allowlist,s.requestBody.blocklist))}return o!==void 0}),!o)return!1}return!(e.requestWrapper&&F_(i,e.requestWrapper))}function B_(e,t,n,r){return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=$.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(c){r==null||r.debug("Failed to stringify request body",c)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch{r==null||r.debug("Failed to stringify response body")}a.label=2;case 2:return n==null||n.track(Gh,e),[2]}})})}function $_(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider,o=t.networkObservable,s=o.pipe(Xe(function(a){return U_(a.event,n)}));return s.subscribe(function(a){var c,u,l,d=a.event,f=Jh(d.url);if(f){var h=(u=d.responseWrapper)===null||u===void 0?void 0:u.bodySize,p=(l=d.requestWrapper)===null||l===void 0?void 0:l.bodySize,g=(c={},c["[Amplitude] URL"]=f.hrefWithoutQueryOrHash,c["[Amplitude] URL Query"]=f.query,c["[Amplitude] URL Fragment"]=f.fragment,c["[Amplitude] Request Method"]=d.method,c["[Amplitude] Status Code"]=d.status,c["[Amplitude] Start Time"]=d.startTime,c["[Amplitude] Completion Time"]=d.endTime,c["[Amplitude] Duration"]=d.duration,c["[Amplitude] Request Body Size"]=p,c["[Amplitude] Response Body Size"]=h,c["[Amplitude] Request Type"]=d.type,c["[Amplitude] Request Headers"]=d.requestHeaders,c["[Amplitude] Response Headers"]=d.responseHeaders,c);B_(g,d,r,i)}})}var ku;(function(e){e.NetworkObservable="networkObservable"})(ku||(ku={}));var V_=function(e){e===void 0&&(e={});var t=M_,n="enrichment",r,i=[],o=function(l,d){var f={event:l,timestamp:Date.now(),type:d};return f},s=function(){var l,d=new Me(function(f){var h=new Uw(function(p){var g=o(p,"network");f.next(g)});return Bp.subscribe(h,r),function(){Bp.unsubscribe(h)}});return l={},l[ku.NetworkObservable]=d,l},a=function(l,d){return M(void 0,void 0,void 0,function(){var f,h;return N(this,function(p){return typeof document>"u"?[2]:(f=s(),r=l==null?void 0:l.loggerProvider,h=$_({allObservables:f,networkTrackingOptions:e,amplitude:d,loggerProvider:r}),i.push(h),r==null||r.log("".concat(t," has been successfully added.")),[2])})})},c=function(l){return M(void 0,void 0,void 0,function(){return N(this,function(d){return[2,l]})})},u=function(){return M(void 0,void 0,void 0,function(){var l,d,f,h,p;return N(this,function(g){try{for(l=Q(i),d=l.next();!d.done;d=l.next())f=d.value,f.unsubscribe()}catch(m){h={error:m}}finally{try{d&&!d.done&&(p=l.return)&&p.call(l)}finally{if(h)throw h.error}}return[2]})})};return{name:t,type:n,setup:a,execute:c,teardown:u}},z_="web-vitals-browser",H_="[Amplitude] Web Vitals";let Qh=-1;const br=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Qh=t.timeStamp,e(t))}),!0)},Kt=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=((a,c)=>a>c[1]?"poor":a>c[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ru=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Pu=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ci=()=>{const e=Pu();return(e==null?void 0:e.activationStart)??0},Yt=(e,t=-1)=>{const n=Pu();let r="navigate";return Qh>=0?r="back-forward-cache":n&&(document.prerendering||Ci()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ou=new WeakMap;function Lu(e,t){return Ou.get(e)||Ou.set(e,new t),Ou.get(e)}class j_{constructor(){S(this,"t");S(this,"i",0);S(this,"o",[])}h(t){var i;if(t.hadRecentInput)return;const n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),(i=this.t)==null||i.call(this,t)}}const Ti=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((i=>{Promise.resolve().then((()=>{t(i.getEntries())}))}));return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Nu=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let wr=-1;const eg=new Set,tg=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Mu=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of eg)t();isFinite(wr)||(wr=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Mu,!0))}},ts=()=>{var e;if(wr<0){const t=Ci();wr=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter((r=>r.name==="hidden"&&r.startTime>t))[0])==null?void 0:e.startTime)??tg(),addEventListener("visibilitychange",Mu,!0),addEventListener("prerenderingchange",Mu,!0),br((()=>{setTimeout((()=>{wr=tg()}))}))}return{get firstHiddenTime(){return wr},onHidden(t){eg.add(t)}}},ns=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},ng=[1800,3e3],rg=(e,t={})=>{ns((()=>{const n=ts();let r,i=Yt("FCP");const o=Ti("paint",(s=>{for(const a of s)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(i.value=Math.max(a.startTime-Ci(),0),i.entries.push(a),r(!0)))}));o&&(r=Kt(e,i,ng,t.reportAllChanges),br((s=>{i=Yt("FCP"),r=Kt(e,i,ng,t.reportAllChanges),Ru((()=>{i.value=performance.now()-s.timeStamp,r(!0)}))})))}))},ig=[.1,.25],q_=(e,t={})=>{const n=ts();rg(Nu((()=>{let r,i=Yt("CLS",0);const o=Lu(t,j_),s=c=>{for(const u of c)o.h(u);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=Ti("layout-shift",s);a&&(r=Kt(e,i,ig,t.reportAllChanges),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),br((()=>{o.i=0,i=Yt("CLS",0),r=Kt(e,i,ig,t.reportAllChanges),Ru((()=>r()))})),setTimeout(r))})))};let og=0,Du=1/0,rs=0;const W_=e=>{for(const t of e)t.interactionId&&(Du=Math.min(Du,t.interactionId),rs=Math.max(rs,t.interactionId),og=rs?(rs-Du)/7+1:0)};let Fu;const sg=()=>Fu?og:performance.interactionCount??0,G_=()=>{"interactionCount"in performance||Fu||(Fu=Ti("event",W_,{type:"event",buffered:!0,durationThreshold:0}))};let ag=0;class K_{constructor(){S(this,"u",[]);S(this,"l",new Map);S(this,"m");S(this,"p")}v(){ag=sg(),this.u.length=0,this.l.clear()}L(){const t=Math.min(this.u.length-1,Math.floor((sg()-ag)/50));return this.u[t]}h(t){var i,o;if((i=this.m)==null||i.call(this,t),!t.interactionId&&t.entryType!=="first-input")return;const n=this.u.at(-1);let r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.P){if(r?t.duration>r.P?(r.entries=[t],r.P=t.duration):t.duration===r.P&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],P:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort(((s,a)=>a.P-s.P)),this.u.length>10){const s=this.u.splice(10);for(const a of s)this.l.delete(a.id)}(o=this.p)==null||o.call(this,r)}}}const cg=e=>{const t=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?e():(e=Nu(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},ug=[200,500],Y_=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=ts();ns((()=>{G_();let r,i=Yt("INP");const o=Lu(t,K_),s=c=>{cg((()=>{for(const l of c)o.h(l);const u=o.L();u&&u.P!==i.value&&(i.value=u.P,i.entries=u.entries,r())}))},a=Ti("event",s,{durationThreshold:t.durationThreshold??40});r=Kt(e,i,ug,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),br((()=>{o.v(),i=Yt("INP"),r=Kt(e,i,ug,t.reportAllChanges)})))}))};class J_{constructor(){S(this,"m")}h(t){var n;(n=this.m)==null||n.call(this,t)}}const lg=[2500,4e3],Z_=(e,t={})=>{ns((()=>{const n=ts();let r,i=Yt("LCP");const o=Lu(t,J_),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o.h(u),u.startTime<n.firstHiddenTime&&(i.value=Math.max(u.startTime-Ci(),0),i.entries=[u],r())},a=Ti("largest-contentful-paint",s);if(a){r=Kt(e,i,lg,t.reportAllChanges);const c=Nu((()=>{s(a.takeRecords()),a.disconnect(),r(!0)})),u=l=>{l.isTrusted&&(cg(c),removeEventListener(l.type,u,{capture:!0}))};for(const l of["keydown","click","visibilitychange"])addEventListener(l,u,{capture:!0});br((l=>{i=Yt("LCP"),r=Kt(e,i,lg,t.reportAllChanges),Ru((()=>{i.value=performance.now()-l.timeStamp,r(!0)}))}))}}))},dg=[800,1800],Uu=e=>{document.prerendering?ns((()=>Uu(e))):document.readyState!=="complete"?addEventListener("load",(()=>Uu(e)),!0):setTimeout(e)},X_=(e,t={})=>{let n=Yt("TTFB"),r=Kt(e,n,dg,t.reportAllChanges);Uu((()=>{const i=Pu();i&&(n.value=Math.max(i.responseStart-Ci(),0),n.entries=[i],r(!0),br((()=>{n=Yt("TTFB",0),r=Kt(e,n,dg,t.reportAllChanges),r(!0)})))}))};function Q_(e){var t,n=((t=e.entries[0])===null||t===void 0?void 0:t.startTime)||0;return performance.timeOrigin+n}function Ii(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(Q_(e)),navigationStart:Math.floor(performance.timeOrigin)}}var eC=function(){var e=null,t=Ae(),n=t==null?void 0:t.document,r=t==null?void 0:t.location,i=function(a,c){return M(void 0,void 0,void 0,function(){var u,l,d;return N(this,function(f){return u=function(h){var p;if(!h)return"";var g=h;try{g=decodeURI(h)}catch(m){(p=a.loggerProvider)===null||p===void 0||p.error("Malformed URI sequence: ",m)}return g},n===void 0?[2]:(l=u(r==null?void 0:r.href),d={"[Amplitude] Page Domain":(r==null?void 0:r.hostname)||"","[Amplitude] Page Location":l,"[Amplitude] Page Path":u(r==null?void 0:r.pathname),"[Amplitude] Page Title":typeof document<"u"&&document.title||"","[Amplitude] Page URL":l.split("?")[0]},Z_(function(h){d["[Amplitude] LCP"]=Ii(h)}),rg(function(h){d["[Amplitude] FCP"]=Ii(h)}),Y_(function(h){d["[Amplitude] INP"]=Ii(h)}),q_(function(h){d["[Amplitude] CLS"]=Ii(h)}),X_(function(h){d["[Amplitude] TTFB"]=Ii(h)}),e=function(){n.visibilityState==="hidden"&&e&&(c.track(H_,d),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e),[2])})})},o=function(a){return M(void 0,void 0,void 0,function(){return N(this,function(c){return[2,a]})})},s=function(){return M(void 0,void 0,void 0,function(){return N(this,function(a){return e&&(n==null||n.removeEventListener("visibilitychange",e)),[2]})})};return{name:z_,type:"enrichment",setup:i,execute:o,teardown:s}},fg=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},tC=function(e){return Object.values(e).every(function(t){return!t})},nC=function(e,t,n,r,i){i===void 0&&(i=!0),e.referrer;var o=e.referring_domain,s=Do(e,["referrer","referring_domain"]),a=t||{};a.referrer;var c=a.referring_domain,u=Do(a,["referrer","referring_domain"]);if(rC(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&tC(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var l=JSON.stringify(s)!==JSON.stringify(u),d=fg(o||"")!==fg(c||""),f=!t||l||d;return f?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),f},rC=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=""),e.some(function(n){return n instanceof RegExp?n.test(t):n===t})},iC=function(e,t){var n=U(U({},Uo),e),r=Object.entries(n).reduce(function(i,o){var s,a=$(o,2),c=a[0],u=a[1];return i.setOnce("initial_".concat(c),(s=u??t.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),u?i.set(c,u):i.unset(c)},new fi);return yp(r)},oC=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},sC=(function(){function e(t,n){var r;this.shouldTrackNewCampaign=!1,this.options=U({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:oC((r=n.cookieOptions)===null||r===void 0?void 0:r.domain)},t),this.storage=n.cookieStorage,this.storageKey=Ap(n.apiKey,"MKTG"),this.webExpStorageKey=Ap(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=Uo,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,n.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return M(this,void 0,void 0,function(){var t,n;return N(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:return n=$.apply(void 0,[r.sent(),2]),this.currentCampaign=n[0],this.previousCampaign=n[1],t=this.lastEventTime?Cp(this.sessionTimeout,this.lastEventTime):!0,nC(this.currentCampaign,this.previousCampaign,this.options,this.logger,t)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return M(this,void 0,void 0,function(){var t;return N(this,function(n){switch(n.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return t=n.sent(),t?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[4,Promise.all([t||new $p().parse(),this.storage.get(this.storageKey)])];case 4:return[2,n.sent()]}})})},e.prototype.generateCampaignEvent=function(t){this.shouldTrackNewCampaign=!1;var n=iC(this.currentCampaign,this.options);return t&&(n.event_id=t),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e})(),is="AMP_CURRENT_PAGE",os="AMP_PREVIOUS_PAGE",Er="AMP_URL_INFO",xi;(function(e){e.Direct="direct",e.Internal="internal",e.External="external"})(xi||(xi={}));var aC=new Set([Nt.IDENTIFY,Nt.GROUP_IDENTIFY,Nt.REVENUE]),cC=function(){var e=Ae(),t=void 0,n=!1,r=void 0,i=!1,o=!1,s=function(d){var f;try{var h=gi(d,r);f=new URL(h).hostname}catch(p){r==null||r.error("Could not parse URL: ",p)}return f},a=function(d){var f=typeof location<"u"&&location.hostname||"",h=d?s(d):void 0;switch(h){case void 0:return xi.Direct;case f:return xi.Internal;default:return xi.External}},c=function(){return M(void 0,void 0,void 0,function(){var d,f,h,p,g;return N(this,function(m){switch(m.label){case 0:return t&&n?[4,t.get(Er)]:[3,3];case 1:return d=m.sent(),f=gi(typeof location<"u"&&location.href||""),h=(d==null?void 0:d[is])||"",p=void 0,f===h?p=(d==null?void 0:d[os])||"":h?p=h:p=document.referrer||"",[4,t.set(Er,(g={},g[is]=f,g[os]=p,g))];case 2:m.sent(),m.label=3;case 3:return[2]}})})},u=function(){c()},l={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(d,f){return M(void 0,void 0,void 0,function(){return N(this,function(h){switch(h.label){case 0:return r=d.loggerProvider,r.log("Installing @amplitude/plugin-page-url-enrichment-browser"),o=!0,e?(t=new eu(e.sessionStorage),[4,t.isEnabled()]):[3,2];case 1:n=h.sent(),e.addEventListener("popstate",u),i||(e.history.pushState=new Proxy(e.history.pushState,{apply:function(p,g,m){var v=$(m,3),y=v[0],b=v[1],w=v[2];p.apply(g,[y,b,w]),o&&u()}}),e.history.replaceState=new Proxy(e.history.replaceState,{apply:function(p,g,m){var v=$(m,3),y=v[0],b=v[1],w=v[2];p.apply(g,[y,b,w]),o&&u()}}),i=!0),h.label=2;case 2:return[2]}})})},execute:function(d){return M(void 0,void 0,void 0,function(){var f,h,p,g,m;return N(this,function(v){switch(v.label){case 0:return f=gi(typeof location<"u"&&location.href||""),t&&n?[4,t.get(Er)]:[3,5];case 1:return h=v.sent(),h!=null&&h[is]?[3,3]:[4,t.set(Er,(m={},m[is]=f,m[os]=document.referrer||"",m))];case 2:v.sent(),v.label=3;case 3:return[4,t.get(Er)];case 4:if(p=v.sent(),g="",p&&(g=p[os]||""),aC.has(d.event_type))return[2,d];d.event_properties=U(U({},d.event_properties||{}),{"[Amplitude] Page Domain":Ai(d,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":Ai(d,"[Amplitude] Page Location",f),"[Amplitude] Page Path":Ai(d,"[Amplitude] Page Path",typeof location<"u"&&gi(location.pathname)||""),"[Amplitude] Page Title":Ai(d,"[Amplitude] Page Title",su(ou)),"[Amplitude] Page URL":Ai(d,"[Amplitude] Page URL",f.split("?")[0]),"[Amplitude] Previous Page Location":g,"[Amplitude] Previous Page Type":a(g)}),v.label=5;case 5:return[2,d]}})})},teardown:function(){return M(void 0,void 0,void 0,function(){return N(this,function(d){switch(d.label){case 0:return e&&(e.removeEventListener("popstate",u),o=!1),t&&n?[4,t.set(Er,{})]:[3,2];case 1:d.sent(),d.label=2;case 2:return[2]}})})}};return l};function Ai(e,t,n){return e.event_properties||(e.event_properties={}),e.event_properties[t]===void 0?n:e.event_properties[t]}var uC=(function(e){nt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._diagnosticsSampleRate=0,n}return t.prototype.init=function(n,r,i){n===void 0&&(n="");var o,s;return arguments.length>2?(o=r,s=i):typeof r=="string"?(o=r,s=void 0):(o=r==null?void 0:r.userId,s=r),at(this._init(U(U({},s),{userId:o,apiKey:n})))},t.prototype._init=function(n){var r,i,o,s,a;return M(this,void 0,void 0,function(){var c,u,l,d,f,h,p,g,m,v=this;return N(this,function(y){switch(y.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,gE(n.apiKey,n,this)]);case 1:return c=y.sent(),!((r=c.remoteConfig)===null||r===void 0)&&r.fetchRemoteConfig?(u=new ww(c.apiKey,c.loggerProvider,c.serverZone,(i=c.remoteConfig)===null||i===void 0?void 0:i.serverUrl),[4,new Promise(function(b){u==null||u.subscribe("configs.analyticsSDK.browserSDK","all",function(w,C,_){c.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:w,source:C,lastFetch:_},null,2)),w&&AE(w,c),b()})})]):[3,3];case 2:y.sent(),y.label=3;case 3:return l=new pw(c.apiKey,c.loggerProvider,c.serverZone,{enabled:c.enableDiagnostics,sampleRate:c.diagnosticsSampleRate||this._diagnosticsSampleRate}),l.setTag("library","".concat(Gp,"/").concat(uu)),[4,e.prototype._init.call(this,c)];case 4:return y.sent(),this.logBrowserOptions(c),this.config.diagnosticsClient=l,this.config.remoteConfigClient=u,Vp(this.config.defaultTracking)?(d=Zw(this.config),this.webAttribution=new sC(d,this.config),[4,this.webAttribution.init()]):[3,6];case 5:y.sent(),y.label=6;case 6:return f=qo(),h=f.ampTimestamp?Number(f.ampTimestamp):void 0,p=h?Date.now()<h:!0,this.config.identify&&this.identify(this.config.identify),g=p&&!Number.isNaN(Number(f.ampSessionId))?Number(f.ampSessionId):void 0,this.setSessionId((a=(s=(o=n.sessionId)!==null&&o!==void 0?o:g)!==null&&s!==void 0?s:this.config.sessionId)!==null&&a!==void 0?a:Date.now()),m=hi(n.instanceName),m.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Ew?[3,8]:[4,this.add(xE()).promise];case 7:y.sent(),y.label=8;case 8:return[4,this.add(new j2({diagnosticsClient:l})).promise];case 9:return y.sent(),[4,this.add(new eE).promise];case 10:return y.sent(),[4,this.add(new tw).promise];case 11:return y.sent(),IE(this.config),Hw(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(TE()).promise]):[3,13];case 12:y.sent(),y.label=13;case 13:return jw(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(CE()).promise]):[3,15];case 14:y.sent(),y.label=15;case 15:return zp(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(wE(Jw(this.config))).promise]):[3,17];case 16:y.sent(),y.label=17;case 17:return qp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(k_(Gw(this.config),{diagnosticsClient:l})).promise]):[3,19];case 18:y.sent(),y.label=19;case 19:return Wp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(N_(Kw(this.config))).promise]):[3,21];case 20:y.sent(),y.label=21;case 21:return jp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(V_(Yw(this.config))).promise]):[3,23];case 22:y.sent(),y.label=23;case 23:return Ww(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(eC()).promise]):[3,25];case 24:y.sent(),y.label=25;case 25:return qw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(cC()).promise]):[3,27];case 26:y.sent(),y.label=27;case 27:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 28:return y.sent(),m.eventBridge.setEventReceiver(function(b){var w=b.eventProperties||{},C=w.time,_=Do(w,["time"]),E=typeof C=="number"?{time:C}:void 0;v.track(b.eventType,_,E)}),[2]}})})},t.prototype.getUserId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.userId},t.prototype.setUserId=function(n){if(!this.config){this.q.push(this.setUserId.bind(this,n));return}this.config.loggerProvider.debug("function setUserId: ",n),(n!==this.config.userId||n===void 0)&&(this.config.userId=n,this.timeline.onIdentityChanged({userId:n}),Q2(n,this.config.instanceName))},t.prototype.getDeviceId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.deviceId},t.prototype.setDeviceId=function(n){if(!this.config){this.q.push(this.setDeviceId.bind(this,n));return}this.config.loggerProvider.debug("function setDeviceId: ",n),n!==this.config.deviceId&&(this.config.deviceId=n,this.timeline.onIdentityChanged({deviceId:n}),ew(n,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(En()),this.setUserId(void 0)},t.prototype.getIdentity=function(){var n,r;return{deviceId:(n=this.config)===null||n===void 0?void 0:n.deviceId,userId:(r=this.config)===null||r===void 0?void 0:r.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.optOut},t.prototype.getSessionId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.sessionId},t.prototype.setSessionId=function(n){var r,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,n)),at(Promise.resolve());if(n===this.config.sessionId)return at(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",n);var o=this.getSessionId();o!==n&&this.timeline.onSessionIdChanged(n);var s=this.config.lastEventTime,a=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1;this.config.sessionId=n,this.config.lastEventTime=void 0,this.config.pageCounter=0,Hp(this.config.defaultTracking)&&(o&&s&&i.push(this.track(Zp,void 0,{device_id:this.previousSessionDeviceId,event_id:++a,session_id:o,time:s+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var c=this.trackCampaignEventIfNeeded(++a,i);return Hp(this.config.defaultTracking)&&i.push(this.track(Jp,void 0,{event_id:c?++a:a,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,at(Promise.all(i))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(n){if(!this.config){this.q.push(this.setTransport.bind(this,n));return}this.config.transportProvider=Xp(n)},t.prototype.identify=function(n,r){if(cu(n)){var i=n._q;n._q=[],n=au(new fi,i)}return r!=null&&r.user_id&&this.setUserId(r.user_id),r!=null&&r.device_id&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,n,r)},t.prototype.groupIdentify=function(n,r,i,o){if(cu(i)){var s=i._q;i._q=[],i=au(new fi,s)}return e.prototype.groupIdentify.call(this,n,r,i,o)},t.prototype.revenue=function(n,r){if(cu(n)){var i=n._q;n._q=[],n=au(new F2,i)}return e.prototype.revenue.call(this,n,r)},t.prototype.trackCampaignEventIfNeeded=function(n,r){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var i=this.webAttribution.generateCampaignEvent(n);return r?r.push(this.track(i).promise):this.track(i),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(n){return M(this,void 0,void 0,function(){var r,i,o;return N(this,function(s){return r=Date.now(),i=Cp(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),n.event_type!==Jp&&n.event_type!==Zp&&(!n.session_id||n.session_id===this.getSessionId())&&(i||o?(this.setSessionId(r),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):i||this.trackCampaignEventIfNeeded()),n.event_type===Nt.IDENTIFY&&n.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(n.user_properties)),[2,e.prototype.process.call(this,n)]})})},t.prototype.logBrowserOptions=function(n){try{var r=U(U({},n),{apiKey:n.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(r))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},t.prototype._setDiagnosticsSampleRate=function(n){if(!(n>1||n<0)&&!this.config){this._diagnosticsSampleRate=n;return}},t})(D2),pg=function(){var e=new uC;return{init:xe(e.init.bind(e),"init",Te(e),Ie(e,["config"])),add:xe(e.add.bind(e),"add",Te(e),Ie(e,["config.apiKey","timeline.plugins"])),remove:xe(e.remove.bind(e),"remove",Te(e),Ie(e,["config.apiKey","timeline.plugins"])),track:xe(e.track.bind(e),"track",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),logEvent:xe(e.logEvent.bind(e),"logEvent",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),identify:xe(e.identify.bind(e),"identify",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),groupIdentify:xe(e.groupIdentify.bind(e),"groupIdentify",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),setGroup:xe(e.setGroup.bind(e),"setGroup",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),revenue:xe(e.revenue.bind(e),"revenue",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),flush:xe(e.flush.bind(e),"flush",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),getUserId:xe(e.getUserId.bind(e),"getUserId",Te(e),Ie(e,["config","config.userId"])),setUserId:xe(e.setUserId.bind(e),"setUserId",Te(e),Ie(e,["config","config.userId"])),getDeviceId:xe(e.getDeviceId.bind(e),"getDeviceId",Te(e),Ie(e,["config","config.deviceId"])),setDeviceId:xe(e.setDeviceId.bind(e),"setDeviceId",Te(e),Ie(e,["config","config.deviceId"])),reset:xe(e.reset.bind(e),"reset",Te(e),Ie(e,["config","config.userId","config.deviceId"])),getSessionId:xe(e.getSessionId.bind(e),"getSessionId",Te(e),Ie(e,["config"])),setSessionId:xe(e.setSessionId.bind(e),"setSessionId",Te(e),Ie(e,["config"])),extendSession:xe(e.extendSession.bind(e),"extendSession",Te(e),Ie(e,["config"])),setOptOut:xe(e.setOptOut.bind(e),"setOptOut",Te(e),Ie(e,["config"])),setTransport:xe(e.setTransport.bind(e),"setTransport",Te(e),Ie(e,["config"])),getIdentity:xe(e.getIdentity.bind(e),"getIdentity",Te(e),Ie(e,["config"])),getOptOut:xe(e.getOptOut.bind(e),"getOptOut",Te(e),Ie(e,["config"])),_setDiagnosticsSampleRate:xe(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",Te(e),Ie(e,["config"]))}};pg();const Bu={production:"be237974d6ba66e5ed3bbf56ac4b6e48",development:"000e3bbcc2c10d22df926468ee9aef91"},lC={plan:{version:"168",branch:"main",source:"checkout-library",versionId:"6c9f59d1-26b3-4926-a2f0-d7d68292d669"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}};class hg{constructor(t){S(this,"event_type","AstroPay Payment Card Clicked");this.event_properties=t,this.event_properties=t}}class gg{constructor(t){S(this,"event_type","AstroPay Payment Clicked");this.event_properties=t,this.event_properties=t}}class mg{constructor(t){S(this,"event_type","AstroPay Payment Impression");this.event_properties=t,this.event_properties=t}}class vg{constructor(t){S(this,"event_type","AstroPay Payment Link Copied");this.event_properties=t,this.event_properties=t}}class yg{constructor(t){S(this,"event_type","AstroPay Payment Phone Number Entered");this.event_properties=t,this.event_properties=t}}class bg{constructor(t){S(this,"event_type","AstroPay Payment Started");this.event_properties=t,this.event_properties=t}}class wg{constructor(t){S(this,"event_type","AstroPay Payment User Identified");this.event_properties=t,this.event_properties=t}}const ki=()=>({promise:Promise.resolve()});class dC{constructor(){S(this,"disabled",!1);S(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return this.amplitude!=null}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(t){if(this.disabled=t.disabled??!1,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),ki();let n=null;if(t.client&&"apiKey"in t.client?n=t.client.apiKey:"environment"in t&&(n=Bu[t.environment]),t.client&&"instance"in t.client)this.amplitude=t.client.instance;else if(n){this.amplitude=pg();const r=t.client&&"configuration"in t.client?t.client.configuration:{};return this.amplitude.init(n,void 0,{...lC,...r})}else console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'");return ki()}identify(t,n,r){if(!this.isInitializedAndEnabled())return ki();t&&(r={...r,user_id:t});const i=new fi,o=n;if(o!=null)for(const[s,a]of Object.entries(o))i.set(s,a);return this.amplitude.identify(i,r)}flush(){return this.isInitializedAndEnabled()?this.amplitude.flush():ki()}track(t,n){return this.isInitializedAndEnabled()?this.amplitude.track(t,void 0,n):ki()}astroPayPaymentCardClicked(t,n){return this.track(new hg(t),n)}astroPayPaymentClicked(t,n){return this.track(new gg(t),n)}astroPayPaymentImpression(t,n){return this.track(new mg(t),n)}astroPayPaymentLinkCopied(t,n){return this.track(new vg(t),n)}astroPayPaymentPhoneNumberEntered(t,n){return this.track(new yg(t),n)}astroPayPaymentStarted(t,n){return this.track(new bg(t),n)}astroPayPaymentUserIdentified(t,n){return this.track(new wg(t),n)}}const ss=new dC;class Ri{}S(Ri,"init",()=>{const n=Ye.getEnvironment()==="production";ss.load({environment:n?"production":"development",client:{apiKey:n?Bu.production:Bu.development}})}),S(Ri,"trackEvent",(t,n,r)=>{typeof t=="string"?ss.client.track(t,n,r):ss.track(t)}),S(Ri,"cleanData",()=>{ss.client.reset()});const as={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},un=console,Sr={};Object.keys(as).forEach(e=>{Sr[e]=un[e]});const Pi="Datadog Browser SDK:",se={debug:Sr.debug.bind(un,Pi),log:Sr.log.bind(un,Pi),info:Sr.info.bind(un,Pi),warn:Sr.warn.bind(un,Pi),error:Sr.error.bind(un,Pi)},cs="https://docs.datadoghq.com",fC=`${cs}/real_user_monitoring/browser/troubleshooting`,$u="More details:";function Eg(e,t){return(...n)=>{try{return e(...n)}catch(r){se.error(t,r)}}}function Tn(e){return e!==0&&Math.random()*100<=e}function us(e,t){return+e.toFixed(t)}function pC(e){return Oi(e)&&e>=0&&e<=100}function Oi(e){return typeof e=="number"}const Qe=1e3,ct=60*Qe,Sg=60*ct,_g=365*(24*Sg);function ls(e){return{relative:e,timeStamp:gC(e)}}function hC(e){return{relative:Vu(e),timeStamp:e}}function gC(e){const t=kt()-performance.now();return t>Li()?Math.round(_r(t,e)):vC(e)}function mC(){return Math.round(kt()-_r(Li(),performance.now()))}function G(e){return Oi(e)?us(e*1e6,0):e}function kt(){return new Date().getTime()}function Fe(){return kt()}function Rt(){return performance.now()}function rt(){return{relative:Rt(),timeStamp:Fe()}}function Cg(){return{relative:0,timeStamp:Li()}}function He(e,t){return t-e}function _r(e,t){return e+t}function Vu(e){return e-Li()}function vC(e){return Math.round(_r(Li(),e))}function yC(e){return e<_g}let zu;function Li(){return zu===void 0&&(zu=performance.timing.navigationStart),zu}const Ni=1024,Tg=1024*Ni,bC=/[^\u0000-\u007F]/;function Ig(e){return bC.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function wC(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Mi(e){return{...e}}function ds(e,t){return Object.keys(e).some(n=>e[n]===t)}function $n(e){return Object.keys(e).length===0}function EC(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function Jt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function In(e,t){const n=Jt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let Hu,xg=!1;function SC(e){Hu=e}function _C(e){xg=e}function Y(e){return function(){return Vn(e,this,arguments)}}function Vn(e,t,n){try{return e.apply(t,n)}catch(r){ln(r)}}function ln(e){if(ju(e),Hu)try{Hu(e)}catch(t){ju(t)}}function ju(...e){xg&&se.error("[MONITOR]",...e)}function Ue(e,t){return In(Jt(),"setTimeout")(Y(e),t)}function ut(e){In(Jt(),"clearTimeout")(e)}function Cr(e,t){return In(Jt(),"setInterval")(Y(e),t)}function fs(e){In(Jt(),"clearInterval")(e)}class ge{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(t){this.observers.forEach(n=>n(t))}}function Ag(...e){return new ge(t=>{const n=e.map(r=>r.subscribe(i=>t.notify(i)));return()=>n.forEach(r=>r.unsubscribe())})}function xn(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0;let o=!1,s,a;return{throttled:(...c)=>{if(o){s=c;return}r?e(...c):s=c,o=!0,a=Ue(()=>{i&&s&&e(...s),o=!1,s=void 0},t)},cancel:()=>{ut(a),o=!1,s=void 0}}}function ae(){}function je(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,je)}const ps=/([\w-]+)\s*=\s*([^;]+)/g;function Di(e,t){for(ps.lastIndex=0;;){const n=ps.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function CC(e){const t=new Map;for(ps.lastIndex=0;;){const n=ps.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function kg(e,t,n=""){const r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${n}`}function TC(){return Rg()===0}function IC(){return Rg()===1}let hs;function Rg(){return hs??(hs=xC())}function xC(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Fi(e,t,n=0,r){const i=new Date;i.setTime(i.getTime()+n);const o=`expires=${i.toUTCString()}`,s=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${s}${a}${c}${u}`}function qu(e){return Di(document.cookie,e)}let Wu;function An(e){return Wu||(Wu=CC(document.cookie)),Wu.get(e)}function Pg(e,t){Fi(e,"",0,t)}function AC(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${je()}`,n="test";Fi(t,n,ct,e);const r=qu(t)===n;return Pg(t,e),r}catch(t){return se.error(t),!1}}let Gu;function kC(){if(Gu===void 0){const e=`dd_site_test_${je()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!qu(e);)r=`${n.pop()}.${r}`,Fi(e,t,Qe,{domain:r});Pg(e,{domain:r}),Gu=r}return Gu}const Tr="_dd_s";function RC(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function Og(e){return Object.values(e)}function Ku(e){return Object.entries(e)}const zn=4*Sg,Lg=15*ct,PC=_g,Ui={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Ng=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Yu="&";function OC(e){return!!e&&(e.indexOf(Yu)!==-1||Ng.test(e))}const LC="1";function Hn(e,t){const n={isExpired:LC};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=je()),n}function gs(e){return $n(e)}function Mg(e){return!gs(e)}function ms(e){return e.isExpired!==void 0||!NC(e)}function NC(e){return(e.created===void 0||kt()-Number(e.created)<zn)&&(e.expire===void 0||kt()<Number(e.expire))}function Dg(e){e.expire=String(kt()+Lg)}function Ju(e){return Ku(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Yu)}function Fg(e){const t={};return OC(e)&&e.split(Yu).forEach(n=>{const r=Ng.exec(n);if(r!==null){const[,i,o]=r;i==="aid"?t.anonymousId=o:t[i]=o}}),t}const MC="_dd",DC="_dd_r",FC="_dd_l",UC="rum",BC="logs";function $C(e){if(!An(Tr)){const n=An(MC),r=An(DC),i=An(FC),o={};n&&(o.id=n),i&&/^[01]$/.test(i)&&(o[BC]=i),r&&/^[012]$/.test(r)&&(o[UC]=r),Mg(o)&&(Dg(o),e.persistSession(o))}}function Ug(e){const t=qC(e);return AC(t)?{type:Ui.COOKIE,cookieOptions:t}:void 0}function VC(e,t){const n={isLockEnabled:TC(),persistSession:zC(t),retrieveSession:jC,expireSession:r=>HC(t,r,e)};return $C(n),n}function zC(e){return t=>{Fi(Tr,Ju(t),Lg,e)}}function HC(e,t,n){const r=Hn(t,n);Fi(Tr,Ju(r),n.trackAnonymousUser?PC:zn,e)}function jC(){const e=qu(Tr);return Fg(e)}function qC(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=kC()),t}const WC="_dd_test_";function Bg(){try{const e=je(),t=`${WC}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Ui.LOCAL_STORAGE}:void 0}catch{return}}function GC(e){return{isLockEnabled:!1,persistSession:$g,retrieveSession:KC,expireSession:t=>YC(t,e)}}function $g(e){localStorage.setItem(Tr,Ju(e))}function KC(){const e=localStorage.getItem(Tr);return Fg(e)}function YC(e,t){$g(Hn(e,t))}const JC=10,ZC=100,Vg=[];let vs;function jn(e,t,n=0){var r;const{isLockEnabled:i,persistSession:o,expireSession:s}=t,a=f=>o({...f,lock:u}),c=()=>{const f=t.retrieveSession(),h=f.lock;return f.lock&&delete f.lock,{session:f,lock:h}};if(vs||(vs=e),e!==vs){Vg.push(e);return}if(i&&n>=ZC){zg(t);return}let u,l=c();if(i){if(l.lock){ys(e,t,n);return}if(u=je(),a(l.session),l=c(),l.lock!==u){ys(e,t,n);return}}let d=e.process(l.session);if(i&&(l=c(),l.lock!==u)){ys(e,t,n);return}if(d&&(ms(d)?s(d):(Dg(d),i?a(d):o(d))),i&&!(d&&ms(d))){if(l=c(),l.lock!==u){ys(e,t,n);return}o(l.session),d=l.session}(r=e.after)===null||r===void 0||r.call(e,d||l.session),zg(t)}function ys(e,t,n){Ue(()=>{jn(e,t,n+1)},JC)}function zg(e){vs=void 0;const t=Vg.shift();t&&jn(t,e)}const Hg=Qe;function XC(e){switch(e.sessionPersistence){case Ui.COOKIE:return Ug(e);case Ui.LOCAL_STORAGE:return Bg();case void 0:{let t=Ug(e);return!t&&e.allowFallbackToLocalStorage&&(t=Bg()),t}default:se.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function QC(e,t,n,r){const i=new ge,o=new ge,s=new ge,a=e.type===Ui.COOKIE?VC(t,e.cookieOptions):GC(t),{expireSession:c}=a,u=Cr(p,Hg);let l;m();const{throttled:d,cancel:f}=xn(()=>{jn({process:E=>{if(gs(E))return;const P=g(E);return v(P),P},after:E=>{Mg(E)&&!y()&&C(E),l=E}},a)},Hg);function h(){jn({process:E=>y()?g(E):void 0},a)}function p(){jn({process:E=>ms(E)?Hn(E,t):void 0,after:g},a)}function g(E){return ms(E)&&(E=Hn(E,t)),y()&&(b(E)?w():(s.notify({previousState:l,newState:E}),l=E)),E}function m(){jn({process:E=>{if(gs(E))return Hn(E,t)},after:E=>{l=E}},a)}function v(E){if(gs(E))return!1;const{trackingType:P,isTracked:T}=r(E[n]);E[n]=P,delete E.isExpired,T&&!E.id&&(E.id=je(),E.created=String(kt()))}function y(){return l[n]!==void 0}function b(E){return l.id!==E.id||l[n]!==E[n]}function w(){l=Hn(l,t),o.notify()}function C(E){l=E,i.notify()}function _(E){jn({process:P=>({...P,...E}),after:g},a)}return{expandOrRenewSession:d,expandSession:h,getSession:()=>l,renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s,restartSession:m,expire:()=>{f(),c(l),g(Hn(l,t))},stop:()=>{fs(u)},updateSessionState:_}}const Zu={GRANTED:"granted",NOT_GRANTED:"not-granted"};function eT(e){const t=new ge;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Zu.GRANTED},observable:t}}function Ir(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=xr(Object.prototype),i=xr(Array.prototype),o=xr(Object.getPrototypeOf(e)),s=xr(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),i(),o(),s()}}function xr(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):ae}function Xu(e){return bs(e,location.href).href}function tT(e){try{return!!bs(e)}catch{return!1}}function nT(e){const t=bs(e).pathname;return t[0]==="/"?t:`/${t}`}function bs(e,t){const n=rT();if(n)try{return t!==void 0?new n(e,t):new n(e)}catch(o){throw new Error(`Failed to construct URL: ${String(o)} ${Ir({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw new Error(`Invalid URL: '${e}'`);let r=document;const i=r.createElement("a");if(t!==void 0){r=document.implementation.createHTMLDocument("");const o=r.createElement("base");o.href=t,r.head.appendChild(o),r.body.appendChild(i)}return i.href=e,i}const jg=URL;let ws;function rT(){if(ws===void 0)try{ws=new jg("http://test/path").href==="http://test/path"}catch{ws=!1}return ws?jg:void 0}const qg="datad0g.com",iT="dd0g-gov.com",qn="datadoghq.com",oT="datadoghq.eu",sT="ddog-gov.com",aT="pci.browser-intake-datadoghq.com",cT=["ddsource","ddtags"];function Ar(e,t,n){const r=uT(e,t);return{build(i,o){const s=lT(e,t,n,i,o);return r(s)},tags:n,urlPrefix:r(""),trackType:t}}function uT(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const o=Xu(r);return s=>`${o}?ddforward=${encodeURIComponent(`${n}?${s}`)}`}if(typeof r=="function")return o=>r({path:n,parameters:o});const i=Wg(t,e);return o=>`https://${i}${n}?${o}`}function Wg(e,t){const{site:n=qn,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===qn)return aT;if(r&&n===qn)return`${r}.${qn}`;if(n===iT)return`http-intake.logs.${n}`;const i=n.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}function lT({clientToken:e,internalAnalyticsSubdomain:t},n,r,i,{retry:o,encoding:s}){const a=["sdk_version:6.6.3",`api:${i}`].concat(r);o&&a.push(`retry_count:${o.count}`,`retry_after:${o.lastFailureStatus}`);const c=["ddsource=browser",`ddtags=${encodeURIComponent(a.join(","))}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${je()}`];return s&&c.push(`dd-evp-encoding=${s}`),n==="rum"&&c.push(`batch_time=${Fe()}`),t&&c.reverse(),c.join("&")}const dT=200;function fT(e){const{env:t,service:n,version:r,datacenter:i}=e,o=[];return t&&o.push(Es("env",t)),n&&o.push(Es("service",n)),r&&o.push(Es("version",r)),i&&o.push(Es("datacenter",i)),o}function Es(e,t){const n=dT-e.length-1;(t.length>n||pT(t))&&se.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${$u} ${cs}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function pT(e){return hT()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function hT(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function gT(e){const t=e.site||qn,n=fT(e),r=mT(e,n);return{replica:vT(e,n),site:t,...r}}function mT(e,t){return{logsEndpointBuilder:Ar(e,"logs",t),rumEndpointBuilder:Ar(e,"rum",t),profilingEndpointBuilder:Ar(e,"profile",t),sessionReplayEndpointBuilder:Ar(e,"replay",t)}}function vT(e,t){if(!e.replica)return;const n={...e,site:qn,clientToken:e.replica.clientToken},r={logsEndpointBuilder:Ar(n,"logs",t),rumEndpointBuilder:Ar(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function yT(e){return cT.every(t=>e.includes(t))}const Bi={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Qu={ALL:"all",SAMPLED:"sampled"};function el(e,t){return e!=null&&typeof e!="string"?(se.error(`${t} must be defined as a string`),!1):!0}function bT(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(se.error(`Site should be a valid Datadog site. ${$u} ${cs}/getting_started/site/.`),!1):!0}function kr(e,t){return e!==void 0&&!pC(e)?(se.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function wT(e){var t,n,r,i,o,s;if(!e||!e.clientToken){se.error("Client Token is not configured, we will not send any data.");return}if(!(!bT(e.site)||!kr(e.sessionSampleRate,"Session")||!kr(e.telemetrySampleRate,"Telemetry")||!kr(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!kr(e.telemetryUsageSampleRate,"Telemetry Usage")||!el(e.version,"Version")||!el(e.env,"Env")||!el(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ds(Zu,e.trackingConsent)){se.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Eg(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:XC(e),sessionSampleRate:(t=e.sessionSampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(r=e.telemetryConfigurationSampleRate)!==null&&r!==void 0?r:5,telemetryUsageSampleRate:(i=e.telemetryUsageSampleRate)!==null&&i!==void 0?i:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(o=e.trackingConsent)!==null&&o!==void 0?o:Zu.GRANTED,trackAnonymousUser:(s=e.trackAnonymousUser)!==null&&s!==void 0?s:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Ni,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Qe,batchMessagesLimit:50,messageBytesLimit:256*Ni,...gT(e)}}}function ET(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent}}var Wn;(function(e){e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",e.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",e.PROFILING="profiling"})(Wn||(Wn={}));const tl=new Set;function ST(e){Array.isArray(e)&&_T(e.filter(t=>ds(Wn,t)))}function _T(e){e.forEach(t=>{tl.add(t)})}function Ss(e){return tl.has(e)}function CT(){return tl}const $i="?";function kn(e){const t=[];let n=nl(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
553
|
+
`).forEach(i=>{const o=xT(i)||kT(i)||PT(i)||NT(i);o&&(!o.func&&o.line&&(o.func=$i),t.push(o))}),{message:nl(e,"message"),name:nl(e,"name"),stack:t}}const Gg="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Rr="(?::(\\d+))",TT=new RegExp(`^\\s*at (.*?) ?\\(${Gg}${Rr}?${Rr}?\\)?\\s*$`,"i"),IT=new RegExp(`\\((\\S*)${Rr}${Rr}\\)`);function xT(e){const t=TT.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,i=IT.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||$i,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const AT=new RegExp(`^\\s*at ?${Gg}${Rr}?${Rr}??\\s*$`,"i");function kT(e){const t=AT.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:$i,line:t[2]?+t[2]:void 0,url:t[1]}}const RT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function PT(e){const t=RT.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||$i,line:+t[3],url:t[2]}}const OT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,LT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function NT(e){const t=OT.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=LT.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||$i,line:t[4]?+t[4]:void 0,url:t[3]}}function nl(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function MT(e,t,n,r){const i=[{url:t,column:r,line:n}],{name:o,message:s}=FT(e);return{name:o,message:s,stack:i}}const DT=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function FT(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=DT.exec(e)),{name:t,message:n}}function _s(e){const n=new Error(e);n.name="HandlingStack";let r;return Vn(()=>{const i=kn(n);i.stack=i.stack.slice(2),r=Pr(i)}),r}function Pr(e){let t=Kg(e);return e.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,i=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",o=n.line?`:${n.line}`:"",s=n.line&&n.column?`:${n.column}`:"";t+=`
|
|
554
|
+
at ${r}${i} @ ${n.url}${o}${s}`}),t}function Kg(e){return`${e.name||"Error"}: ${e.message}`}function lt(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!="function")if(t in e&&t.startsWith("on"))i=ae;else return{stop:ae};let o=!1;const s=function(){if(o)return i.apply(this,arguments);const a=Array.from(arguments);let c;Vn(n,null,[{target:this,parameters:a,onPostCall:l=>{c=l},handlingStack:r?_s("instrumented method"):void 0}]);const u=i.apply(this,a);return c&&Vn(c,null,[u]),u};return e[t]=s,{stop:()=>{o=!0,e[t]===s&&(e[t]=i)}}}function Vi(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:ae};const i=ae;let o=(a,c)=>{Ue(()=>{o!==i&&n(a,c)},0)};const s=function(a){r.set.call(this,a),o(this,a)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===s&&Object.defineProperty(e,t,r),o=i}}}const UT=220*Ni,BT="$",$T=3;function ke(e,t=UT){const n=xr(Object.prototype),r=xr(Array.prototype),i=[],o=new WeakMap,s=rl(e,BT,void 0,i,o),a=JSON.stringify(s);let c=a?a.length:0;if(c>t){ol(t,"discarded",e);return}for(;i.length>0&&c<t;){const u=i.shift();let l=0;if(Array.isArray(u.source))for(let d=0;d<u.source.length;d++){const f=rl(u.source[d],u.path,d,i,o);if(f!==void 0?c+=JSON.stringify(f).length:c+=4,c+=l,l=1,c>t){ol(t,"truncated",e);break}u.target[d]=f}else for(const d in u.source)if(Object.prototype.hasOwnProperty.call(u.source,d)){const f=rl(u.source[d],u.path,d,i,o);if(f!==void 0&&(c+=JSON.stringify(f).length+l+d.length+$T,l=1),c>t){ol(t,"truncated",e);break}u.target[d]=f}}return n(),r(),s}function rl(e,t,n,r,i){const o=HT(e);if(!o||typeof o!="object")return VT(o);const s=il(o);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const a=e;if(i.has(a))return`[Reference seen at ${i.get(a)}]`;const c=n!==void 0?`${t}.${n}`:t,u=Array.isArray(o)?[]:{};return i.set(a,c),r.push({source:o,target:u,path:c}),u}function VT(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function il(e){try{if(e instanceof Event)return zT(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function zT(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?il(e.currentTarget):null,target:e.target?il(e.target):null}}function HT(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function ol(e,t,n){se.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const Yg="No stack, consider using an instance of Error";function Jg({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:o,source:s,handling:a}){const c=Rn(t),u=jT(e,c,o,t),l=qT(c,e)?Pr(e):Yg,d=c?Qg(t,s):void 0,f=e?e.name:void 0,h=Zg(t),p=Xg(t);return{startClocks:i,source:s,handling:a,handlingStack:n,componentStack:r,originalError:t,type:f,message:u,stack:l,causes:d,fingerprint:h,context:p}}function jT(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${Ir(ke(r))}`}function qT(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function Zg(e){return Rn(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function Xg(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function Rn(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function Qg(e,t){let n=e;const r=[];for(;Rn(n==null?void 0:n.cause)&&r.length<10;){const i=kn(n.cause);r.push({message:n.cause.message,source:t,type:i==null?void 0:i.name,stack:i&&Pr(i)}),n=n.cause}return r.length?r:void 0}const Or={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function WT(e){const t=(i,o)=>{const s=Jg({stackTrace:i,originalError:o,startClocks:rt(),nonErrorPrefix:"Uncaught",source:Or.SOURCE,handling:"unhandled"});e.notify(s)},{stop:n}=GT(t),{stop:r}=KT(t);return{stop:()=>{n(),r()}}}function GT(e){return lt(window,"onerror",({parameters:[t,n,r,i,o]})=>{let s;Rn(o)?s=kn(o):s=MT(t,n,r,i),e(s,o??t)})}function KT(e){return lt(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=kn(n);e(r,n)})}function YT(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return _C},enumerable:!1}),t}function JT(e,t,n){const r=e[t];r&&!r.q&&r.version&&se.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(i=>Eg(i,"onReady callback threw an error:")())}function em(e,t){t.silentMultipleInit||se.error(`${e} is already initialized.`)}function Se(e,t,n,r,i){return dt(e,t,[n],r,i)}function dt(e,t,n,r,{once:i,capture:o,passive:s}={}){const a=Y(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(i&&d(),r(f))}),c=s?{capture:o,passive:s}:o,u=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=In(u,"addEventListener");n.forEach(f=>l.call(t,f,a,c));function d(){const f=In(u,"removeEventListener");n.forEach(h=>f.call(t,h,a,c))}return{stop:d}}const zi={intervention:"intervention",cspViolation:"csp_violation"};function ZT(e,t){const n=[];t.includes(zi.cspViolation)&&n.push(QT(e));const r=t.filter(i=>i!==zi.cspViolation);return r.length&&n.push(XT(r)),Ag(...n)}function XT(e){return new ge(t=>{if(!window.ReportingObserver)return;const n=Y((i,o)=>i.forEach(s=>t.notify(eI(s)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function QT(e){return new ge(t=>{const{stop:n}=Se(e,document,"securitypolicyviolation",r=>{t.notify(tI(r))});return n})}function eI(e){const{type:t,body:n}=e;return tm({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:nm(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function tI(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return tm({type:e.effectiveDirective,message:`${zi.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:nm(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${kg(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function tm(e){return{startClocks:rt(),source:Or.REPORT,handling:"unhandled",...e}}function nm(e,t,n,r,i){return n?Pr({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:i??void 0}]}):void 0}function sl(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function Gn(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Cs(e,t,n=nI()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const i=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,i)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const i=Array.isArray(e)?e:[];for(let o=0;o<t.length;++o)i[o]=Cs(i[o],t[o],n);return i}const r=Gn(e)==="object"?e:{};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Cs(r[i],t[i],n));return r}function al(e){return Cs(void 0,e)}function Dt(...e){let t;for(const n of e)n!=null&&(t=Cs(t,n));return t}function nI(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function rm(){var e;const t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function im(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const rI=500;function om(){const e=[];return{add:i=>{e.push(i)>rI&&e.splice(0,1)},remove:i=>{im(e,i)},drain:i=>{e.forEach(o=>o(i)),e.length=0}}}const Kn={log:"log",configuration:"configuration",usage:"usage"},iI=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],oI=[sT];let sm=om(),Lr=e=>{sm.add(()=>Lr(e))};function sI(e,t){let n;const r=new ge,i=new Set,o=!oI.includes(t.site)&&Tn(t.telemetrySampleRate),s={[Kn.log]:o,[Kn.configuration]:o&&Tn(t.telemetryConfigurationSampleRate),[Kn.usage]:o&&Tn(t.telemetryUsageSampleRate)},a=aI();Lr=u=>{const l=Ir(u);if(s[u.type]&&i.size<t.maxTelemetryEventsPerPage&&!i.has(l)){const d=c(e,u,a);r.notify(d),sl("telemetry",d),i.add(l)}},SC(cl);function c(u,l,d){return Dt({type:"telemetry",date:Fe(),service:u,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:Dt(l,{runtime_env:d,connectivity:rm(),sdk_setup:"npm"}),experimental_features:Array.from(CT())},n!==void 0?n():{})}return{setContextProvider:u=>{n=u},observable:r,enabled:o}}function aI(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function cI(){sm.drain()}function uI(e){return e.site===qg}function dn(e,t){ju(as.debug,e,t),Lr({type:Kn.log,message:e,status:"debug",...t})}function cl(e,t){Lr({type:Kn.log,status:"error",...dI(e),...t})}function lI(e){Lr({type:Kn.configuration,configuration:e})}function it(e){Lr({type:Kn.usage,usage:e})}function dI(e){if(Rn(e)){const t=kn(e);return{error:{kind:t.name,stack:Pr(fI(t))},message:t.message}}return{error:{stack:Yg},message:`Uncaught ${Ir(e)}`}}function fI(e){return e.stack=e.stack.filter(t=>!t.url||iI.some(n=>t.url.startsWith(n))),e}const Hi=1/0,pI=ct;let ji=null;const Ts=new Set;function hI(){Ts.forEach(e=>e())}function Nr({expireDelay:e,maxEntries:t}){let n=[];const r=[];ji||(ji=Cr(()=>hI(),pI));const i=()=>{const h=Rt()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const p=n.pop();p&&r.push(p.startTime)}};Ts.add(i);function o(h,p){const g={value:h,startTime:p,endTime:Hi,remove:()=>{im(n,g)},close:m=>{g.endTime=m}};return t&&n.length>=t&&n.pop(),n.unshift(g),g}function s(h=Hi,p={returnInactive:!1}){for(const g of n)if(g.startTime<=h){if(p.returnInactive||h<=g.endTime)return g.value;break}}function a(h){const p=n[0];p&&p.endTime===Hi&&p.close(h)}function c(h=Hi,p=0){const g=_r(h,p);return n.filter(m=>m.startTime<=g&&h<=m.endTime).map(m=>m.value)}function u(){return n.map(({startTime:h,endTime:p,value:g})=>({startTime:h,endTime:p===Hi?"Infinity":p,value:g}))}function l(){return r}function d(){n=[]}function f(){Ts.delete(i),Ts.size===0&&ji&&(fs(ji),ji=null)}return{add:o,find:s,closeActive:a,findAll:c,reset:d,stop:f,getAllEntries:u,getDeletedEntries:l}}const gI=ct,mI=zn;function vI(e,t,n,r){const i=new ge,o=new ge,s=QC(e.sessionStoreStrategyType,e,t,n),a=Nr({expireDelay:mI});s.renewObservable.subscribe(()=>{a.add(c(),Rt()),i.notify()}),s.expireObservable.subscribe(()=>{o.notify(),a.closeActive(Rt())}),s.expandOrRenewSession(),a.add(c(),Cg().relative),r.observable.subscribe(()=>{r.isGranted()?s.expandOrRenewSession():s.expire()}),yI(e,()=>{r.isGranted()&&s.expandOrRenewSession()}),bI(e,()=>s.expandSession()),wI(e,()=>s.restartSession());function c(){return{id:s.getSession().id,trackingType:s.getSession()[t],isReplayForced:!!s.getSession().forcedReplay,anonymousId:s.getSession().anonymousId}}return{findSession:(u,l)=>a.find(u,l),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function yI(e,t){const{stop:n}=dt(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function bI(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=Se(e,document,"visibilitychange",n);Cr(n,gI)}function wI(e,t){const{stop:n}=Se(e,window,"resume",t,{capture:!0})}function EI(e){return e>=500}function SI(e){try{return e.clone()}catch{return}}const _I=80*Ni,CI=32,am=3*Tg,TI=ct,cm=Qe;function um(e,t,n,r,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?dm(e,t,n,{onSuccess:()=>fm(0,t,n,r,i),onFailure:()=>{t.queuedPayloads.enqueue(e),lm(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function lm(e,t,n,r){e.transportStatus===2&&Ue(()=>{const i=e.queuedPayloads.first();dm(i,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=cm,fm(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(TI,e.currentBackoffTime*2),lm(e,t,n,r)}})},e.currentBackoffTime)}function dm(e,t,n,{onSuccess:r,onFailure:i}){t.bandwidthMonitor.add(e),n(e,o=>{t.bandwidthMonitor.remove(e),II(o)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:o.status},i()):(t.transportStatus=0,r())})}function fm(e,t,n,r,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${am/Tg}MiB`,source:Or.AGENT,startClocks:rt()}),t.queueFullReported=!0);const o=t.queuedPayloads;for(t.queuedPayloads=pm();o.size()>0;)um(o.dequeue(),t,n,r,i)}function II(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||EI(e.status))}function xI(){return{transportStatus:0,currentBackoffTime:cm,bandwidthMonitor:AI(),queuedPayloads:pm(),queueFullReported:!1}}function pm(){const e=[];return{bytesCount:0,enqueue(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=am}}}function AI(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=_I&&this.ongoingRequestCount<CI},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function hm(e,t,n){const r=xI(),i=(o,s)=>PI(e,t,o,s);return{send:o=>{um(o,r,i,e.trackType,n)},sendOnExit:o=>{kI(e,t,o)}}}function kI(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const i=e.build("beacon",n);if(navigator.sendBeacon(i,n.data))return}catch(i){RI(i)}ul(e,n)}let gm=!1;function RI(e){gm||(gm=!0,ln(e))}function PI(e,t,n,r){if(OI()&&n.bytesCount<t){const o=e.build("fetch-keepalive",n);fetch(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(Y(s=>r==null?void 0:r({status:s.status,type:s.type}))).catch(Y(()=>ul(e,n,r)))}else ul(e,n,r)}function ul(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then(Y(i=>n==null?void 0:n({status:i.status,type:i.type}))).catch(Y(()=>n==null?void 0:n({status:0})))}function OI(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Mr(){const e=LI();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function mm(e){const t=Mr();return!!t&&t.getCapabilities().includes(e)}function Yn(e){var t;e===void 0&&(e=(t=Jt().location)===null||t===void 0?void 0:t.hostname);const n=Mr();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function LI(){return Jt().DatadogEventBridge}const Dr={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function NI(e){return new ge(t=>{const{stop:n}=dt(e,window,["visibilitychange","freeze"],i=>{i.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Dr.HIDDEN}):i.type==="freeze"&&t.notify({reason:Dr.FROZEN})},{capture:!0}),r=Se(e,window,"beforeunload",()=>{t.notify({reason:Dr.UNLOADING})}).stop;return()=>{n(),r()}})}function vm(e){return Og(Dr).includes(e)}function MI({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let i={};const o=n.flushObservable.subscribe(d=>l(d));function s(d,f,h){n.notifyBeforeAddMessage(f),h!==void 0?(i[h]=d,n.notifyAfterAddMessage()):e.write(e.isEmpty?d:`
|
|
555
|
+
${d}`,p=>{n.notifyAfterAddMessage(p-f)})}function a(d){return d!==void 0&&i[d]!==void 0}function c(d){const f=i[d];delete i[d];const h=e.estimateEncodedBytesCount(f);n.notifyAfterRemoveMessage(h)}function u(d,f){const h=Ir(d),p=e.estimateEncodedBytesCount(h);if(p>=r){se.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${$u} ${fC}/#technical-limitations`);return}a(f)&&c(f),s(h,p,f)}function l(d){const f=Og(i).join(`
|
|
556
|
+
`);i={};const h=vm(d.reason),p=h?t.sendOnExit:t.send;if(h&&e.isAsync){const g=e.finishSync();g.outputBytesCount&&p(ym(g));const m=[g.pendingData,f].filter(Boolean).join(`
|
|
557
|
+
`);m&&p({data:m,bytesCount:Ig(m)})}else f&&e.write(e.isEmpty?f:`
|
|
558
|
+
${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.unsubscribe}}function ym(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}function DI({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:i}){const o=r.subscribe(p=>l(p.reason)),s=i.subscribe(()=>l("session_expire")),a=new ge(()=>()=>{o.unsubscribe(),s.unsubscribe()});let c=0,u=0;function l(p){if(u===0)return;const g=u,m=c;u=0,c=0,h(),a.notify({reason:p,messagesCount:g,bytesCount:m})}let d;function f(){d===void 0&&(d=Ue(()=>{l("duration_limit")},n))}function h(){ut(d),d=void 0}return{flushObservable:a,get messagesCount(){return u},notifyBeforeAddMessage(p){c+p>=t&&l("bytes_limit"),u+=1,c+=p,f()},notifyAfterAddMessage(p=0){c+=p,u>=e?l("messages_limit"):c>=t&&l("bytes_limit")},notifyAfterRemoveMessage(p){c-=p,u-=1,u===0&&h()}}}function FI(e,t,n,r,i,o,s=MI){const a=u(e,t),c=n&&u(e,n);function u(l,{endpoint:d,encoder:f}){return s({encoder:f,request:hm(d,l.batchBytesLimit,r),flushController:DI({messagesLimit:l.batchMessagesLimit,bytesLimit:l.batchBytesLimit,durationLimit:l.flushTimeout,pageMayExitObservable:i,sessionExpireObservable:o}),messageBytesLimit:l.messageBytesLimit})}return{flushObservable:a.flushController.flushObservable,add(l,d=!0){a.add(l),c&&d&&c.add(n.transformMessage?n.transformMessage(l):l)},upsert:(l,d)=>{a.upsert(l,d),c&&c.upsert(n.transformMessage?n.transformMessage(l):l,d)},stop:()=>{a.stop(),c&&c.stop()}}}function UI(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const i=Ig(n);t+=i,e+=n,r&&r(i)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class BI{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(i=>i(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function ll(e,t,n){let r=0,i=!1;return{isLimitReached(){if(r===0&&Ue(()=>{r=0},ct),r+=1,r<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Or.AGENT,startClocks:rt()})}finally{i=!1}}return!0}}}function dl(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:ae}):Se(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function $I(e,t){return new Promise(n=>{dl(e,t,n)})}let fl;const pl=new WeakMap;function VI(e){return fl||(fl=zI(e)),fl}function zI(e){return new ge(t=>{const{stop:n}=lt(XMLHttpRequest.prototype,"open",HI),{stop:r}=lt(XMLHttpRequest.prototype,"send",o=>{jI(o,e,t)},{computeHandlingStack:!0}),{stop:i}=lt(XMLHttpRequest.prototype,"abort",qI);return()=>{n(),r(),i()}})}function HI({target:e,parameters:[t,n]}){pl.set(e,{state:"open",method:String(t).toUpperCase(),url:Xu(String(n))})}function jI({target:e,handlingStack:t},n,r){const i=pl.get(e);if(!i)return;const o=i;o.state="start",o.startClocks=rt(),o.isAborted=!1,o.xhr=e,o.handlingStack=t;let s=!1;const{stop:a}=lt(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(u(),a(),s)return;s=!0;const l=i;l.state="complete",l.duration=He(o.startClocks.timeStamp,Fe()),l.status=e.status,r.notify(Mi(l))},{stop:u}=Se(n,e,"loadend",c);r.notify(o)}function qI({target:e}){const t=pl.get(e);t&&(t.isAborted=!0)}let hl;function bm(){return hl||(hl=WI()),hl}function WI(){return new ge(e=>{if(!window.fetch)return;const{stop:t}=lt(window,"fetch",n=>GI(n,e),{computeHandlingStack:!0});return t})}function GI({parameters:e,onPostCall:t,handlingStack:n},r){const[i,o]=e;let s=o&&o.method;s===void 0&&i instanceof Request&&(s=i.method);const a=s!==void 0?String(s).toUpperCase():"GET",c=i instanceof Request?i.url:Xu(String(i)),u=rt(),l={state:"start",init:o,input:i,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),e[0]=l.input,e[1]=l.init,t(d=>KI(r,d,l))}function KI(e,t,n){const r=n;function i(o){r.state="resolve",Object.assign(r,o),e.notify(r)}t.then(Y(o=>{i({response:o,responseType:o.type,status:o.status,isAborted:!1})}),Y(o=>{var s,a;i({status:0,isAborted:((a=(s=r.init)===null||s===void 0?void 0:s.signal)===null||a===void 0?void 0:a.aborted)||o instanceof DOMException&&o.code===DOMException.ABORT_ERR,error:o})}))}function wm(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(Y(e),t);return()=>window.cancelIdleCallback(n)}return JI(e)}const YI=50;function JI(e){const t=kt(),n=Ue(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,YI-(kt()-t))})},0);return()=>ut(n)}const ZI=Qe,XI=30;function QI(){const e=[];function t(r){let i;if(r.didTimeout){const o=performance.now();i=()=>XI-(performance.now()-o)}else i=r.timeRemaining.bind(r);for(;i()>0&&e.length;)e.shift()();e.length&&n()}function n(){wm(t,{timeout:ZI})}return{push(r){e.push(r)===1&&n()}}}let gl={};function e3(e){const t=e.map(n=>(gl[n]||(gl[n]=t3(n)),gl[n]));return Ag(...t)}function t3(e){return new ge(t=>{const n=un[e];return un[e]=(...r)=>{n.apply(console,r);const i=_s("console error");Vn(()=>{t.notify(n3(r,e,i))})},()=>{un[e]=n}})}function n3(e,t,n){const r=e.map(o=>r3(o)).join(" ");let i;if(t===as.error){const o=e.find(Rn);i={stack:o?Pr(kn(o)):void 0,fingerprint:Zg(o),causes:o?Qg(o,"console"):void 0,startClocks:rt(),message:r,source:Or.CONSOLE,handling:"handled",handlingStack:n,context:Xg(o),originalError:o}}return{api:t,message:r,error:i,handlingStack:n}}function r3(e){return typeof e=="string"?ke(e):Rn(e)?Kg(kn(e)):Ir(ke(e),void 0,2)}function i3(e){const t=Gn(e)==="object";return t||se.error("Unsupported context:",e),t}function ml(e,t,n){const r={...e};for(const[i,{required:o,type:s}]of Object.entries(t))s==="string"&&i in r&&(r[i]=String(r[i])),o&&!(i in e)&&se.warn(`The property ${i} of ${n} is required; context will not be sent to the intake.`);return r}function Is(e="",{propertiesConfig:t={}}={}){let n={};const r=new ge,i={getContext:()=>al(n),setContext:o=>{i3(o)?n=ke(ml(o,t,e)):i.clearContext(),r.notify()},setContextProperty:(o,s)=>{n=ke(ml({...n,[o]:s},t,e)),r.notify()},removeContextProperty:o=>{delete n[o],ml(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}const o3="_dd_c",s3=[];function vl(e,t,n,r){const i=a3(n,r);s3.push(Se(e,window,"storage",({key:u})=>{i===u&&s()})),t.changeObservable.subscribe(a);const o=Dt(c(),t.getContext());$n(o)||t.setContext(o);function s(){t.setContext(c())}function a(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function c(){const u=localStorage.getItem(i);return u?JSON.parse(u):{}}}function a3(e,t){return`${o3}_${e}_${t}`}const Be={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},ot={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function c3(e,t,n){const r=e.getReader();let i=0;o();function o(){r.read().then(Y(a=>{if(a.done){s();return}i+=a.value.length,i>n.bytesLimit?s():o()}),Y(a=>t(a)))}function s(){r.cancel().catch(ae),t(void 0,void 0,void 0)}}const u3="datadog-synthetics-public-id",l3="datadog-synthetics-result-id",d3="datadog-synthetics-injects-rum";function Em(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||An(d3))}function f3(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||An(u3);return typeof e=="string"?e:void 0}function p3(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||An(l3);return typeof e=="string"?e:void 0}function yl(e){const t=Gn(e);return t==="string"||t==="function"||e instanceof RegExp}function Sm(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(i){se.error(i)}return!1})}function h3(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function g3(e,t,n){function r(o){return!t.wasInPageStateDuringPeriod("frozen",o.startClocks.relative,o.duration)}function i(o){r(o)&&e.notify(12,v3(o))}return{addDurationVital:i,startDurationVital:(o,s={})=>_m(n,o,s),stopDurationVital:(o,s={})=>{Cm(i,n,o,s)}}}function _m({vitalsByName:e,vitalsByReference:t},n,r={}){const i={name:n,startClocks:rt(),context:r.context,description:r.description},o={__dd_vital_reference:!0};return e.set(n,i),t.set(o,i),o}function Cm(e,{vitalsByName:t,vitalsByReference:n},r,i={}){const o=typeof r=="string"?t.get(r):n.get(r);o&&(e(m3(o,o.startClocks,i,rt())),typeof r=="string"?t.delete(r):n.delete(r))}function m3(e,t,n,r){var i;return{name:e.name,type:"duration",startClocks:t,duration:He(t.timeStamp,r.timeStamp),context:Dt(e.context,n.context),description:(i=n.description)!==null&&i!==void 0?i:e.description}}function v3(e,t){const n={date:e.startClocks.timeStamp,vital:{id:je(),type:e.type,name:e.name,duration:G(e.duration),description:e.description},type:"vital"};return n._dd={vital:{computed_value:!0}},{rawRumEvent:n,startTime:e.startClocks.relative,duration:e.duration,customerContext:e.context,domainContext:{}}}function Tm(e,t,n){if(e)for(const r of e){const i=r[t];i&&i(n)}}function y3(){return xm(64)}function Im(){return xm(63)}function xm(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],i=t[0],o="";do{const s=r%n*4294967296+i;r=Math.floor(r/n),i=Math.floor(s/n),o=(s%n).toString(n)+o}while(r||i);return o}}}function Fr(e){return e.toString(16).padStart(16,"0")}let xs;function b3(e,t){if(t===100)return!0;if(t===0)return!1;if(xs&&e===xs.sessionId)return xs.decision;let n;return window.BigInt?n=w3(BigInt(`0x${e.split("-")[4]}`),t):n=Tn(t),xs={sessionId:e,decision:n},n}function w3(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),i=e*n%r;return Number(i)<=t/100*Number(r)}function E3(e){const t=e;return Gn(t)==="object"&&yl(t.match)&&Array.isArray(t.propagatorTypes)}function S3(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function _3(e,t,n){return{clearTracingIfNeeded:S3,traceFetch:r=>Am(e,r,t,n,i=>{var o;if(r.input instanceof Request&&!(!((o=r.init)===null||o===void 0)&&o.headers))r.input=new Request(r.input),Object.keys(i).forEach(s=>{r.input.headers.append(s,i[s])});else{r.init=Mi(r.init);const s=[];r.init.headers instanceof Headers?r.init.headers.forEach((a,c)=>{s.push([c,a])}):Array.isArray(r.init.headers)?r.init.headers.forEach(a=>{s.push(a)}):r.init.headers&&Object.keys(r.init.headers).forEach(a=>{s.push([a,r.init.headers[a]])}),r.init.headers=s.concat(Ku(i))}}),traceXhr:(r,i)=>Am(e,r,t,n,o=>{Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])})})}}function Am(e,t,n,r,i){const o=n.findTrackedSession();if(!o)return;const s=e.allowedTracingUrls.find(u=>Sm([u.match],t.url,!0));if(!s)return;const a=b3(o.id,e.traceSampleRate);(a||e.traceContextInjection===Qu.ALL)&&(t.traceSampled=a,t.traceId=y3(),t.spanId=Im(),i(C3(t.traceId,t.spanId,t.traceSampled,s.propagatorTypes,r,e)))}function C3(e,t,n,r,i,o){const s={};if(r.forEach(a=>{switch(a){case"datadog":{Object.assign(s,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(s,{traceparent:`00-0000000000000000${Fr(e)}-${Fr(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(s,{b3:`${Fr(e)}-${Fr(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(s,{"X-B3-TraceId":Fr(e),"X-B3-SpanId":Fr(t),"X-B3-Sampled":n?"1":"0"});break}}}),Ss(Wn.USER_ACCOUNT_TRACE_HEADER)&&o.propagateTraceBaggage){const a=i().user.id,c=i().account.id,u=[];typeof a=="string"&&u.push(`usr.id=${encodeURIComponent(a)}`),typeof c=="string"&&u.push(`account.id=${encodeURIComponent(c)}`),u.length>0&&(s.baggage=u.join(","))}return s}const km=["tracecontext","datadog"];function T3(e){var t,n,r,i,o,s,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&se.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){se.error("Application ID is not configured, no RUM data will be collected.");return}if(!kr(e.sessionReplaySampleRate,"Session Replay")||!kr(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){se.error("Excluded Activity Urls should be an array");return}const c=I3(e);if(!c)return;const u=wT(e);if(!u)return;const l=Ss(Wn.PROFILING),d=(t=e.sessionReplaySampleRate)!==null&&t!==void 0?t:0;return{applicationId:e.applicationId,version:e.version||void 0,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:d,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:d===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:Oi(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(r=e.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((i=e.trackUserInteractions)!==null&&i!==void 0)||i),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((o=e.trackResources)!==null&&o!==void 0)||o),trackLongTasks:!!(!((s=e.trackLongTasks)!==null&&s!==void 0)||s),subdomain:e.subdomain,defaultPrivacyLevel:ds(Bi,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Bi.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ds(Qu,e.traceContextInjection)?e.traceContextInjection:Qu.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:l&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...u}}function I3(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){se.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){se.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{yl(n)?t.push({match:n,propagatorTypes:km}):E3(n)?t.push(n):se.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function x3(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{yl(n)?km.forEach(r=>t.add(r)):Gn(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function A3(e){var t;const n=ET(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:x3(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var i;return{name:r.name,...(i=r.getConfigurationTelemetry)===null||i===void 0?void 0:i.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,...n}}const k3="v1";function R3(e,t){O3(e,n=>{t(P3(e,n))})}function P3(e,t){return{...e,...t}}function O3(e,t){const n=new XMLHttpRequest;Se(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Rm()}),Se(e,n,"error",function(){Rm()}),n.open("GET",L3(e)),n.send()}function L3(e){return`https://sdk-configuration.${Wg("rum",e)}/${k3}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Rm(){se.error("Error fetching the remote configuration.")}function N3(e){const t=Pm();return e.storeContextsAcrossPages&&vl(e,t,"rum",2),t}function Pm(){return Is("global context")}function M3(e){const t=Om();return e.storeContextsAcrossPages&&vl(e,t,"rum",1),t}function Om(){return Is("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function D3(e){const t=Lm();return e.storeContextsAcrossPages&&vl(e,t,"rum",4),t}function Lm(){return Is("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function F3({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,i){const o=om(),s=Pm();bl(s,Be.globalContext,o);const a=Om();bl(a,Be.userContext,o);const c=Lm();bl(c,Be.accountContext,o);let u,l,d,f;const h=n.observable.subscribe(g),p={};function g(){if(!d||!f||!n.isGranted())return;h.unsubscribe();let b;if(f.trackViewsManually){if(!u)return;o.remove(u.callback),b=u.options}const w=i(f,l,b);o.drain(w)}function m(b){const w=Yn();if(w&&(b=U3(b)),d=b,lI(A3(b)),f){em("DD_RUM",b);return}const C=T3(b);if(C){if(!w&&!C.sessionStoreStrategyType){se.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!w&&t&&(l=t(C,"Datadog RUM",ae),!l)||(f=C,bm().subscribe(ae),n.tryToInit(C.trackingConsent),g())}}const v=b=>{o.add(w=>w.addDurationVital(b))};return{init(b,w){if(!b){se.error("Missing configuration");return}ST(b.enableExperimentalFeatures),d=b,!(e&&Em())&&(Tm(b.plugins,"onInit",{initConfiguration:b,publicApi:w}),b.remoteConfigurationId?R3(b,m):m(b))},get initConfiguration(){return d},getInternalContext:ae,stopSession:ae,addTiming(b,w=Fe()){o.add(C=>C.addTiming(b,w))},startView(b,w=rt()){const C=_=>{_.startView(b,w)};o.add(C),u||(u={options:b,callback:C},g())},setViewName(b){o.add(w=>w.setViewName(b))},setViewContext(b){o.add(w=>w.setViewContext(b))},setViewContextProperty(b,w){o.add(C=>C.setViewContextProperty(b,w))},getViewContext:()=>p,globalContext:s,userContext:a,accountContext:c,addAction(b){o.add(w=>w.addAction(b))},addError(b){o.add(w=>w.addError(b))},addFeatureFlagEvaluation(b,w){o.add(C=>C.addFeatureFlagEvaluation(b,w))},startDurationVital(b,w){return _m(r,b,w)},stopDurationVital(b,w){Cm(v,r,b,w)},addDurationVital:v}}function U3(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Mr())===null||n===void 0?void 0:n.getPrivacyLevel()}}function bl(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(i=>i[t].setContext(r))})}function B3(e,t,n,r={}){const i=eT(),o=h3();let s=F3(r,i,o,(l,d,f)=>{const h=e(l,t,n,f,d&&r.createDeflateEncoder?p=>r.createDeflateEncoder(l,d,p):UI,i,o);return t.onRumStart(h.lifeCycle,l,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,l,h.session,h.viewHistory),s=$3(s,h),Tm(l.plugins,"onRumStart",{strategy:s}),h});const a=Y(l=>{const d=typeof l=="object"?l:{name:l};s.startView(d),it({feature:"start-view"})});function c(l,d,f){return Y((...h)=>(it({feature:f}),s[l][d](...h)))}const u=YT({init:Y(l=>{s.init(l,u)}),setTrackingConsent:Y(l=>{i.update(l),it({feature:"set-tracking-consent",tracking_consent:l})}),setViewName:Y(l=>{s.setViewName(l),it({feature:"set-view-name"})}),setViewContext:Y(l=>{s.setViewContext(l),it({feature:"set-view-context"})}),setViewContextProperty:Y((l,d)=>{s.setViewContextProperty(l,d),it({feature:"set-view-context-property"})}),getViewContext:Y(()=>(it({feature:"set-view-context-property"}),s.getViewContext())),getInternalContext:Y(l=>s.getInternalContext(l)),getInitConfiguration:Y(()=>al(s.initConfiguration)),addAction:(l,d)=>{const f=_s("action");Vn(()=>{s.addAction({name:ke(l),context:ke(d),startClocks:rt(),type:"custom",handlingStack:f}),it({feature:"add-action"})})},addError:(l,d)=>{const f=_s("error");Vn(()=>{s.addError({error:l,handlingStack:f,context:ke(d),startClocks:rt()}),it({feature:"add-error"})})},addTiming:Y((l,d)=>{s.addTiming(ke(l),d)}),setGlobalContext:c(Be.globalContext,ot.setContext,"set-global-context"),getGlobalContext:c(Be.globalContext,ot.getContext,"get-global-context"),setGlobalContextProperty:c(Be.globalContext,ot.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c(Be.globalContext,ot.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c(Be.globalContext,ot.clearContext,"clear-global-context"),setUser:c(Be.userContext,ot.setContext,"set-user"),getUser:c(Be.userContext,ot.getContext,"get-user"),setUserProperty:c(Be.userContext,ot.setContextProperty,"set-user-property"),removeUserProperty:c(Be.userContext,ot.removeContextProperty,"remove-user-property"),clearUser:c(Be.userContext,ot.clearContext,"clear-user"),setAccount:c(Be.accountContext,ot.setContext,"set-account"),getAccount:c(Be.accountContext,ot.getContext,"get-account"),setAccountProperty:c(Be.accountContext,ot.setContextProperty,"set-account-property"),removeAccountProperty:c(Be.accountContext,ot.removeContextProperty,"remove-account-property"),clearAccount:c(Be.accountContext,ot.clearContext,"clear-account"),startView:a,stopSession:Y(()=>{s.stopSession(),it({feature:"stop-session"})}),addFeatureFlagEvaluation:Y((l,d)=>{s.addFeatureFlagEvaluation(ke(l),ke(d)),it({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:Y(()=>t.getSessionReplayLink()),startSessionReplayRecording:Y(l=>{t.start(l),it({feature:"start-session-replay-recording",force:l&&l.force})}),stopSessionReplayRecording:Y(()=>t.stop()),addDurationVital:Y((l,d)=>{it({feature:"add-duration-vital"}),s.addDurationVital({name:ke(l),type:"duration",startClocks:hC(d.startTime),duration:d.duration,context:ke(d&&d.context),description:ke(d&&d.description)})}),startDurationVital:Y((l,d)=>(it({feature:"start-duration-vital"}),s.startDurationVital(ke(l),{context:ke(d&&d.context),description:ke(d&&d.description)}))),stopDurationVital:Y((l,d)=>{it({feature:"stop-duration-vital"}),s.stopDurationVital(typeof l=="string"?ke(l):l,{context:ke(d&&d.context),description:ke(d&&d.description)})})});return u}function $3(e,t){return{init:n=>{em("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function V3(){const e=Nm();return new ge(t=>{if(!e)return;const n=new e(Y(()=>t.notify()));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Nm(){let e;const t=window;if(t.Zone&&(e=In(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(ae),r=In(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function z3(){const e=new ge,{stop:t}=lt(window,"open",()=>e.notify());return{observable:e,stop:t}}function H3(e,t,n,r,i){return{get:o=>{const s=n.findView(o),a=i.findUrl(o),c=t.findTrackedSession(o);if(c&&s&&a){const u=r.findActionId(o);return{application_id:e,session_id:c.id,user_action:u?{id:u}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}const j3=BI,q3=zn;function W3(e){const t=Nr({expireDelay:q3});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const i=t.find(r.startClocks.relative);i&&r.name&&(i.name=r.name),i&&r.context&&(i.context=r.context)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),getAllEntries:()=>t.getAllEntries(),getDeletedEntries:()=>t.getDeletedEntries(),stop:()=>{t.stop()}}}const Mm="initial_document",G3=[["document",e=>Mm===e],["xhr",e=>e==="xmlhttprequest"],["fetch",e=>e==="fetch"],["beacon",e=>e==="beacon"],["css",(e,t)=>/\.css$/i.test(t)],["js",(e,t)=>/\.js$/i.test(t)],["image",(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],["font",(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],["media",(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function K3(e){const t=e.name;if(!tT(t))return dn(`Failed to construct URL for "${e.name}"`),"other";const n=nT(t);for(const[r,i]of G3)if(i(e.initiatorType,n))return r;return"other"}function Dm(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Y3(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Fm(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?He(n,r):t}function J3(e){if(!Bm(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:o,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:h}=e,p={download:Jn(t,f,h),first_byte:Jn(t,d,f)};return 0<r&&r<n&&(p.worker=Jn(t,r,n)),n<l&&(p.connect=Jn(t,c,l),c<=u&&u<=l&&(p.ssl=Jn(t,u,l))),n<a&&(p.dns=Jn(t,s,a)),t<o&&(p.redirect=Jn(t,i,o)),p}function Um(e){return e.duration>=0}function Bm(e){const t=Dm(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=Z3(e)?Dm(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function Z3(e){return e.redirectEnd>e.startTime}function Jn(e,t,n){if(e<=t&&t<=n)return{duration:G(He(t,n)),start:G(He(e,t))}}function $m(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Vm(e){return e.deliveryType===""?"other":e.deliveryType}function X3(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function wl(e){return e&&!yT(e)}const Q3=/data:(.+)?(;base64)?,/g,zm=24e3;function Hm(e){return e.length<=zm?!1:e.substring(0,5)==="data:"?(e=e.substring(0,zm),!0):!1}function jm(e){return`${e.match(Q3)[0]}[...]`}let qm=1;function e5(e,t,n,r){const i=_3(t,n,r);t5(e,t,i),n5(e,i)}function t5(e,t,n){const r=VI(t).subscribe(i=>{const o=i;if(wl(o.url))switch(o.state){case"start":n.traceXhr(o,o.xhr),o.requestIndex=Wm(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":n.clearTracingIfNeeded(o),e.notify(8,{duration:o.duration,method:o.method,requestIndex:o.requestIndex,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:"xhr",url:o.url,xhr:o.xhr,isAborted:o.isAborted,handlingStack:o.handlingStack});break}});return{stop:()=>r.unsubscribe()}}function n5(e,t){const n=bm().subscribe(r=>{const i=r;if(wl(i.url))switch(i.state){case"start":t.traceFetch(i),i.requestIndex=Wm(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":r5(i,o=>{t.clearTracingIfNeeded(i),e.notify(8,{duration:o,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"fetch",url:i.url,response:i.response,init:i.init,input:i.input,isAborted:i.isAborted,handlingStack:i.handlingStack})});break}});return{stop:()=>n.unsubscribe()}}function Wm(){const e=qm;return qm+=1,e}function r5(e,t){const n=e.response&&SI(e.response);!n||!n.body?t(He(e.startClocks.timeStamp,Fe())):c3(n.body,()=>{t(He(e.startClocks.timeStamp,Fe()))},{bytesLimit:Number.POSITIVE_INFINITY})}function Gm(e){return Oi(e)&&e<0?void 0:e}function Km({lifeCycle:e,isChildEvent:t,onChange:n=ae}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,o=>{var s;if(!(o.type==="view"||o.type==="vital"||!t(o)))switch(o.type){case"error":r.errorCount+=1,n();break;case"action":r.actionCount+=1,o.action.frustration&&(r.frustrationCount+=o.action.frustration.type.length),n();break;case"long_task":r.longTaskCount+=1,n();break;case"resource":!((s=o._dd)===null||s===void 0)&&s.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}function i5(e,t){const n=kt();let r=!1;const{stop:i}=dt(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:Rt(),processingEnd:Rt(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?o(e,c):s(c)},{passive:!0,capture:!0});return{stop:i};function o(a,c){dt(a,window,["pointerup","pointercancel"],u=>{u.type==="pointerup"&&s(c)},{once:!0})}function s(a){if(!r){r=!0,i();const c=a.processingStart-a.startTime;c>=0&&c<kt()-n&&t(a)}}}var fe;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(fe||(fe={}));function Zt(e,t){return new ge(n=>{if(!window.PerformanceObserver)return;const r=c=>{const u=a5(c);u.length>0&&n.notify(u)};let i,o=!0;const s=new PerformanceObserver(Y(c=>{o?i=Ue(()=>r(c.getEntries())):r(c.getEntries())}));try{s.observe(t)}catch{if([fe.RESOURCE,fe.NAVIGATION,fe.LONG_TASK,fe.PAINT].includes(t.type)){t.buffered&&(i=Ue(()=>r(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch{return}}}o=!1,o5(e);let a;return!Zn(fe.FIRST_INPUT)&&t.type===fe.FIRST_INPUT&&({stop:a}=i5(e,c=>{r([c])})),()=>{s.disconnect(),a&&a(),ut(i)}})}let qi;function o5(e){return!qi&&s5()&&"addEventListener"in performance&&(qi=Se(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{qi==null||qi.stop()}}function s5(){return window.performance!==void 0&&"getEntries"in performance}function Zn(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function a5(e){return e.filter(t=>!c5(t))}function c5(e){return e.entryType===fe.RESOURCE&&(!wl(e.name)||!Um(e))}const Ym=100,u5=100;function El(e,t,n,r,i,o){const s=d5(e,t,n,r);return l5(s,i,o)}function l5(e,t,n){let r,i=!1;const o=Ue(Y(()=>u({hadActivity:!1})),Ym),s=n!==void 0?Ue(Y(()=>u({hadActivity:!0,end:Fe()})),n):void 0,a=e.subscribe(({isBusy:l})=>{ut(o),ut(r);const d=Fe();l||(r=Ue(Y(()=>u({hadActivity:!0,end:d})),u5))}),c=()=>{i=!0,ut(o),ut(r),ut(s),a.unsubscribe()};function u(l){i||(c(),t(l))}return{stop:c}}function d5(e,t,n,r){return new ge(i=>{const o=[];let s,a=0;return o.push(t.subscribe(c),n.subscribe(c),Zt(r,{type:fe.RESOURCE}).subscribe(u=>{u.some(l=>!Sl(r,l.name))&&c()}),e.subscribe(7,u=>{Sl(r,u.url)||(s===void 0&&(s=u.requestIndex),a+=1,c())}),e.subscribe(8,u=>{Sl(r,u.url)||s===void 0||u.requestIndex<s||(a-=1,c())})),()=>{o.forEach(u=>u.unsubscribe())};function c(){i.notify({isBusy:a>0})}})}function Sl(e,t){return Sm(e.excludedActivityUrls,t)}function Jm(e){return e.nodeType===Node.TEXT_NODE}function f5(e){return e.nodeType===Node.COMMENT_NODE}function Ur(e){return e.nodeType===Node.ELEMENT_NODE}function As(e){return Ur(e)&&!!e.shadowRoot}function _l(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Ur(t.host)}function p5(e){return e.childNodes.length>0||As(e)}function Zm(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;As(e)&&t(e.shadowRoot)}function ks(e){return _l(e)?e.host:e.parentNode}const H={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Bi.ALLOW,MASK:Bi.MASK,MASK_USER_INPUT:Bi.MASK_USER_INPUT},Cl="data-dd-privacy",h5="hidden",g5="dd-privacy-",Pn="***",Xm="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",m5={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},v5="x";function Xt(e,t,n){if(n&&n.has(e))return n.get(e);const r=ks(e),i=r?Xt(r,t,n):t,o=ev(e),s=Qm(o,i);return n&&n.set(e,s),s}function Qm(e,t){switch(t){case H.HIDDEN:case H.IGNORE:return t}switch(e){case H.ALLOW:case H.MASK:case H.MASK_USER_INPUT:case H.HIDDEN:case H.IGNORE:return e;default:return t}}function ev(e){if(Ur(e)){if(e.tagName==="BASE")return H.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return H.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return H.MASK}if(e.matches(Br(H.HIDDEN)))return H.HIDDEN;if(e.matches(Br(H.MASK)))return H.MASK;if(e.matches(Br(H.MASK_USER_INPUT)))return H.MASK_USER_INPUT;if(e.matches(Br(H.ALLOW)))return H.ALLOW;if(b5(e))return H.IGNORE}}function Rs(e,t){switch(t){case H.MASK:case H.HIDDEN:case H.IGNORE:return!0;case H.MASK_USER_INPUT:return Jm(e)?tv(e.parentNode):tv(e);default:return!1}}function tv(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!m5[t.tagName]}const y5=e=>e.replace(/\S/g,v5);function nv(e,t,n){var r;const i=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(t&&!o.trim())return;const s=n;if(i==="SCRIPT")o=Pn;else if(s===H.HIDDEN)o=Pn;else if(Rs(e,s))if(i==="DATALIST"||i==="SELECT"||i==="OPTGROUP"){if(!o.trim())return}else i==="OPTION"?o=Pn:o=y5(o);return o}function b5(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(i)||/^product:/.test(i)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function Br(e){return`[${Cl}="${e}"], .${g5}${e}`}const Tl="data-dd-action-name",w5="Masked Element";function E5(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const i=rv(e,Tl)||n&&rv(e,n);return i?{name:i,nameSource:"custom_attribute"}:r===H.MASK?{name:w5,nameSource:"mask_placeholder"}:iv(e,n,S5,t)||iv(e,n,_5,t)||{name:"",nameSource:"blank"}}function rv(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return sv(ov(r.trim()))}const S5=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Ps(e.labels[0],t)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Ps(e,t,n)},e=>Wi(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(i=>T5(e,i)).filter(i=>!!i).map(i=>av(i,t,n)).join(" "),nameSource:"text_content"}},e=>Wi(e,"alt"),e=>Wi(e,"name"),e=>Wi(e,"title"),e=>Wi(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Ps(e.options[0],t)}],_5=[(e,t,n)=>Ps(e,t,n)],C5=10;function iv(e,t,n,r){let i=e,o=0;for(;o<=C5&&i&&i.nodeName!=="BODY"&&i.nodeName!=="HTML"&&i.nodeName!=="HEAD";){for(const s of n){const a=s(i,t,r);if(a){const{name:c,nameSource:u}=a,l=c&&c.trim();if(l)return{name:sv(ov(l)),nameSource:u}}}if(i.nodeName==="FORM")break;i=i.parentElement,o+=1}}function ov(e){return e.replace(/\s+/g," ")}function sv(e){return e.length>100?`${kg(e,100)} [...]`:e}function T5(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Wi(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Ps(e,t,n){return{name:av(e,t,n)||"",nameSource:"text_content"}}function av(e,t,n){if(!e.isContentEditable){if("innerText"in e){let r=e.innerText;const i=o=>{const s=e.querySelectorAll(o);for(let a=0;a<s.length;a+=1){const c=s[a];if("innerText"in c){const u=c.innerText;u&&u.trim().length>0&&(r=r.replace(u,""))}}};return i(`[${Tl}]`),t&&i(`[${t}]`),n&&i(`${Br(H.HIDDEN)}, ${Br(H.MASK)}`),r}return e.textContent}}const cv=[Tl,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],I5=[lv,A5],x5=[lv,k5,R5];function Gi(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const i=dv(r,I5,O5,t,n);if(i)return i;n=dv(r,x5,L5,t,n)||Os(P5(r),n),r=r.parentElement}return n}function uv(e){return/[0-9]/.test(e)}function A5(e){if(e.id&&!uv(e.id))return`#${CSS.escape(e.id)}`}function k5(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!uv(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function R5(e){return CSS.escape(e.tagName)}function lv(e,t){if(t){const r=n(t);if(r)return r}for(const r of cv){const i=n(r);if(i)return i}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function P5(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function dv(e,t,n,r,i){for(const o of t){const s=o(e,r);if(s&&n(e,s,i))return Os(s,i)}}function O5(e,t,n){return e.ownerDocument.querySelectorAll(Os(t,n)).length===1}function L5(e,t,n){let r;if(n===void 0)r=s=>s.matches(t);else{const s=Os(`${t}:scope`,n);r=a=>a.querySelector(s)!==null}let o=e.parentElement.firstElementChild;for(;o;){if(o!==e&&r(o))return!1;o=o.nextElementSibling}return!0}function Os(e,t){return t?`${e}>${t}`:e}const fv=Qe,N5=100;function M5(e,t){const n=[];let r=0,i;o(e);function o(c){c.stopObservable.subscribe(s),n.push(c),ut(i),i=Ue(a,fv)}function s(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){ut(i),r===0&&(r=1,s())}return{tryAppend:c=>r!==0?!1:n.length>0&&!D5(n[n.length-1].event,c.event)?(a(),!1):(o(c),!0),stop:()=>{a()}}}function D5(e,t){return e.target===t.target&&F5(e,t)<=N5&&e.timeStamp-t.timeStamp<=fv}function F5(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function U5(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},o;const s=[Se(e,window,"pointerdown",a=>{hv(a)&&(r=pv(),i={selection:!1,input:!1,scroll:!1},o=t(a))},{capture:!0}),Se(e,window,"selectionchange",()=>{(!r||!pv())&&(i.selection=!0)},{capture:!0}),Se(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),Se(e,window,"pointerup",a=>{if(hv(a)&&o){const c=i;n(o,a,()=>c),o=void 0}},{capture:!0}),Se(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function pv(){const e=window.getSelection();return!e||e.isCollapsed}function hv(e){return e.target instanceof Element&&e.isPrimary!==!1}const gv=3;function B5(e,t){if($5(e))return t.addFrustration("rage_click"),e.some(mv)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration("error_click"),mv(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function $5(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(gv-1);t+=1)if(e[t+gv-1].event.timeStamp-e[t].event.timeStamp<=Qe)return!0;return!1}const V5='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function mv(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(V5)}const vv=10*Qe,Ki=new Map;function z5(e){const t=Ki.get(e);return Ki.delete(e),t}function yv(e,t){Ki.set(e,t),Ki.forEach((n,r)=>{He(r,Rt())>vv&&Ki.delete(r)})}const H5=5*ct;function j5(e,t,n,r){const i=Nr({expireDelay:H5}),o=new ge;let s;e.subscribe(10,()=>{i.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Dr.UNLOADING&&l()});const{stop:a}=U5(r,{onPointerDown:d=>q5(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},h,p)=>{W5(r,e,t,n,i,o,u,d,h,p,f)}});return{stop:()=>{l(),o.notify(),a()},actionContexts:{findActionId:d=>i.findAll(d)}};function u(d){if(!s||!s.tryAppend(d)){const f=d.clone();s=M5(d,h=>{K5(h,f)})}}function l(){s&&s.stop()}}function q5(e,t,n,r,i){const o=e.enablePrivacyForActionName?Xt(r.target,e.defaultPrivacyLevel):H.ALLOW;if(o===H.HIDDEN)return;const s=G5(r,o,e);let a=!1;return El(t,n,i,e,c=>{a=c.hadActivity},Ym),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function W5(e,t,n,r,i,o,s,a,c,u,l){var d;const f=bv(t,i,u,a,c);s(f);const h=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;h&&yv(c.timeStamp,h);const{stop:p}=El(t,n,r,e,v=>{v.hadActivity&&v.end<f.startClocks.timeStamp?f.discard():v.hadActivity?f.stop(v.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},vv),g=t.subscribe(5,({endClocks:v})=>{f.stop(v.timeStamp)}),m=o.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),p(),m.unsubscribe()})}function G5(e,t,n){const r=e.target.getBoundingClientRect(),i=Gi(e.target,n.actionNameAttribute);i&&yv(e.timeStamp,i);const o=E5(e.target,n,t);return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:i},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:o.name,nameSource:o.nameSource}}function bv(e,t,n,r,i){const o=je(),s=rt(),a=t.add(o,s.relative),c=Km({lifeCycle:e,isChildEvent:p=>p.action!==void 0&&(Array.isArray(p.action.id)?p.action.id.includes(o):p.action.id===o)});let u=0,l;const d=[],f=new ge;function h(p){u===0&&(l=p,u=1,l?a.close(Vu(l)):a.remove(),c.stop(),f.notify())}return{event:i,stop:h,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:n,addFrustration:p=>{d.push(p)},startClocks:s,isStopped:()=>u===1||u===2,clone:()=>bv(e,t,n,r,i),validate:p=>{if(h(),u!==1)return;const{resourceCount:g,errorCount:m,longTaskCount:v}=c.eventCounts,y={duration:l&&He(s.timeStamp,l),startClocks:s,id:o,frustrationTypes:d,counts:{resourceCount:g,errorCount:m,longTaskCount:v},events:p??[i],event:i,...r};e.notify(0,y),u=2},discard:()=>{h(),u=2}}}function K5(e,t){const{isRage:n}=B5(e,t);n?(e.forEach(r=>r.discard()),t.stop(Fe()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function Y5(e,t,n,r,i){e.subscribe(0,a=>e.notify(12,wv(a))),t.register(0,({startTime:a,eventType:c})=>{if(c!=="error"&&c!=="resource"&&c!=="long_task")return;const u=o.findActionId(a);if(u)return{type:c,action:{id:u}}});let o={findActionId:ae},s=ae;return i.trackUserInteractions&&({actionContexts:o,stop:s}=j5(e,n,r,i)),{addAction:a=>{e.notify(12,wv(a))},actionContexts:o,stop:s}}function wv(e){const t=Ls(e)?{action:{id:e.id,loading_time:Gm(G(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:void 0,n=Dt({action:{id:je(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Ls(e)?e.duration:void 0,i=Ls(e)?void 0:e.context,o=Ls(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:i,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:o}}function Ls(e){return e.type!=="custom"}function J5(e){const t=e3([as.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function Z5(e,t){const n=ZT(e,[zi.cspViolation,zi.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function X5(e,t){const n=new ge;return J5(n),WT(n),Z5(t,n),n.subscribe(r=>e.notify(14,{error:r})),Q5(e)}function Q5(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=Dt(t.context,n),e.notify(12,{customerContext:n,...e4(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:o})=>{const s=Rn(t)?kn(t):void 0,a=Jg({stackTrace:s,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:Or.CUSTOM,handling:"handled"});e.notify(14,{customerContext:o,error:a})}}}function e4(e){const t={date:e.startClocks.timeStamp,error:{id:je(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:"error"},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const Ev=new WeakSet;function t4(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!Ev.has(r)).filter(r=>Um(r)&&Bm(r)).filter(r=>n4(r,e.startClocks.relative,Sv({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Ev.add(n[0]),n[0].toJSON()}function Sv(e){return _r(e.startTime,e.duration)}function n4(e,t,n){return e.startTime>=t-1&&Sv(e)<=_r(n,1)}const r4=2*ct;function i4(e){const t=o4(e)||s4(e);if(!(!t||t.traceTime<=kt()-r4))return t.traceId}function o4(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return _v(t&&t.content,n&&n.content)}function s4(e){const t=a4(e);if(t)return _v(Di(t,"trace-id"),Di(t,"trace-time"))}function _v(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function a4(e){for(let t=0;t<e.childNodes.length;t+=1){const n=Cv(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=Cv(n);if(r)return r;if(!Jm(n))break}}function Cv(e){if(e&&f5(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Tv(){if(Zn(fe.NAVIGATION)){const n=performance.getEntriesByType(fe.NAVIGATION)[0];if(n)return n}const e=c4(),t={entryType:fe.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function c4(){const e={},t=performance.timing;for(const n in t)if(Oi(t[n])){const r=n,i=t[r];e[r]=i===0?0:Vu(i)}return e}function u4(e,t,n=Tv){dl(e,"interactive",()=>{const r=n(),i=Object.assign(r.toJSON(),{entryType:fe.RESOURCE,initiatorType:Mm,duration:r.responseEnd,traceId:i4(document),toJSON:()=>({...i,toJSON:void 0})});t(i)})}function l4(e,t,n,r=QI(),i=u4){e.subscribe(8,a=>{s(()=>d4(a,t,n))});const o=Zt(t,{type:fe.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)Y3(c)||s(()=>Iv(c,t))});i(t,a=>{s(()=>Iv(a,t))});function s(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{o.unsubscribe()}}}function d4(e,t,n){const r=t4(e),i=r?ls(r.startTime):e.startClocks,o=f4(e,t);if(!t.trackResources&&!o)return;const s=e.type==="xhr"?"xhr":"fetch",a=r?xv(r):void 0,c=r?Fm(r):h4(n,i,e.duration),u=Dt({date:i.timeStamp,resource:{id:je(),type:s,duration:G(c),method:e.method,status_code:e.status,protocol:r&&$m(r),url:Hm(e.url)?jm(e.url):e.url,delivery_type:r&&Vm(r)},type:"resource",_dd:{discarded:!t.trackResources}},o,a);return{startTime:i.relative,duration:c,rawRumEvent:u,domainContext:{performanceEntry:r,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error,isAborted:e.isAborted,handlingStack:e.handlingStack}}}function Iv(e,t){const n=ls(e.startTime),r=p4(e,t);if(!t.trackResources&&!r)return;const i=K3(e),o=xv(e),s=Fm(e),a=Dt({date:n.timeStamp,resource:{id:je(),type:i,duration:G(s),url:e.name,status_code:g4(e.responseStatus),protocol:$m(e),delivery_type:Vm(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,o);return{startTime:n.relative,duration:s,rawRumEvent:a,domainContext:{performanceEntry:e}}}function xv(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...X3(e),...J3(e)}}}function f4(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function p4(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Im().toString(),rule_psr:t.rulePsr}}}function h4(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function g4(e){return e===0?void 0:e}function m4(e,t,n){const{stop:r,eventCounts:i}=Km({lifeCycle:e,isChildEvent:o=>o.view.id===t,onChange:n});return{stop:r,eventCounts:i}}const v4=10*ct;function y4(e,t,n){return{stop:Zt(e,{type:fe.PAINT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<v4);o&&n(o.startTime)}).unsubscribe}}function b4(e,t,n){const r=Zt(e,{type:fe.FIRST_INPUT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.startTime<t.timeStamp);if(o){const s=He(o.startTime,o.processingStart);let a;o.target&&Ur(o.target)&&(a=Gi(o.target,e.actionNameAttribute)),n({delay:s>=0?s:0,time:o.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function w4(e,t,n=Tv){return _4(e,()=>{const r=n();S4(r)||t(E4(r))})}function E4(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Rt()?e.responseStart:void 0}}function S4(e){return e.loadEventEnd<=0}function _4(e,t){let n;const{stop:r}=dl(e,"complete",()=>{n=Ue(()=>t())});return{stop:()=>{r(),ut(n)}}}const C4=10*ct;function T4(e,t,n,r){let i=1/0;const{stop:o}=dt(e,n,["pointerdown","keydown"],c=>{i=c.timeStamp},{capture:!0,once:!0});let s=0;const a=Zt(e,{type:fe.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const u=RC(c,l=>l.entryType===fe.LARGEST_CONTENTFUL_PAINT&&l.startTime<i&&l.startTime<t.timeStamp&&l.startTime<C4&&l.size>s);if(u){let l;u.element&&(l=Gi(u.element,e.actionNameAttribute)),r({value:u.startTime,targetSelector:l,resourceUrl:I4(u)}),s=u.size}});return{stop:()=>{o(),a.unsubscribe()}}}function I4(e){return e.url===""?void 0:e.url}function Av(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:ae};if(Zn(fe.VISIBILITY_STATE)){const i=performance.getEntriesByType(fe.VISIBILITY_STATE).find(o=>o.name==="hidden");if(i)return{timeStamp:i.startTime,stop:ae}}let n=1/0;const{stop:r}=dt(e,t,["pagehide","visibilitychange"],i=>{(i.type==="pagehide"||document.visibilityState==="hidden")&&(n=i.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function x4(e,t,n){const r={},{stop:i}=w4(e,l=>{t(l.loadEvent),r.navigationTimings=l,n()}),o=Av(e),{stop:s}=y4(e,o,l=>{r.firstContentfulPaint=l,n()}),{stop:a}=T4(e,o,window,l=>{r.largestContentfulPaint=l,n()}),{stop:c}=b4(e,o,l=>{r.firstInput=l,n()});function u(){i(),s(),a(),c(),o.stop()}return{stop:u,initialViewMetrics:r}}function A4(e,t,n){if(!L4())return{stop:ae};let r=0,i;n({value:0});const o=O4(),s=Zt(e,{type:fe.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTime<t)continue;const{cumulatedValue:l,isMaxValue:d}=o.update(u);if(d){const f=k4(u.sources);i={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:He(t,u.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(l>r){r=l;const f=(c=i==null?void 0:i.target)===null||c===void 0?void 0:c.deref();n({value:us(r,4),targetSelector:f&&Gi(f,e.actionNameAttribute),time:i==null?void 0:i.time,previousRect:i!=null&&i.previousRect?kv(i.previousRect):void 0,currentRect:i!=null&&i.currentRect?kv(i.currentRect):void 0,devicePixelRatio:i==null?void 0:i.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function k4(e){return e.find(t=>!!t.node&&Ur(t.node))}function kv({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const R4=5*Qe,P4=Qe;function O4(){let e=0,t,n,r=0;return{update:i=>{const o=t===void 0||i.startTime-n>=P4||i.startTime-t>=R4;let s;return o?(t=n=i.startTime,r=e=i.value,s=!0):(e+=i.value,n=i.startTime,s=i.value>r,s&&(r=i.value)),{cumulatedValue:e,isMaxValue:s}}}}function L4(){return Zn(fe.LAYOUT_SHIFT)&&"WeakRef"in window}let Ns,Rv=0,Il=1/0,xl=0;function N4(){"interactionCount"in performance||Ns||(Ns=new window.PerformanceObserver(Y(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(Il=Math.min(Il,n.interactionId),xl=Math.max(xl,n.interactionId),Rv=(xl-Il)/7+1)})})),Ns.observe({type:"event",buffered:!0,durationThreshold:0}))}const Pv=()=>Ns?Rv:window.performance.interactionCount||0,Ov=10,M4=1*ct;function D4(e,t,n){if(!B4())return{getInteractionToNextPaint:()=>{},setViewEnd:ae,stop:ae};const{getViewInteractionCount:r,stopViewInteractionCount:i}=U4(n);let o=1/0;const s=F4(r);let a=-1,c,u;function l(h){for(const g of h)g.interactionId&&g.startTime>=t&&g.startTime<=o&&s.process(g);const p=s.estimateP98Interaction();p&&p.duration!==a&&(a=p.duration,u=He(t,p.startTime),c=z5(p.startTime),!c&&p.target&&Ur(p.target)&&(c=Gi(p.target,e.actionNameAttribute)))}const d=Zt(e,{type:fe.FIRST_INPUT,buffered:!0}).subscribe(l),f=Zt(e,{type:fe.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,M4),targetSelector:c,time:u};if(r())return{value:0}},setViewEnd:h=>{o=h,i()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function F4(e){const t=[];function n(){t.sort((r,i)=>i.duration-r.duration).splice(Ov)}return{process(r){const i=t.findIndex(s=>r.interactionId===s.interactionId),o=t[t.length-1];i!==-1?r.duration>t[i].duration&&(t[i]=r,n()):(t.length<Ov||r.duration>o.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function U4(e){N4();const t=e==="initial_load"?0:Pv();let n={stopped:!1};function r(){return Pv()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function B4(){return Zn(fe.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function $4(e,t,n,r,i,o,s){let a=i==="initial_load",c=!0;const u=[],l=Av(r);function d(){if(!c&&!a&&u.length>0){const h=Math.max(...u);h<l.timeStamp&&s(h)}}const{stop:f}=El(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&u.push(He(o.timeStamp,h.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:h=>{a&&(a=!1,u.push(h),d())}}}function Lv(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function Al(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let kl;function Nv(e){return kl||(kl=V4(e)),kl}function V4(e){return new ge(t=>{const{throttled:n}=xn(()=>{t.notify(Ms())},200);return Se(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Ms(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const z4=Qe;function H4(e,t,n,r=q4(e)){let i=0,o=0,s=0;const a=r.subscribe(({scrollDepth:c,scrollTop:u,scrollHeight:l})=>{let d=!1;if(c>i&&(i=c,d=!0),l>o){o=l;const f=Rt();s=He(t.relative,f),d=!0}d&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:u,maxScrollHeight:o,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function j4(){const e=Al(),{height:t}=Ms(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function q4(e,t=z4){return new ge(n=>{function r(){n.notify(j4())}if(window.ResizeObserver){const i=xn(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,s=new ResizeObserver(Y(i.throttled));o&&s.observe(o);const a=Se(e,window,"scroll",i.throttled,{passive:!0});return()=>{i.cancel(),s.disconnect(),a.stop()}}})}function W4(e,t,n,r,i,o,s){const a={},{stop:c,setLoadEvent:u}=$4(e,t,n,r,o,s,g=>{a.loadingTime=g,i()}),{stop:l}=H4(r,s,g=>{a.scroll=g}),{stop:d}=A4(r,s.relative,g=>{a.cumulativeLayoutShift=g,i()}),{stop:f,getInteractionToNextPaint:h,setViewEnd:p}=D4(r,s.relative,o);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:p,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const G4=3e3,K4=5*ct,Y4=5*ct;function J4(e,t,n,r,i,o,s,a){const c=new Set;let u=d("initial_load",Cg(),a);f();let l;s&&(l=h(o));function d(p,g,m){const v=Z4(t,n,r,i,e,p,g,m);return c.add(v),v.stopObservable.subscribe(()=>{c.delete(v)}),v}function f(){t.subscribe(10,()=>{u=d("route_change",void 0,{name:u.name,service:u.service,version:u.version,context:u.contextManager.getContext()})}),t.subscribe(9,()=>{u.end({sessionIsActive:!1})})}function h(p){return p.subscribe(({oldLocation:g,newLocation:m})=>{Q4(g,m)&&(u.end(),u=d("route_change"))})}return{addTiming:(p,g=Fe())=>{u.addTiming(p,g)},startView:(p,g)=>{u.end({endClocks:g}),u=d("route_change",g,p)},setViewContext:p=>{u.contextManager.setContext(p)},setViewContextProperty:(p,g)=>{u.contextManager.setContextProperty(p,g)},setViewName:p=>{u.setViewName(p)},getViewContext:()=>u.contextManager.getContext(),stop:()=>{l&&l.unsubscribe(),u.end(),c.forEach(p=>p.stop())}}}function Z4(e,t,n,r,i,o,s=rt(),a){const c=je(),u=new ge,l={};let d=0,f;const h=Mi(i),p=Is();let g=!0,m=a==null?void 0:a.name;const v=(a==null?void 0:a.service)||r.service,y=(a==null?void 0:a.version)||r.version,b=a==null?void 0:a.context;b&&p.setContext(b);const w={id:c,name:m,startClocks:s,service:v,version:y,context:b};e.notify(1,w),e.notify(2,w);const{throttled:C,cancel:_}=xn(re,G4,{leading:!1}),{setLoadEvent:E,setViewEnd:P,stop:T,stopINPTracking:I,getCommonViewMetrics:k}=W4(e,t,n,r,J,o,s),{stop:O,initialViewMetrics:D}=o==="initial_load"?x4(r,E,J):{stop:ae,initialViewMetrics:{}},{stop:F,eventCounts:V}=m4(e,c,J),z=Cr(re,K4),ye=e.subscribe(11,W=>{W.reason===Dr.UNLOADING&&re()});re(),p.changeObservable.subscribe(J);function oe(){e.notify(3,{id:c,name:m,context:p.getContext(),startClocks:s})}function J(){oe(),C()}function re(){_(),oe(),d+=1;const W=f===void 0?Fe():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:c,name:m,service:v,version:y,context:p.getContext(),loadingType:o,location:h,startClocks:s,commonViewMetrics:k(),initialViewMetrics:D,duration:He(s.timeStamp,W),isActive:f===void 0,sessionIsActive:g,eventCounts:V})}return{get name(){return m},service:v,version:y,contextManager:p,stopObservable:u,end(W={}){var ce,te;f||(f=(ce=W.endClocks)!==null&&ce!==void 0?ce:rt(),g=(te=W.sessionIsActive)!==null&&te!==void 0?te:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),fs(z),P(f.relative),T(),ye.unsubscribe(),re(),Ue(()=>{this.stop()},Y4))},stop(){O(),F(),I(),u.notify()},addTiming(W,ce){if(f)return;const te=yC(ce)?ce:He(s.timeStamp,ce);l[X4(W)]=te,J()},setViewName(W){m=W,re()}}}function X4(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&se.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Q4(e,t){return e.pathname!==t.pathname||!ex(t.hash)&&Mv(t.hash)!==Mv(e.hash)}function ex(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Mv(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function tx(e,t,n,r,i,o,s,a,c,u){return e.subscribe(4,l=>e.notify(12,nx(l,n,a))),t.register(0,({startTime:l,eventType:d})=>{const{service:f,version:h,id:p,name:g,context:m}=c.findView(l);return{type:d,service:f,version:h,context:m,view:{id:p,name:g}}}),J4(r,e,i,o,n,s,!n.trackViewsManually,u)}function nx(e,t,n){var r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w;const C=n.getReplayStats(e.id),_=(i=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||i===void 0?void 0:i.devicePixelRatio,E={_dd:{document_version:e.documentVersion,replay_stats:C,cls:_?{device_pixel_ratio:_}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.value,cumulative_layout_shift_time:G((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:G((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:G((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:G((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:G((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:G(e.initialViewMetrics.firstContentfulPaint),first_input_delay:G((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:G((h=e.initialViewMetrics.firstInput)===null||h===void 0?void 0:h.time),first_input_target_selector:(p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.targetSelector,interaction_to_next_paint:G((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.value),interaction_to_next_paint_time:G((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.time),interaction_to_next_paint_target_selector:(v=e.commonViewMetrics.interactionToNextPaint)===null||v===void 0?void 0:v.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:G((y=e.initialViewMetrics.largestContentfulPaint)===null||y===void 0?void 0:y.value),largest_contentful_paint_target_selector:(b=e.initialViewMetrics.largestContentfulPaint)===null||b===void 0?void 0:b.targetSelector,load_event:G((w=e.initialViewMetrics.navigationTimings)===null||w===void 0?void 0:w.loadEvent),loading_time:Gm(G(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:rx(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:G(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:G(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:C?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return $n(e.customTimings)||(E.view.custom_timings=EC(e.customTimings,G)),{rawRumEvent:E,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function rx({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:G(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:G(n)},fid:r&&{duration:G(r.delay),timestamp:G(r.time),target_selector:r.targetSelector},inp:t&&{duration:G(t.value),timestamp:G(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:G(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl}}}const ix="rum";function ox(e,t,n){const r=vI(e,ix,i=>ax(e,i),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:i,newState:o})=>{if(!i.forcedReplay&&o.forcedReplay){const s=r.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:i=>{const o=r.findSession(i);if(!(!o||!Dv(o.trackingType)))return{id:o.id,sessionReplay:o.trackingType==="1"?1:o.isReplayForced?2:0,anonymousId:o.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function sx(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:mm("records")?1:0};return{findTrackedSession:()=>e,expire:ae,expireObservable:new ge,setForcedReplay:ae}}function ax(e,t){let n;return cx(t)?n=t:Tn(e.sessionSampleRate)?Tn(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:Dv(n)}}function cx(e){return e==="0"||e==="1"||e==="2"}function Dv(e){return e==="2"||e==="1"}function ux(e,t,n,r,i,o,s){const a=e.replica,c=FI(e,{endpoint:e.rumEndpointBuilder,encoder:s(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:u=>Dt(u,{application:{id:a.applicationId}}),encoder:s(3)},r,i,o);return t.subscribe(13,u=>{u.type==="view"?c.upsert(u,u.view.id):c.add(u)}),n.subscribe(u=>c.add(u,uI(e))),c}function lx(e){const t=Mr();e.subscribe(13,n=>{t.send("rum",n)})}const dx=zn;function fx(e,t,n,r){const i=Nr({expireDelay:dx});let o;e.subscribe(1,({startClocks:c})=>{const u=r.href;i.add(a({url:u,referrer:o||document.referrer}),c.relative),o=u}),e.subscribe(6,({endClocks:c})=>{i.closeActive(c.relative)});const s=n.subscribe(({newLocation:c})=>{const u=i.find();if(u){const l=Rt();i.closeActive(l),i.add(a({url:c.href,referrer:u.referrer}),l)}});function a({url:c,referrer:u}){return{url:c,referrer:u}}return t.register(0,({startTime:c,eventType:u})=>{const{url:l,referrer:d}=i.find(c);return{type:u,view:{url:l,referrer:d}}}),{findUrl:c=>i.find(c),getAllEntries:()=>i.getAllEntries(),getDeletedEntries:()=>i.getDeletedEntries(),stop:()=>{s.unsubscribe(),i.stop()}}}function px(e,t){let n=Mi(t);return new ge(r=>{const{stop:i}=hx(e,s),{stop:o}=gx(e,s);function s(){if(n.href===t.href)return;const a=Mi(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{i(),o()}})}function hx(e,t){const{stop:n}=lt(Fv("pushState"),"pushState",({onPostCall:o})=>{o(t)}),{stop:r}=lt(Fv("replaceState"),"replaceState",({onPostCall:o})=>{o(t)}),{stop:i}=Se(e,window,"popstate",t);return{stop:()=>{n(),r(),i()}}}function gx(e,t){return Se(e,window,"hashchange",t)}function Fv(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const mx=zn;function vx(e,t,n){const r=Nr({expireDelay:mx});return e.subscribe(1,({startClocks:i})=>{r.add({},i.relative)}),e.subscribe(6,({endClocks:i})=>{r.closeActive(i.relative)}),t.register(0,({startTime:i,eventType:o})=>{if(!n.trackFeatureFlagsForEvents.concat(["view","error"]).includes(o))return;const a=r.find(i);if(!(!a||$n(a)))return{type:o,feature_flags:a}}),{addFeatureFlagEvaluation:(i,o)=>{const s=r.find();s&&(s[i]=o)}}}const yx=10*Qe;let $r,Rl;function bx(e,t,n,r){t.enabled&&Tn(e.customerDataTelemetrySampleRate)&&($v(),Rl=!1,n.subscribe(13,()=>{Rl=!0}),r.subscribe(({bytesCount:o,messagesCount:s})=>{Rl&&($r.batchCount+=1,Bv($r.batchBytesCount,o),Bv($r.batchMessagesCount,s))}),Cr(wx,yx))}function wx(){$r.batchCount!==0&&(dn("Customer data measures",$r),$v())}function Uv(){return{min:1/0,max:0,sum:0}}function Bv(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function $v(){$r={batchCount:0,batchBytesCount:Uv(),batchMessagesCount:Uv()}}const Ex=4e3,Sx=500,_x=zn;function Cx(e,t,n=Sx){const r=Nr({expireDelay:_x,maxEntries:Ex});let i;s(Vv(),Rt());const{stop:o}=dt(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{s(Ix(c),c.timeStamp)},{capture:!0});function s(c,u=Rt()){c!==i&&(i=c,r.closeActive(u),r.add({state:i,startTime:u},u))}function a(c,u,l){return r.findAll(u,l).some(d=>d.state===c)}return e.register(0,({startTime:c,duration:u=0,eventType:l})=>{if(l==="view"){const d=r.findAll(c,u);return{type:l,_dd:{page_states:Tx(d,c,n)}}}if(l==="action"||l==="error")return{type:l,view:{in_foreground:a("active",c,0)}}}),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{o(),r.stop()}}}function Tx(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:i})=>({state:r,start:G(He(t,i))}))}function Ix(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Vv()}function Vv(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function xx(e){let t;const n=requestAnimationFrame(Y(()=>{t=Ms()})),r=Nv(e).subscribe(i=>{t=i}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const Ax=Qe;function kx(e){return new ge(t=>Rx(e,n=>t.notify(n)))}function Rx(e,t){const n=Di(document.cookie,e),r=Cr(()=>{const i=Di(document.cookie,e);i!==n&&t(i)},Ax);return()=>fs(r)}const zv="datadog-ci-visibility-test-execution-id";function Px(e,t=kx(zv)){var n;let r=An(zv)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const i=t.subscribe(o=>{r=o});return e.register(0,({eventType:o})=>{if(typeof r=="string")return{type:o,session:{type:"ci_test"},ci_test:{test_execution_id:r}}}),{stop:()=>{i.unsubscribe()}}}function Ox(e,t){const n=Zt(t,{type:fe.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const i of r){const o=ls(i.startTime),s={date:o.timeStamp,long_task:{id:je(),entry_type:"long-animation-frame",duration:G(i.duration),blocking_duration:G(i.blockingDuration),first_ui_event_timestamp:G(i.firstUIEventTimestamp),render_start:G(i.renderStart),style_and_layout_start:G(i.styleAndLayoutStart),start_time:G(i.startTime),scripts:i.scripts.map(a=>({duration:G(a.duration),pause_duration:G(a.pauseDuration),forced_style_and_layout_duration:G(a.forcedStyleAndLayoutDuration),start_time:G(a.startTime),execution_start:G(a.executionStart),source_url:a.sourceURL,source_function_name:a.sourceFunctionName,source_char_position:a.sourceCharPosition,invoker:a.invoker,invoker_type:a.invokerType,window_attribution:a.windowAttribution}))},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop:()=>n.unsubscribe()}}function Lx(e,t){const n=Zt(t,{type:fe.LONG_TASK,buffered:!0}).subscribe(r=>{for(const i of r){if(i.entryType!==fe.LONG_TASK||!t.trackLongTasks)break;const o=ls(i.startTime),s={date:o.timeStamp,long_task:{id:je(),entry_type:"long-task",duration:G(i.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop(){n.unsubscribe()}}}function Nx(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const i=(e[t]||[]).map(o=>o(n));return Dt(...i)}}}function Mx(e){e.register(0,({eventType:t})=>{const n=f3(),r=p3();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Em()}}})}function Dx(e,t,n){const r=al(e),i=n(r);return Ku(t).forEach(([o,s])=>Pl(e,r,o.split(/\.|(?=\[\])/),s)),i}function Pl(e,t,n,r){const[i,...o]=n;if(i==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>Pl(s,t[a],o,r));return}if(!(!Hv(e)||!Hv(t))){if(o.length>0)return Pl(e[i],t[i],o,r);Fx(e,i,t[i],r)}}function Fx(e,t,n,r){const i=Gn(n);i===r?e[t]=ke(n):r==="object"&&(i==="undefined"||i==="null")&&(e[t]={})}function Hv(e){return Gn(e)==="object"}const Vr={"view.name":"string","view.url":"string","view.referrer":"string"},zr={context:"object"},Ol={service:"string",version:"string"};let jv;function Ux(e,t,n,r,i,o,s,a,c){jv={view:{"view.performance.lcp.resource_url":"string",...zr,...Vr},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...zr,...Vr,...Ol},resource:{"resource.url":"string",...Ss(Wn.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...zr,...Vr,...Ol},action:{"action.target.name":"string",...zr,...Vr,...Ol},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...zr,...Vr},vital:{...zr,...Vr}};const u={error:ll("error",e.eventRateLimiterThreshold,c),action:ll("action",e.eventRateLimiterThreshold,c),vital:ll("vital",e.eventRateLimiterThreshold,c)};t.subscribe(12,({startTime:l,duration:d,rawRumEvent:f,domainContext:h,customerContext:p})=>{const g=i.findView(l),m=o.findUrl(l),v=r.findTrackedSession(l);if(v&&g&&!m&&Ss(Wn.MISSING_URL_CONTEXT_TELEMETRY)&&dn("Missing URL entry",{debug:{eventType:f.type,startTime:l,urlEntries:o.getAllEntries(),urlDeletedEntries:o.getDeletedEntries(),viewEntries:i.getAllEntries(),viewDeletedEntries:i.getDeletedEntries()}}),v&&g&&m){const y=a(),b={_dd:{format_version:2,drift:mC(),configuration:{session_sample_rate:us(e.sessionSampleRate,3),session_replay_sample_rate:us(e.sessionReplaySampleRate,3)},browser_sdk_version:Yn()?"6.6.3":void 0},application:{id:e.applicationId},date:Fe(),source:"browser",session:{id:v.id,type:"user"},display:s.get(),connectivity:rm(),context:y.context},w=Dt(b,n.triggerHook(0,{eventType:f.type,startTime:l,duration:d}),{context:p},f);"has_replay"in w.session||(w.session.has_replay=y.hasReplay),w.type==="view"&&(w.session.sampled_for_replay=v.sessionReplay===1),v.anonymousId&&!y.user.anonymous_id&&e.trackAnonymousUser&&(y.user.anonymous_id=v.anonymousId),$n(y.user)||(w.usr=y.user),!$n(y.account)&&y.account.id&&(w.account=y.account),Bx(w,e.beforeSend,h,u)&&($n(w.context)&&delete w.context,t.notify(13,w))}})}function Bx(e,t,n,r){var i;if(t){const s=Dx(e,jv[e.type],a=>t(a,n));if(s===!1&&e.type!=="view")return!1;s===!1&&se.warn("Can't dismiss view events using beforeSend!")}return!((i=r[e.type])===null||i===void 0?void 0:i.isLimitReached())}function $x(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function Vx(e,t,n,r,i,o,s){const a=[],c=new j3,u=Nx();c.subscribe(13,pe=>sl("rum",pe));const l=zx(e);l.setContextProvider(()=>{var pe,B;return{application:{id:e.applicationId},session:{id:(pe=p.findTrackedSession())===null||pe===void 0?void 0:pe.id},view:{id:(B=y.findView())===null||B===void 0?void 0:B.id},action:{id:k.findActionId()}}});const d=pe=>{c.notify(14,{error:pe}),dn("Error reported to customer",{"error.message":pe.message})},f=NI(e),h=f.subscribe(pe=>{c.notify(11,pe)});a.push(()=>h.unsubscribe());const p=Yn()?sx():ox(e,c,o);if(Yn())lx(c);else{const pe=ux(e,c,l.observable,d,f,p.expireObservable,i);a.push(()=>pe.stop()),bx(e,l,c,pe.flushObservable)}const g=V3(),m=px(e,location),v=Cx(u,e),y=W3(c),b=fx(c,u,m,location),w=vx(c,u,e),{observable:C,stop:_}=z3();a.push(_);const E=N3(e),P=M3(e),T=D3(e),I=()=>$x(E,P,T,t),{actionContexts:k,addAction:O,stop:D}=Hx(c,u,e,p,v,g,C,b,y,I,d);a.push(D),cI();const{addTiming:F,startView:V,setViewName:z,setViewContext:ye,setViewContextProperty:oe,getViewContext:J,stop:re}=tx(c,u,e,location,g,C,m,t,y,r);a.push(re);const{stop:W}=l4(c,e,v);if(a.push(W),e.trackLongTasks)if(Zn(fe.LONG_ANIMATION_FRAME)){const{stop:pe}=Ox(c,e);a.push(pe)}else Lx(c,e);const{addError:ce}=X5(c,e);e5(c,e,p,I);const te=g3(c,v,s),_e=H3(e.applicationId,p,y,k,b);return a.push(()=>n.stop()),{addAction:O,addError:ce,addTiming:F,addFeatureFlagEvaluation:w.addFeatureFlagEvaluation,startView:V,setViewContext:ye,setViewContextProperty:oe,getViewContext:J,setViewName:z,lifeCycle:c,viewHistory:y,session:p,stopSession:()=>p.expire(),getInternalContext:_e.get,startDurationVital:te.startDurationVital,stopDurationVital:te.stopDurationVital,addDurationVital:te.addDurationVital,globalContext:E,userContext:P,accountContext:T,stop:()=>{a.forEach(pe=>pe())}}}function zx(e){const t=sI("browser-rum-sdk",e);if(Yn()){const n=Mr();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function Hx(e,t,n,r,i,o,s,a,c,u,l){const d=Y5(e,t,o,s,n),f=xx(n),h=Px(t);return Mx(t),Ux(n,e,t,r,c,a,f,u,l),{pageStateHistory:i,addAction:d.addAction,actionContexts:d.actionContexts,stop:()=>{d.stop(),h.stop(),f.stop(),c.stop(),i.stop(),a.stop()}}}function jx(e,{session:t,viewContext:n,errorType:r}){const i=t?t.id:"no-session-id",o=[];r!==void 0&&o.push(`error-type=${r}`),n&&(o.push(`seed=${n.id}`),o.push(`from=${n.startClocks.timeStamp}`));const s=qx(e),a=`/rum/replay/sessions/${i}`;return`${s}${a}?${o.join("&")}`}function qx(e){const t=e.site,n=e.subdomain||Wx(e);return`https://${n?`${n}.`:""}${t}`}function Wx(e){switch(e.site){case qn:case oT:return"app";case qg:return"dd";default:return}}const Gx=1e3;let Pt;function Kx(e){return Ds(e).segments_count}function Yx(e){Ds(e).segments_count+=1}function Jx(e){Ds(e).records_count+=1}function Zx(e,t){Ds(e).segments_total_raw_size+=t}function Xx(e){return Pt==null?void 0:Pt.get(e)}function Ds(e){Pt||(Pt=new Map);let t;return Pt.has(e)?t=Pt.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Pt.set(e,t),Pt.size>Gx&&Qx()),t}function Qx(){if(!Pt)return;const e=Pt.keys().next().value;e&&Pt.delete(e)}function qv(e,t,n){let r=0,i=[],o,s=0;const a=[],{stop:c}=Se(e,t,"message",({data:d})=>{if(d.type!=="wrote"||d.streamId!==n)return;r+=d.additionalBytesCount,i.push(d.result),o=d.trailer;const f=a.shift();f&&f.id===d.id?f.writeCallback?f.writeCallback(d.result.byteLength):f.finishCallback&&f.finishCallback():(c(),dn("Worker responses received out of order."))});function u(){const d=i.length===0?new Uint8Array(0):wC(i.concat(o)),f={rawBytesCount:r,output:d,outputBytesCount:d.byteLength,encoding:"deflate"};return r=0,i=[],f}function l(){s>0&&(t.postMessage({action:"reset",streamId:n}),s=0)}return{isAsync:!0,get isEmpty(){return s===0},write(d,f){t.postMessage({action:"write",id:s,data:d,streamId:n}),a.push({id:s,writeCallback:f,data:d}),s+=1},finish(d){l(),a.length?(a.forEach(f=>{delete f.writeCallback}),a[a.length-1].finishCallback=()=>d(u())):d(u())},finishSync(){l();const d=a.map(f=>(delete f.writeCallback,delete f.finishCallback,f.data)).join("");return{...u(),pendingData:d}},estimateEncodedBytesCount(d){return d.length/8},stop(){c()}}}function Ll({configuredUrl:e,error:t,source:n,scriptType:r}){if(se.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&e6(t.message)){let i;e?i=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:i="Please make sure CSP is correctly configured.",se.error(`${i} See documentation at ${cs}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&cl(t)}function e6(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const t6=30*Qe;function Wv(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([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]),n=new Uint8Array([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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},et=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-J)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=L(s.adler,h,o,l):2===s.state.wrap&&(s.adler=T(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},at=function(t,e){for(var a,n;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},nt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var it=[new rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(et(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)})),new rt(4,4,8,4,at),new rt(4,5,16,8,at),new rt(4,6,32,32,at),new rt(4,4,16,16,nt),new rt(8,16,32,32,nt),new rt(8,16,128,128,nt),new rt(8,32,128,256,nt),new rt(32,128,258,1024,nt),new rt(32,258,258,4096,nt)];function st(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var ht=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=it[e.level].max_lazy,e.good_match=it[e.level].good_length,e.nice_match=it[e.level].nice_length,e.max_chain_length=it[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},lt=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(et(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(et(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):it[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},_t=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},ot=new Uint8Array(256),dt=0;dt<256;dt++)ot[dt]=dt>=252?6:dt>=248?5:dt>=240?4:dt>=224?3:dt>=192?2:1;ot[254]=ot[254]=1;var ut=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ft=Object.prototype.toString;function ct(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new st;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,ht(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ft.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,et(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,et(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function pt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function gt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}ct.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ft.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=lt(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=_t(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},ct.prototype.onData=function(t){this.chunks.push(t)},ct.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",(n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.6.3"};case"write":{let n=e.get(a.streamId);n||(n=new ct,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:gt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){pt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){pt(e,t)}}()})();'])))}let Re={status:0};function Gv(e,t,n,r=Wv){switch(Re.status===0&&n6(e,t,r),Re.status){case 1:return Re.initializationFailureCallbacks.push(n),Re.worker;case 3:return Re.worker}}function Kv(){return Re.status}function n6(e,t,n=Wv){try{const r=n(e),{stop:i}=Se(e,r,"error",a=>{Nl(e,t,a)}),{stop:o}=Se(e,r,"message",({data:a})=>{a.type==="errored"?Nl(e,t,a.error,a.streamId):a.type==="initialized"&&i6(a.version)});r.postMessage({action:"init"}),Ue(()=>r6(t),t6),Re={status:1,worker:r,stop:()=>{i(),o()},initializationFailureCallbacks:[]}}catch(r){Nl(e,t,r)}}function r6(e){Re.status===1&&(se.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Re.initializationFailureCallbacks.forEach(t=>t()),Re={status:2})}function i6(e){Re.status===1&&(Re={status:3,worker:Re.worker,stop:Re.stop,version:e})}function Nl(e,t,n,r){Re.status===1||Re.status===0?(Ll({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),Re.status===1&&Re.initializationFailureCallbacks.forEach(i=>i()),Re={status:2}):cl(n,{worker_version:Re.status===3&&Re.version,stream_id:r})}function Yv(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function o6(e,t,n,r){const i=t.findTrackedSession(),o=s6(i,r),s=n.findView();return jx(e,{viewContext:s,errorType:o,session:i})}function s6(e,t){if(!Yv())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function a6(e,t,n,r,i,o){let s=0,a;t.subscribe(9,()=>{(s===2||s===3)&&(l(),s=1)}),t.subscribe(10,()=>{s===1&&u()});const c=async()=>{const[d]=await Promise.all([i(),$I(e,"interactive")]);if(s!==2)return;const f=o();if(!f||!d){s=0;return}({stop:a}=d(t,e,n,r,f)),s=3};function u(d){const f=n.findTrackedSession();if(c6(f,d)){s=1;return}u6(s)||(s=2,c().catch(ln),l6(f,d)&&n.setForcedReplay())}function l(){s===3&&(a==null||a()),s=0}return{start:u,stop:l,getSessionReplayLink(){return o6(e,n,r,s!==0)},isRecording:()=>s===3}}function c6(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function u6(e){return e===2||e===3}function l6(e,t){return t&&t.force&&e.sessionReplay===0}function d6(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:ae},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function f6(e,t){if(Yn()&&!mm("records")||!Yv())return{start:ae,stop:ae,getReplayStats:()=>{},onRumStart:ae,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=d6();return{start:o=>n.start(o),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:i,isRecording:()=>Kv()===3&&n.isRecording(),getReplayStats:o=>Kv()===3?Xx(o):void 0};function i(o,s,a,c,u){let l;function d(){return l||(u??(u=Gv(s,"Datadog Session Replay",()=>{n.stop()},t)),u&&(l=qv(s,u,1))),l}n=a6(s,o,a,c,e,d),r(s)&&n.start()}}async function p6(e=h6){try{return await e()}catch(t){Ll({error:t,source:"Recorder",scriptType:"module"})}}async function h6(){return(await Promise.resolve().then(()=>e8)).startRecording}function g6(){return Jt().Profiler!==void 0}async function m6(e=v6){try{return await e()}catch(t){Ll({error:t,source:"Profiler",scriptType:"module"})}}async function v6(){return(await Promise.resolve().then(()=>h8)).createRumProfiler}function y6(){let e;function t(n,r,i,o){!g6()||!Tn(r.profilingSampleRate)||m6().then(s=>{if(!s){dn("[DD_RUM] Failed to lazy load the RUM Profiler");return}e=s(r,n,i),e.start(o.findView())}).catch(ln)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(ln)}}}const b6=f6(p6),w6=y6(),St=B3(Vx,b6,w6,{startDeflateWorker:Gv,createDeflateEncoder:qv});JT(Jt(),"DD_RUM",St);const Jr=class Jr{init(){if(Jr.isInitialized){console.info("Tracker [DD]: already initialized");return}St.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:Ye.getRuntimeConfig().MODE,version:Ye.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),St.startView({name:"ap_cl_view_mounted"}),St.startSessionReplayRecording(),Jr.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){St==null||St.addAction(t,n||{})}trackError(t,n){St==null||St.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof St.stopSessionReplayRecording=="function"&&St.stopSessionReplayRecording(),St.addAction("ap_cl_view_unmounted",{reason:"component_destroyed"}),Jr.isInitialized=!1}filterEvents(t){var n,r,i;return!!(t.type==="view"&&((n=t.view.name)!=null&&n.startsWith("ap_cl_"))||t.type==="action"&&typeof((r=t.action.target)==null?void 0:r.name)=="string"&&t.action.target.name.startsWith("ap_cl_")||t.type==="error"&&((i=t.error)==null?void 0:i.source)==="custom")}};S(Jr,"isInitialized",!1);let Ml=Jr,Hr=[];class qe{static init(t){if(!t){console.info("Tracking disabled");return}Hr=[new Ml],Hr.forEach(n=>n.init())}static trackEvent(t,n){Hr.forEach(r=>r.track(t,n))}static trackError(t,n){Hr.forEach(r=>r.trackError(t,n))}static destroy(){Hr.forEach(t=>t.destroy()),Hr=[]}}const $e=class $e{static init(t,n){if(!t)throw console.error('AstroPay Payments Library: Missing "app-id". Call init function first.'),new Error("app-id is required for authentication.");if($e.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}$e.token=t,qe.init((n==null?void 0:n.tracking)??!0),Ri.init(),Z.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),q.init({language:(n==null?void 0:n.language)??"en"}),Ye.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),Bt.init({appName:"ap-cl",baseURL:Ye.getRuntimeConfig().API_BASE_URL,timeout:5e3}),qe.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),$e.isInitialized=!0}static registerComponent(t){$e.components.add(t)}static unregisterComponent(t){$e.components.delete(t)}static getToken(){if(!$e.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return $e.token}static destroy(){$e.isInitialized&&($e.components.forEach(t=>t.destroy()),$e.components.clear(),$e.isInitialized=!1,qe.destroy(),$e.token="")}static isLibInitialized(){return $e.isInitialized}};S($e,"isInitialized",!1),S($e,"token"),S($e,"components",new Set);let Ft=$e;function Jv(e,t){return function(){return e.apply(t,arguments)}}const{toString:E6}=Object.prototype,{getPrototypeOf:Dl}=Object,{iterator:Fs,toStringTag:Zv}=Symbol,Us=(e=>t=>{const n=E6.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ut=e=>(e=e.toLowerCase(),t=>Us(t)===e),Bs=e=>t=>typeof t===e,{isArray:jr}=Array,qr=Bs("undefined");function Yi(e){return e!==null&&!qr(e)&&e.constructor!==null&&!qr(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xv=Ut("ArrayBuffer");function S6(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xv(e.buffer),t}const _6=Bs("string"),ft=Bs("function"),Qv=Bs("number"),Ji=e=>e!==null&&typeof e=="object",C6=e=>e===!0||e===!1,$s=e=>{if(Us(e)!=="object")return!1;const t=Dl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zv in e)&&!(Fs in e)},T6=e=>{if(!Ji(e)||Yi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},I6=Ut("Date"),x6=Ut("File"),A6=Ut("Blob"),k6=Ut("FileList"),R6=e=>Ji(e)&&ft(e.pipe),P6=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=Us(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},O6=Ut("URLSearchParams"),[L6,N6,M6,D6]=["ReadableStream","Request","Response","Headers"].map(Ut),F6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Yi(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function e0(e,t){if(Yi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,t0=e=>!qr(e)&&e!==Xn;function Fl(){const{caseless:e,skipUndefined:t}=t0(this)&&this||{},n={},r=(i,o)=>{const s=e&&e0(n,o)||o;$s(n[s])&&$s(i)?n[s]=Fl(n[s],i):$s(i)?n[s]=Fl({},i):jr(i)?n[s]=i.slice():(!t||!qr(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Zi(arguments[i],r);return n}const U6=(e,t,n,{allOwnKeys:r}={})=>(Zi(t,(i,o)=>{n&&ft(i)?e[o]=Jv(i,n):e[o]=i},{allOwnKeys:r}),e),B6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$6=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},V6=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Dl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},z6=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},H6=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},j6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Dl(Uint8Array)),q6=(e,t)=>{const r=(e&&e[Fs]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},W6=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},G6=Ut("HTMLFormElement"),K6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),n0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Y6=Ut("RegExp"),r0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zi(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},J6=e=>{r0(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ft(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Z6=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},X6=()=>{},Q6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eA(e){return!!(e&&ft(e.append)&&e[Zv]==="FormData"&&e[Fs])}const tA=e=>{const t=new Array(10),n=(r,i)=>{if(Ji(r)){if(t.indexOf(r)>=0)return;if(Yi(r))return r;if(!("toJSON"in r)){t[i]=r;const o=jr(r)?[]:{};return Zi(r,(s,a)=>{const c=n(s,i+1);!qr(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},nA=Ut("AsyncFunction"),rA=e=>e&&(Ji(e)||ft(e))&&ft(e.then)&&ft(e.catch),i0=((e,t)=>e?setImmediate:t?((n,r)=>(Xn.addEventListener("message",({source:i,data:o})=>{i===Xn&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Xn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ft(Xn.postMessage)),iA=typeof queueMicrotask<"u"?queueMicrotask.bind(Xn):typeof process<"u"&&process.nextTick||i0,x={isArray:jr,isArrayBuffer:Xv,isBuffer:Yi,isFormData:P6,isArrayBufferView:S6,isString:_6,isNumber:Qv,isBoolean:C6,isObject:Ji,isPlainObject:$s,isEmptyObject:T6,isReadableStream:L6,isRequest:N6,isResponse:M6,isHeaders:D6,isUndefined:qr,isDate:I6,isFile:x6,isBlob:A6,isRegExp:Y6,isFunction:ft,isStream:R6,isURLSearchParams:O6,isTypedArray:j6,isFileList:k6,forEach:Zi,merge:Fl,extend:U6,trim:F6,stripBOM:B6,inherits:$6,toFlatObject:V6,kindOf:Us,kindOfTest:Ut,endsWith:z6,toArray:H6,forEachEntry:q6,matchAll:W6,isHTMLForm:G6,hasOwnProperty:n0,hasOwnProp:n0,reduceDescriptors:r0,freezeMethods:J6,toObjectSet:Z6,toCamelCase:K6,noop:X6,toFiniteNumber:Q6,findKey:e0,global:Xn,isContextDefined:t0,isSpecCompliantForm:eA,toJSONObject:tA,isAsyncFn:nA,isThenable:rA,setImmediate:i0,asap:iA,isIterable:e=>e!=null&&ft(e[Fs])};function K(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}x.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});const o0=K.prototype,s0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s0[e]={value:e}}),Object.defineProperties(K,s0),Object.defineProperty(o0,"isAxiosError",{value:!0}),K.from=(e,t,n,r,i,o)=>{const s=Object.create(o0);x.toFlatObject(e,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return K.call(s,a,c,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const oA=null;function Ul(e){return x.isPlainObject(e)||x.isArray(e)}function a0(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function c0(e,t,n){return e?e.concat(t).map(function(i,o){return i=a0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function sA(e){return x.isArray(e)&&!e.some(Ul)}const aA=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Vs(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!x.isUndefined(m[g])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(x.isDate(p))return p.toISOString();if(x.isBoolean(p))return p.toString();if(!c&&x.isBlob(p))throw new K("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(p)||x.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,g,m){let v=p;if(p&&!m&&typeof p=="object"){if(x.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(x.isArray(p)&&sA(p)||(x.isFileList(p)||x.endsWith(g,"[]"))&&(v=x.toArray(p)))return g=a0(g),v.forEach(function(b,w){!(x.isUndefined(b)||b===null)&&t.append(s===!0?c0([g],w,o):s===null?g:g+"[]",u(b))}),!1}return Ul(p)?!0:(t.append(c0(m,g,o),u(p)),!1)}const d=[],f=Object.assign(aA,{defaultVisitor:l,convertValue:u,isVisitable:Ul});function h(p,g){if(!x.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),x.forEach(p,function(v,y){(!(x.isUndefined(v)||v===null)&&i.call(t,v,x.isString(y)?y.trim():y,g,f))===!0&&h(v,g?g.concat(y):[y])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return h(e),t}function u0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Bl(e,t){this._pairs=[],e&&Vs(e,this,t)}const l0=Bl.prototype;l0.append=function(t,n){this._pairs.push([t,n])},l0.toString=function(t){const n=t?function(r){return t.call(this,r,u0)}:u0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function cA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function d0(e,t,n){if(!t)return e;const r=n&&n.encode||cA;x.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new Bl(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class f0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const p0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Bl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},$l=typeof window<"u"&&typeof document<"u",Vl=typeof navigator=="object"&&navigator||void 0,lA=$l&&(!Vl||["ReactNative","NativeScript","NS"].indexOf(Vl.product)<0),dA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fA=$l&&window.location.href||"http://localhost",et={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$l,hasStandardBrowserEnv:lA,hasStandardBrowserWebWorkerEnv:dA,navigator:Vl,origin:fA},Symbol.toStringTag,{value:"Module"})),...uA};function pA(e,t){return Vs(e,new et.classes.URLSearchParams,{visitor:function(n,r,i,o){return et.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hA(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gA(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function h0(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=gA(i[s])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,i)=>{t(hA(r),i,n,0)}),n}return null}function mA(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Xi={transitional:p0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(h0(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pA(t,this.formSerializer).toString();if((a=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Vs(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),mA(t)):t}],transformResponse:[function(t){const n=this.transitional||Xi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?K.from(a,K.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Xi.headers[e]={}});const vA=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yA=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
559
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&vA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},g0=Symbol("internals");function Qi(e){return e&&String(e).trim().toLowerCase()}function zs(e){return e===!1||e==null?e:x.isArray(e)?e.map(zs):String(e)}function bA(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const wA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zl(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function EA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function SA(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let pt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,u){const l=Qi(c);if(!l)throw new Error("header name must be a non-empty string");const d=x.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||c]=zs(a))}const s=(a,c)=>x.forEach(a,(u,l)=>o(u,l,c));if(x.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(x.isString(t)&&(t=t.trim())&&!wA(t))s(yA(t),n);else if(x.isObject(t)&&x.isIterable(t)){let a={},c,u;for(const l of t){if(!x.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?x.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}s(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Qi(t),t){const r=x.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bA(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qi(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Qi(s),s){const a=x.findKey(r,s);a&&(!n||zl(r,r[a],a,n))&&(delete r[a],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||zl(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return x.forEach(this,(i,o)=>{const s=x.findKey(r,o);if(s){n[s]=zs(i),delete n[o];return}const a=t?EA(o):String(o).trim();a!==o&&delete n[o],n[a]=zs(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
560
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[g0]=this[g0]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Qi(s);r[a]||(SA(i,s),r[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(pt);function Hl(e,t){const n=this||Xi,r=t||n,i=pt.from(r.headers);let o=r.data;return x.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function m0(e){return!!(e&&e.__CANCEL__)}function Wr(e,t,n){K.call(this,e??"canceled",K.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(Wr,K,{__CANCEL__:!0});function v0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _A(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function CA(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[o];s||(s=u),n[i]=c,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const h=l&&u-l;return h?Math.round(f*1e3/h):void 0}}function TA(e,t){let n=0,r=1e3/t,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-d)))},()=>i&&s(i)]}const Hs=(e,t,n=3)=>{let r=0;const i=CA(50,250);return TA(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),l=s<=a;r=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},b0=e=>(...t)=>x.asap(()=>e(...t)),IA=et.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,xA=et.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),x.isString(r)&&s.push("path="+r),x.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function AA(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function w0(e,t,n){let r=!AA(t);return e&&(r||n==!1)?kA(e,t):t}const E0=e=>e instanceof pt?{...e}:e;function Qn(e,t){t=t||{};const n={};function r(u,l,d,f){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:f},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function i(u,l,d,f){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u,d,f)}else return r(u,l,d,f)}function o(u,l){if(!x.isUndefined(l))return r(void 0,l)}function s(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,l,d)=>i(E0(u),E0(l),d,!0)};return x.forEach(Object.keys({...e,...t}),function(l){const d=c[l]||i,f=d(e[l],t[l],l);x.isUndefined(f)&&d!==a||(n[l]=f)}),n}const S0=e=>{const t=Qn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=pt.from(s),t.url=d0(w0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),x.isFormData(n)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(x.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&s.set(l,d)})}}if(et.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&IA(t.url))){const c=i&&o&&xA.read(o);c&&s.set(i,c)}return t},RA=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=S0(e);let o=i.data;const s=pt.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,l,d,f,h,p;function g(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const b=pt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:e,request:m};v0(function(E){n(E),g()},function(E){r(E),g()},C),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(r(new K("Request aborted",K.ECONNABORTED,e,m)),m=null)},m.onerror=function(w){const C=w&&w.message?w.message:"Network Error",_=new K(C,K.ERR_NETWORK,e,m);_.event=w||null,r(_),m=null},m.ontimeout=function(){let w=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||p0;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new K(w,C.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&x.forEach(s.toJSON(),function(w,C){m.setRequestHeader(C,w)}),x.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),u&&([f,p]=Hs(u,!0),m.addEventListener("progress",f)),c&&m.upload&&([d,h]=Hs(c),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(l=b=>{m&&(r(!b||b.type?new Wr(null,e,m):b),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const y=_A(i.url);if(y&&et.protocols.indexOf(y)===-1){r(new K("Unsupported protocol "+y+":",K.ERR_BAD_REQUEST,e));return}m.send(o||null)})},PA=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof K?l:new Wr(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,o(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>x.asap(a),c}},OA=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},LA=async function*(e,t){for await(const n of NA(e))yield*OA(n,t)},NA=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},_0=(e,t,n,r)=>{const i=LA(e,t);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){a(),c.close();return}let d=l.byteLength;if(n){let f=o+=d;n(f)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},C0=64*1024,{isFunction:js}=x,MA=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:T0,TextEncoder:I0}=x.global,x0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},DA=e=>{e=x.merge.call({skipUndefined:!0},MA,e);const{fetch:t,Request:n,Response:r}=e,i=t?js(t):typeof fetch=="function",o=js(n),s=js(r);if(!i)return!1;const a=i&&js(T0),c=i&&(typeof I0=="function"?(p=>g=>p.encode(g))(new I0):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&x0(()=>{let p=!1;const g=new n(et.origin,{body:new T0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),l=s&&a&&x0(()=>x.isReadableStream(new r("").body)),d={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(g,m)=>{let v=g&&g[p];if(v)return v.call(g);throw new K(`Response type '${p}' is not supported`,K.ERR_NOT_SUPPORT,m)})});const f=async p=>{if(p==null)return 0;if(x.isBlob(p))return p.size;if(x.isSpecCompliantForm(p))return(await new n(et.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(x.isArrayBufferView(p)||x.isArrayBuffer(p))return p.byteLength;if(x.isURLSearchParams(p)&&(p=p+""),x.isString(p))return(await c(p)).byteLength},h=async(p,g)=>{const m=x.toFiniteNumber(p.getContentLength());return m??f(g)};return async p=>{let{url:g,method:m,data:v,signal:y,cancelToken:b,timeout:w,onDownloadProgress:C,onUploadProgress:_,responseType:E,headers:P,withCredentials:T="same-origin",fetchOptions:I}=S0(p),k=t||fetch;E=E?(E+"").toLowerCase():"text";let O=PA([y,b&&b.toAbortSignal()],w),D=null;const F=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let V;try{if(_&&u&&m!=="get"&&m!=="head"&&(V=await h(P,v))!==0){let W=new n(g,{method:"POST",body:v,duplex:"half"}),ce;if(x.isFormData(v)&&(ce=W.headers.get("content-type"))&&P.setContentType(ce),W.body){const[te,_e]=y0(V,Hs(b0(_)));v=_0(W.body,C0,te,_e)}}x.isString(T)||(T=T?"include":"omit");const z=o&&"credentials"in n.prototype,ye={...I,signal:O,method:m.toUpperCase(),headers:P.normalize().toJSON(),body:v,duplex:"half",credentials:z?T:void 0};D=o&&new n(g,ye);let oe=await(o?k(D,I):k(g,ye));const J=l&&(E==="stream"||E==="response");if(l&&(C||J&&F)){const W={};["status","statusText","headers"].forEach(pe=>{W[pe]=oe[pe]});const ce=x.toFiniteNumber(oe.headers.get("content-length")),[te,_e]=C&&y0(ce,Hs(b0(C),!0))||[];oe=new r(_0(oe.body,C0,te,()=>{_e&&_e(),F&&F()}),W)}E=E||"text";let re=await d[x.findKey(d,E)||"text"](oe,p);return!J&&F&&F(),await new Promise((W,ce)=>{v0(W,ce,{data:re,headers:pt.from(oe.headers),status:oe.status,statusText:oe.statusText,config:p,request:D})})}catch(z){throw F&&F(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new K("Network Error",K.ERR_NETWORK,p,D),{cause:z.cause||z}):K.from(z,z&&z.code,p,D)}}},FA=new Map,A0=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,c,u,l=FA;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:DA(t)),l=u;return u};A0();const jl={http:oA,xhr:RA,fetch:{get:A0}};x.forEach(jl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const k0=e=>`- ${e}`,UA=e=>x.isFunction(e)||e===null||e===!1,R0={getAdapter:(e,t)=>{e=x.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!UA(r)&&(i=jl[(a=String(r)).toLowerCase()],i===void 0))throw new K(`Unknown adapter '${a}'`);if(i&&(x.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
561
|
+
`+s.map(k0).join(`
|
|
562
|
+
`):" "+k0(s[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:jl};function ql(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wr(null,e)}function P0(e){return ql(e),e.headers=pt.from(e.headers),e.data=Hl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),R0.getAdapter(e.adapter||Xi.adapter,e)(e).then(function(r){return ql(e),r.data=Hl.call(e,e.transformResponse,r),r.headers=pt.from(r.headers),r},function(r){return m0(r)||(ql(e),r&&r.response&&(r.response.data=Hl.call(e,e.transformResponse,r.response),r.response.headers=pt.from(r.response.headers))),Promise.reject(r)})}const O0="1.12.2",qs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const L0={};qs.transitional=function(t,n,r){function i(o,s){return"[Axios v"+O0+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new K(i(s," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!L0[s]&&(L0[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}},qs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function BA(e,t,n){if(typeof e!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new K("option "+o+" must be "+c,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+o,K.ERR_BAD_OPTION)}}const Ws={assertOptions:BA,validators:qs},Qt=Ws.validators;let er=class{constructor(t){this.defaults=t||{},this.interceptors={request:new f0,response:new f0}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
563
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Qn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ws.assertOptions(r,{silentJSONParsing:Qt.transitional(Qt.boolean),forcedJSONParsing:Qt.transitional(Qt.boolean),clarifyTimeoutError:Qt.transitional(Qt.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:Ws.assertOptions(i,{encode:Qt.function,serialize:Qt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ws.assertOptions(n,{baseUrl:Qt.spelling("baseURL"),withXsrfToken:Qt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=pt.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,d=0,f;if(!c){const p=[P0.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,l=Promise.resolve(n);d<f;)l=l.then(p[d++],p[d++]);return l}f=a.length;let h=n;for(;d<f;){const p=a[d++],g=a[d++];try{h=p(h)}catch(m){g.call(this,m);break}}try{l=P0.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=Qn(this.defaults,t);const n=w0(t.baseURL,t.url,t.allowAbsoluteUrls);return d0(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){er.prototype[t]=function(n,r){return this.request(Qn(r||{},{method:t,url:n,data:(r||{}).data}))}}),x.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(Qn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}er.prototype[t]=n(),er.prototype[t+"Form"]=n(!0)});let $A=class $1{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Wr(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $1(function(i){t=i}),cancel:t}}};function VA(e){return function(n){return e.apply(null,n)}}function zA(e){return x.isObject(e)&&e.isAxiosError===!0}const Wl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wl).forEach(([e,t])=>{Wl[t]=e});function N0(e){const t=new er(e),n=Jv(er.prototype.request,t);return x.extend(n,er.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return N0(Qn(e,i))},n}const Pe=N0(Xi);Pe.Axios=er,Pe.CanceledError=Wr,Pe.CancelToken=$A,Pe.isCancel=m0,Pe.VERSION=O0,Pe.toFormData=Vs,Pe.AxiosError=K,Pe.Cancel=Pe.CanceledError,Pe.all=function(t){return Promise.all(t)},Pe.spread=VA,Pe.isAxiosError=zA,Pe.mergeConfig=Qn,Pe.AxiosHeaders=pt,Pe.formToJSON=e=>h0(x.isHTMLForm(e)?new FormData(e):e),Pe.getAdapter=R0.getAdapter,Pe.HttpStatusCode=Wl,Pe.default=Pe;const{Axios:R8,AxiosError:P8,CanceledError:O8,isCancel:L8,CancelToken:N8,VERSION:M8,all:D8,Cancel:F8,isAxiosError:U8,spread:B8,toFormData:$8,AxiosHeaders:V8,HttpStatusCode:z8,formToJSON:H8,getAdapter:j8,mergeConfig:q8}=Pe,eo=(e,t)=>{const n=Ye.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},ve=class ve{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};S(ve,"axiosInstance"),S(ve,"config"),S(ve,"init",t=>{ve.config=t,ve.axiosInstance=Pe.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":q.getCurrent(),...t.headers}}),ve.setupInterceptors()}),S(ve,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i,...n}};return await ve.getAxiosInstance().get(o,s)}),S(ve,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ve.getAxiosInstance().post(o,n,s)}),S(ve,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i}};return await ve.getAxiosInstance().put(o,n,s)}),S(ve,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ve.getAxiosInstance().patch(o,n,s)}),S(ve,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i,...n}};return await ve.getAxiosInstance().delete(o,s)}),S(ve,"setupInterceptors",()=>{ve.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:ve.getEncodeParams()}:t.params=r,t.data&&(t.data=Zs(t.data,"camelCase-to-snake_case")),t}),ve.axiosInstance.interceptors.response.use(t=>ve.handleResponse(t),t=>ve.handleError(t))}),S(ve,"handleResponse",t=>{const n=t.status===202,r=Zs(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),S(ve,"handleError",t=>{var i;const n=Zs((i=t.response)==null?void 0:i.data,"snake_case-to-camelCase"),r={error:(n==null?void 0:n.error)||"UNKNOWN_ERROR",internalTerm:n==null?void 0:n.internalTerm,message:(n==null?void 0:n.message)||q.translate("generic_error"),description:n==null?void 0:n.description};return Promise.reject(r)}),S(ve,"getEncodeParams",()=>{const t={app_name:ve.config.appName,app_id:Ft.getToken(),environment:Ye.getEnvironment(),platform:ff(),version:Ye.getRuntimeConfig().VERSION};return xd(t)});let Bt=ve;const Gr={createPayment:"/v1/web/payments",paymentDetails:"/v1/web/payments/:paymentExternalId/detail",identifyUser:"/v1/web/payments/:paymentExternalId/identify-user",paymentStatus:"/v1/web/payments/:paymentExternalId/status",paymentMethodDetail:"/v1/web/payments/:paymentExternalId/payment-methods/:methodCode",pciToken:"v1/web/payments/pci/token"};class M0{}S(M0,"getPciToken",async t=>{try{return await Bt.POST({url:Gr.pciToken,data:t})}catch(n){return qe.trackError(n),Promise.reject(n)}});const HA=e=>{if(!e)return"";const n=e.replace(/\s+/g,"").split("/");if(n.length!==2)return"";let[r,i]=n;if(r.length===1&&(r="0"+r),i.length===2){const o=new Date().getFullYear(),s=Math.floor(o/100)*100;i=String(s+Number(i))}return`${r}/${i}`},jA="v1.1.3";class qA{constructor(t,n){S(this,"collector");S(this,"form");S(this,"fields");S(this,"callback");this.fields=t,this.callback=n}async init(t){try{const n=await a2({environment:this.getCardEnvironment(),version:jA});this.collector=n.initCollector(),this.form=this.collector.createForm(r=>{if(this.callback){const i=Object.entries(r).reduce((o,[s,a])=>(o[s]={isValid:a.isValid||!a.isDirty&&!a.isTouched,isTouched:a.isTouched||a.isDirty},o),{});this.callback(i)}}),this.fields.forEach(({field:r,...i})=>{this.form.field(r,i)}),t==null||t()}catch(n){throw console.error(n),n}}async tokenizeCard(t,n,r){try{const{accessToken:i}=await M0.getPciToken(t);return this.form.accessToken=i,await new Promise(o=>{this.form.submit(s=>{const a={cardNumberTkn:s.card_number.value,cvvToken:s.card_cvc.value,holderName:s.card_holder.value,expirationDate:HA(s.card_exp.value),firstSixDigits:s.card_number.details.bin.substring(0,6),lastFourDigits:s.card_number.details.lastFour,brand:s.card_number.details.brand||"unknown"};n(a),o()},()=>{r(new Error(q.translate("card_tokenization_error")))})})}catch{r(new Error(q.translate("generic_error")))}}unmount(){var t;(t=this.form)==null||t.tearDown()}getCardEnvironment(){return Ye.getEnvironment()==="production"?"production":"sandbox"}}var D0=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e))(D0||{});class We{}S(We,"postCreatePayment",async(t,n)=>{try{const r=await Bt.POST({data:t,url:Gr.createPayment});return qe.trackEvent("ap_cl_payment_created",{...t,initializer:n}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"getPaymentDetails",async(t,n)=>{try{const r=await Bt.GET({url:si(Gr.paymentDetails,{paymentExternalId:t})});return qe.trackEvent("ap_cl_payment_details",{paymentExternalId:t,initializer:n}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"postIdentifyUser",async(t,n)=>{try{const r=await Bt.POST({data:n,url:si(Gr.identifyUser,{paymentExternalId:t})});return qe.trackEvent("ap_cl_user_identified",{hasAccount:r.user.hasAccount,user:r.user.otherUserData}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"getPaymentStatus",async t=>{try{return await Bt.GET({url:si(Gr.paymentStatus,{paymentExternalId:t})})}catch(n){return Promise.reject(n)}}),S(We,"getPollingRequest",async t=>{try{const n=t.replace(/^\/?api\//,"");return await Bt.GET({url:n})}catch(n){return Promise.reject(n)}}),S(We,"postGenericPayment",async(t,n,r)=>{try{const i=t.replace(/^\/?api\//,"");return await Bt.POST({url:si(i,{paymentExternalId:n}),data:r})}catch(i){return Promise.reject(i)}});var On=(e=>(e.ACCEPTED="ACCEPTED",e.FINISHED="FINISHED",e))(On||{});class F0{}S(F0,"getPaymentMethodDetail",async t=>{try{return await Bt.GET({url:si(Gr.paymentMethodDetail,{paymentExternalId:t.paymentExternalId,methodCode:t.methodCode})})}catch(n){return Promise.reject(n)}});class Gl{constructor(t,n,r,i){S(this,"pollingTimeout",null);S(this,"isPollingActive",!1);S(this,"remainingAttempts");this.pollingAcceptedData=t,this.onWaitingInfo=n,this.onFinished=r,this.onError=i,this.remainingAttempts=t.pollingMetadata.remainingHits,this.validatePollingData()}startPolling(){var t;if(this.pollingAcceptedData.pollingMetadata.remainingHits<=0){this.onError(new Error("Polling attempts exhausted"));return}this.isPollingActive=!0,(t=this.pollingAcceptedData.waitingInfo)!=null&&t.text&&this.onWaitingInfo&&this.onWaitingInfo(this.pollingAcceptedData.waitingInfo.text),this.executePoll()}stopPolling(){this.isPollingActive=!1,this.pollingTimeout&&(clearTimeout(this.pollingTimeout),this.pollingTimeout=null)}validatePollingData(){if(!this.pollingAcceptedData.pollingMetadata.pollingUrl)throw new Error("Invalid polling URL");if(this.pollingAcceptedData.pollingMetadata.nextHitIn<=0)throw new Error("Invalid polling interval")}executePoll(){this.isPollingActive&&(this.pollingTimeout=setTimeout(()=>{this.handlePolling().catch(t=>{this.onError(t),this.stopPolling()})},this.getPollingInterval()))}async handlePolling(){const t=await We.getPollingRequest(this.pollingAcceptedData.pollingMetadata.pollingUrl);t.statusCode===202&&t.pollingStatus===On.ACCEPTED?this.handleAccepted(t):this.handleFinished(t)}handleAccepted(t){if(this.isPollingActive){if(this.remainingAttempts=t.pollingMetadata.remainingHits,this.pollingAcceptedData=t,this.remainingAttempts<=0){const n=t.timeoutInfo.text;this.stopPolling(),this.onError(new Error(n));return}this.executePoll()}}handleFinished(t){this.stopPolling(),this.onFinished(t)}getPollingInterval(){return this.pollingAcceptedData.pollingMetadata.nextHitIn}}const Gs=(e,t)=>({fontSize:"16px",lineHeight:"24px",color:e,backgroundColor:t}),WA=(e,{error:t=!1,disabled:n=!1})=>ne`
|
|
552
564
|
display: flex;
|
|
553
565
|
flex-direction: column;
|
|
554
566
|
gap: 12px;
|
|
@@ -598,10 +610,10 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
598
610
|
|
|
599
611
|
caret-color: ${e.textColor};
|
|
600
612
|
|
|
601
|
-
color: ${
|
|
602
|
-
border-radius: ${
|
|
603
|
-
background-color: ${
|
|
604
|
-
border: ${
|
|
613
|
+
color: ${he().textColor};
|
|
614
|
+
border-radius: ${he().borderRadius}px;
|
|
615
|
+
background-color: ${he().backgroundColor};
|
|
616
|
+
border: ${he().borderWidth}px solid ${he().borderColor};
|
|
605
617
|
|
|
606
618
|
:hover {
|
|
607
619
|
background-color: ${t||n?void 0:e.input.focus.backgroundColor};
|
|
@@ -611,9 +623,9 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
611
623
|
border-radius: ${t||n?void 0:e.input.focus.borderRadius}px;
|
|
612
624
|
}
|
|
613
625
|
}
|
|
614
|
-
`,
|
|
626
|
+
`,GA=()=>ne`
|
|
615
627
|
width: 100%;
|
|
616
|
-
`;class pi extends se{constructor({id:n,label:r,initialHelperText:s,isValid:i=!0}){super({tag:"div",styles:()=>Z4()});S(this,"inputContainer");S(this,"labelTextElement",null);S(this,"helperTextElement",null);S(this,"id");this.id=n;const o=Jt(!i);if(this.inputContainer=document.createElement("div"),this.inputContainer.classList.add("input-container"),r){const c=document.createElement("label");this.labelTextElement=new H({text:r,size:o.label.size,lineHeight:o.label.lineHeight,weight:o.label.weight,color:o.label.color}).element,c.append(this.labelTextElement),c.htmlFor=n,this.inputContainer.append(this.labelTextElement)}const a=document.createElement("div");a.id=n,a.classList.add("form-field"),this.inputContainer.append(a),s&&(this.helperTextElement=new H({text:s,size:o.helperText.size,weight:o.helperText.weight,color:o.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.element.append(this.inputContainer)}setHelperText(n,r=!0){const s=Jt(!r);this.helperTextElement||(this.helperTextElement=new H({text:n,size:s.helperText.size,lineHeight:s.helperText.lineHeight,weight:s.helperText.weight,color:s.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.helperTextElement.textContent=n,this.helperTextElement.style.color=s.helperText.color}setValid(n){if(this.labelTextElement){const s=Jt(!n);this.labelTextElement.style.color=s.label.color}const r=this.element.querySelector(`#${this.id}`);r&&r.classList.toggle("error",!n)}resetValidation(){this.setValid(!0),this.setHelperText("",!0)}}const J4=(e,t,n)=>[{field:"#cc-holder",type:"text",name:"card_holder",placeholder:"card_holder_placeholder",autocomplete:"off",validations:["required","/^[a-zA-Z ]{0,200}$/"],styles:di(e,t)},{field:"#cc-number",type:"card-number",name:"card_number",placeholder:"4111 1111 1111 1111",autocomplete:"off",validations:["required","validCardNumber"],styles:di(e,t)},{field:"#cc-expiration-date",type:"card-expiration-date",name:"card_exp",lengthYear:n==="MM/YY"?2:4,placeholder:n,autocomplete:"off",validations:["required","validCardExpirationDate"],styles:di(e,t)},{field:"#cc-cvc",type:"card-security-code",name:"card_cvc",placeholder:"123",autocomplete:"off",validations:["required","/^\\d{3,4}$/"],styles:di(e,t)}],X4={card_holder:{isValid:!0,isTouched:!1},card_number:{isValid:!0,isTouched:!1},card_exp:{isValid:!0,isTouched:!1},card_cvc:{isValid:!0,isTouched:!1}},qf="MM/YY";class Gf extends se{constructor(n){super({tag:"div",styles:r=>Y4(r,{error:!1,disabled:!1})});S(this,"componentProps");S(this,"loadingWrapper");S(this,"btnPay",null);S(this,"cardManager",null);S(this,"cardHolderInput",null);S(this,"cardNumberInput",null);S(this,"cardExpInput",null);S(this,"cardCvvInput",null);S(this,"requiredFieldsForm",null);S(this,"formState",X4);S(this,"isFormTemplateValid",!1);S(this,"pollingService",null);this.componentProps={...n,showPaymentSummary:n.showPaymentSummary??!0,expirationDateFormat:n.expirationDateFormat??qf},this.loadingWrapper=this.createLoadingWrapper(V.translate("hold_on")),this.element.append(this.loadingWrapper),sessionStorage.getItem(gr.SESSION_ID)||sessionStorage.setItem(gr.SESSION_ID,om()),this.fetchPaymentMethodDetail()}async fetchPaymentMethodDetail(){var n,r;try{const s=await Wf.getPaymentMethodDetail({paymentExternalId:this.componentProps.paymentExternalId,methodCode:this.componentProps.paymentMethod.code});this.renderCardSection(s.fields)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(i.message)}finally{this.loadingWrapper.remove()}}renderCardSection(n){const{amount:r,currency:s,showPaymentSummary:i,expirationDateFormat:o}=this.componentProps;if(i){const c=new r1({amount:r,currency:s}).element;this.element.append(c)}this.cardHolderInput=new pi({id:"cc-holder",label:V.translate("card_holder_label")}),this.cardNumberInput=new pi({id:"cc-number",label:V.translate("card_number")});const a=document.createElement("div");a.classList.add("row-container"),this.cardExpInput=new pi({id:"cc-expiration-date",label:V.translate("card_exp_date")}),this.cardCvvInput=new pi({id:"cc-cvc",label:"CVV"}),a.append(this.cardExpInput.element,this.cardCvvInput.element),this.element.append(this.cardHolderInput.element,this.cardNumberInput.element,a),this.cardManager=new K4(J4(X().textColor,X().backgroundColor,o??qf).map(c=>({...c,placeholder:V.translate(c.placeholder)})),this.handleFormStateChange.bind(this)),this.cardManager.init(),n&&n.length>0&&this.renderRequiredFields(n),this.btnPay=new Dt({text:V.translate("pay_amount",{amount:Pi(this.componentProps.amount,this.componentProps.currency,Le.getCurrencyMode())}),onClick:()=>{this.handleSubmit()},isFullWidth:!0,iconLeft:"lock_line",isDisabled:!0}),this.element.append(this.btnPay.element)}renderRequiredFields(n){this.requiredFieldsForm=new Zg({title:V.translate("additional_information"),requiredFields:n}),this.requiredFieldsForm.setValidationChangeHandler(r=>{this.isFormTemplateValid=r,this.updateSubmitButton()}),this.element.append(this.requiredFieldsForm.element)}handleFormStateChange(n){this.formState=n,this.updateInputsValidation(),this.updateSubmitButton()}updateInputsValidation(){[{input:this.cardHolderInput,...this.formState.card_holder},{input:this.cardNumberInput,...this.formState.card_number},{input:this.cardExpInput,...this.formState.card_exp},{input:this.cardCvvInput,...this.formState.card_cvc}].forEach(({input:r,isValid:s})=>{r==null||r.setValid(s),r==null||r.setHelperText(s?"":V.translate("invalid_field"),s)})}updateSubmitButton(){var s;const r=Object.values(this.formState).every(i=>i.isValid&&i.isTouched)&&(this.requiredFieldsForm?this.isFormTemplateValid:!0);(s=this.btnPay)==null||s.setDisabled(!r)}async handleSubmit(){var n,r,s,i,o,a;try{(n=this.btnPay)==null||n.setLoading(!0);const c=await this.handleTokenizeCard(),l={paymentMethods:[{methodCode:this.componentProps.paymentMethod.code,currency:this.componentProps.currency,amount:this.componentProps.amount,user:{sessionId:sessionStorage.getItem(gr.SESSION_ID)||"",...(r=this.requiredFieldsForm)==null?void 0:r.getFormData()},cardData:c}]},{status:u,reason:d}=await Ie.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,l);if(u===jf.PENDING)await this.checkPaymentStatus(),(s=this.btnPay)==null||s.setLoading(!1),(i=this.btnPay)==null||i.setDisabled(!0);else throw new Error(d||V.translate("generic_error"))}catch(c){const l=c;console.error(l.message),this.showErrorMessage(l.message),(a=(o=this.componentProps)==null?void 0:o.onError)==null||a.call(o),this.renderRetryButton()}}async handleTokenizeCard(){return new Promise((n,r)=>{var a;if(!this.cardManager)return;const{document_type:s,document_number:i}=((a=this.requiredFieldsForm)==null?void 0:a.getFormData())??{},o={documentType:s??"",documentNumber:i??"",sessionId:sessionStorage.getItem(gr.SESSION_ID)||""};this.cardManager.tokenizeCard(o,c=>n(c),c=>{r(c)})})}showErrorMessage(n){this.element.innerHTML="";const r=new H({text:n,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.append(r)}destroy(){this.element.remove()}async checkPaymentStatus(){try{const n=await Ie.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Gt.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Gt.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopPolling()}}initializePollingService(n){this.pollingService=new _c(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}handlePollingError(n){var s,i;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(i=(s=this.componentProps)==null?void 0:s.onError)==null||i.call(s),this.renderRetryButton()}showWaitingInfo(n){this.element.innerHTML="";const r=this.createLoadingWrapper(n);r.style.minHeight="400px",this.element.append(r)}handlePaymentSuccess(n){var i,o;const r=[],s=new Oi({type:"success",title:(i=n.data.successSection)==null?void 0:i.title,description:(o=n.data.successSection)==null?void 0:o.description}).element;r.push(s),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}createLoadingWrapper(n){const r=document.createElement("div");r.classList.add("loading-wrapper");const s=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element,i=new H({text:n,size:20,lineHeight:30,weight:600,align:"center"}).element;return r.append(s,i),r}renderRetryButton(){const n=document.createElement("div");n.classList.add("center-row");const r=new Dt({text:V.translate("try_again"),variant:"text",size:"small",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.element.append(this.loadingWrapper),this.fetchPaymentMethodDetail()}}).element;n.append(r),this.element.append(n)}}var st=(e=>(e.CREDIT_CARD="EC",e.DEBIT_CARD="DR",e.CW="CW",e.DC="DC",e.CC="CC",e))(st||{});const Kf=["EC","DR","CW","DC","CC"],Q4=e=>j`
|
|
628
|
+
`;class Ks extends be{constructor({id:n,label:r,initialHelperText:i,isValid:o=!0}){super({tag:"div",styles:()=>GA()});S(this,"inputContainer");S(this,"labelTextElement",null);S(this,"helperTextElement",null);S(this,"id");this.id=n;const s=Mn(!o);if(this.inputContainer=document.createElement("div"),this.inputContainer.classList.add("input-container"),r){const c=document.createElement("label");this.labelTextElement=new X({text:r,size:s.label.size,lineHeight:s.label.lineHeight,weight:s.label.weight,color:s.label.color}).element,c.append(this.labelTextElement),c.htmlFor=n,this.inputContainer.append(this.labelTextElement)}const a=document.createElement("div");a.id=n,a.classList.add("form-field"),this.inputContainer.append(a),i&&(this.helperTextElement=new X({text:i,size:s.helperText.size,weight:s.helperText.weight,color:s.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.element.append(this.inputContainer)}setHelperText(n,r=!0){const i=Mn(!r);this.helperTextElement||(this.helperTextElement=new X({text:n,size:i.helperText.size,lineHeight:i.helperText.lineHeight,weight:i.helperText.weight,color:i.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.helperTextElement.textContent=n,this.helperTextElement.style.color=i.helperText.color}setValid(n){if(this.labelTextElement){const i=Mn(!n);this.labelTextElement.style.color=i.label.color}const r=this.element.querySelector(`#${this.id}`);r&&r.classList.toggle("error",!n)}resetValidation(){this.setValid(!0),this.setHelperText("",!0)}}const KA=(e,t,n)=>[{field:"#cc-holder",type:"text",name:"card_holder",placeholder:"card_holder_placeholder",autocomplete:"off",validations:["required","/^[a-zA-Z ]{0,200}$/"],styles:Gs(e,t)},{field:"#cc-number",type:"card-number",name:"card_number",placeholder:"4111 1111 1111 1111",autocomplete:"off",validations:["required","validCardNumber"],styles:Gs(e,t)},{field:"#cc-expiration-date",type:"card-expiration-date",name:"card_exp",lengthYear:n==="MM/YY"?2:4,placeholder:n,autocomplete:"off",validations:["required","validCardExpirationDate"],styles:Gs(e,t)},{field:"#cc-cvc",type:"card-security-code",name:"card_cvc",placeholder:"123",autocomplete:"off",validations:["required","/^\\d{3,4}$/"],styles:Gs(e,t)}],YA={card_holder:{isValid:!0,isTouched:!1},card_number:{isValid:!0,isTouched:!1},card_exp:{isValid:!0,isTouched:!1},card_cvc:{isValid:!0,isTouched:!1}},U0="MM/YY";class B0 extends be{constructor(n){super({tag:"div",styles:r=>WA(r,{error:!1,disabled:!1})});S(this,"componentProps");S(this,"loadingWrapper");S(this,"btnPay",null);S(this,"cardManager",null);S(this,"cardHolderInput",null);S(this,"cardNumberInput",null);S(this,"cardExpInput",null);S(this,"cardCvvInput",null);S(this,"requiredFieldsForm",null);S(this,"formState",YA);S(this,"isFormTemplateValid",!1);S(this,"pollingService",null);this.componentProps={...n,showPaymentSummary:n.showPaymentSummary??!0,expirationDateFormat:n.expirationDateFormat??U0},this.loadingWrapper=this.createLoadingWrapper(q.translate("hold_on")),this.element.append(this.loadingWrapper),sessionStorage.getItem(ci.SESSION_ID)||sessionStorage.setItem(ci.SESSION_ID,X1()),this.fetchPaymentMethodDetail()}async fetchPaymentMethodDetail(){var n,r;try{const i=await F0.getPaymentMethodDetail({paymentExternalId:this.componentProps.paymentExternalId,methodCode:this.componentProps.paymentMethod.code});this.renderCardSection(i.fields)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(o.message)}finally{this.loadingWrapper.remove()}}renderCardSection(n){const{amount:r,currency:i,showPaymentSummary:o,expirationDateFormat:s}=this.componentProps;if(o){const c=new Jb({amount:r,currency:i}).element;this.element.append(c)}this.cardHolderInput=new Ks({id:"cc-holder",label:q.translate("card_holder_label")}),this.cardNumberInput=new Ks({id:"cc-number",label:q.translate("card_number")});const a=document.createElement("div");a.classList.add("row-container"),this.cardExpInput=new Ks({id:"cc-expiration-date",label:q.translate("card_exp_date")}),this.cardCvvInput=new Ks({id:"cc-cvc",label:"CVV"}),a.append(this.cardExpInput.element,this.cardCvvInput.element),this.element.append(this.cardHolderInput.element,this.cardNumberInput.element,a),this.cardManager=new qA(KA(he().textColor,he().backgroundColor,s??U0).map(c=>({...c,placeholder:q.translate(c.placeholder)})),this.handleFormStateChange.bind(this)),this.cardManager.init(),n&&n.length>0&&this.renderRequiredFields(n),this.btnPay=new mn({text:q.translate("pay_amount",{amount:fa(this.componentProps.amount,this.componentProps.currency,Ye.getCurrencyMode())}),onClick:()=>{this.handleSubmit()},isFullWidth:!0,iconLeft:"lock_line",isDisabled:!0}),this.element.append(this.btnPay.element)}renderRequiredFields(n){this.requiredFieldsForm=new Hb({title:q.translate("additional_information"),requiredFields:n}),this.requiredFieldsForm.setValidationChangeHandler(r=>{this.isFormTemplateValid=r,this.updateSubmitButton()}),this.element.append(this.requiredFieldsForm.element)}handleFormStateChange(n){this.formState=n,this.updateInputsValidation(),this.updateSubmitButton()}updateInputsValidation(){[{input:this.cardHolderInput,...this.formState.card_holder},{input:this.cardNumberInput,...this.formState.card_number},{input:this.cardExpInput,...this.formState.card_exp},{input:this.cardCvvInput,...this.formState.card_cvc}].forEach(({input:r,isValid:i})=>{r==null||r.setValid(i),r==null||r.setHelperText(i?"":q.translate("invalid_field"),i)})}updateSubmitButton(){var i;const r=Object.values(this.formState).every(o=>o.isValid&&o.isTouched)&&(this.requiredFieldsForm?this.isFormTemplateValid:!0);(i=this.btnPay)==null||i.setDisabled(!r)}async handleSubmit(){var n,r,i,o,s,a,c;try{(n=this.btnPay)==null||n.setLoading(!0);const u=await this.handleTokenizeCard(),l={paymentMethods:[{methodCode:this.componentProps.paymentMethod.code,currency:this.componentProps.currency,amount:this.componentProps.amount,user:{sessionId:sessionStorage.getItem(ci.SESSION_ID)||"",...(r=this.requiredFieldsForm)==null?void 0:r.getFormData()},cardData:u}]};if((i=this.componentProps.paymentMethod)!=null&&i.uri){const{status:d,reason:f}=await We.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,l);if(d===D0.PENDING)await this.checkPaymentStatus(),(o=this.btnPay)==null||o.setLoading(!1),(s=this.btnPay)==null||s.setDisabled(!0);else throw new Error(f||q.translate("generic_error"))}else throw new Error(q.translate("generic_error"))}catch(u){const l=u;console.error(l.message),this.showErrorMessage(l.message),(c=(a=this.componentProps)==null?void 0:a.onError)==null||c.call(a),this.renderRetryButton()}}async handleTokenizeCard(){return new Promise((n,r)=>{var a;if(!this.cardManager)return;const{document_type:i,document_number:o}=((a=this.requiredFieldsForm)==null?void 0:a.getFormData())??{},s={documentType:i??"",documentNumber:o??"",sessionId:sessionStorage.getItem(ci.SESSION_ID)||""};this.cardManager.tokenizeCard(s,c=>n(c),c=>{r(c)})})}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.append(r)}async checkPaymentStatus(){try{const n=await We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopPolling()}}initializePollingService(n){this.pollingService=new Gl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i),this.renderRetryButton()}showWaitingInfo(n){this.element.innerHTML="";const r=this.createLoadingWrapper(n);r.style.minHeight="400px",this.element.append(r)}handlePaymentSuccess(n){var o,s;const r=[],i=new pa({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}createLoadingWrapper(n){const r=document.createElement("div");r.classList.add("loading-wrapper");const i=new an({size:100,variant:"fetching",color:Z.getStyles().primaryColor}).element,o=new X({text:n,size:20,lineHeight:30,weight:600,align:"center"}).element;return r.append(i,o),r}renderRetryButton(){const n=document.createElement("div");n.classList.add("center-row");const r=new mn({text:q.translate("try_again"),variant:"text",size:"small",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.element.append(this.loadingWrapper),this.fetchPaymentMethodDetail()}}).element;n.append(r),this.element.append(n)}destroy(){this.stopPolling(),this.element.remove()}}class JA{constructor(){S(this,"tracker",Ri);S(this,"astroPayPaymentImpression",t=>{this.tracker.trackEvent(new mg({component_name:t}))});S(this,"astroPayPaymentStarted",t=>{this.tracker.trackEvent(new bg({payment_external_id:t}))});S(this,"astroPayPaymentClicked",t=>{this.tracker.trackEvent(new gg({payment_external_id:t}))});S(this,"astroPayPaymentPhoneNumberEntered",t=>{this.tracker.trackEvent(new yg({payment_external_id:t}))});S(this,"astroPayPaymentUserIdentified",t=>{this.tracker.trackEvent(new wg({payment_external_id:t}))});S(this,"astroPayPaymentLinkCopied",t=>{this.tracker.trackEvent(new vg({payment_external_id:t}))});S(this,"astroPayPaymentCardClicked",t=>{this.tracker.trackEvent(new hg({payment_external_id:t}))})}}const fn=new JA;var Oe=(e=>(e.AP="AP",e.IX="IX",e.CREDIT_CARD="EC",e.DEBIT_CARD="DR",e.CW="CW",e.DC="DC",e.CC="CC",e))(Oe||{});const $0=["EC","DR","CW","DC","CC"],ZA=e=>ne`
|
|
617
629
|
background-color: ${e.backgroundColor};
|
|
618
630
|
|
|
619
631
|
display: flex;
|
|
@@ -641,17 +653,22 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
641
653
|
align-items: center;
|
|
642
654
|
gap: 8px;
|
|
643
655
|
}
|
|
644
|
-
`;class
|
|
656
|
+
`;class XA extends be{constructor(n){super({tag:"div",styles:i=>ZA(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode=Oe.DEBIT_CARD,Ft.registerComponent(this),fn.astroPayPaymentImpression("AstroPayCardPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.trackEvent("ap_cl_astropay_card_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,order:a}=this.componentProps,c={country:s,currency:o,amount:i,order:a,methodCode:this.methodCode},u=await We.postCreatePayment(c,"card_payment");this.renderAstroPayCardMethod(u)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(o.message)}finally{this.loadingWrapper.remove()}}renderAstroPayCardMethod(n){var i,o,s;this.element.innerHTML="";const r=(i=n.paymentMethods)==null?void 0:i.find(a=>a.enabled&&$0.includes(a.code));if(r){const a=new B0({...this.componentProps,paymentExternalId:n.paymentExternalId,paymentMethod:r,onSuccess:c=>this.showSuccessContent(c)}).element;this.element.append(a)}else(s=(o=this.componentProps)==null?void 0:o.onError)==null||s.call(o),this.showErrorMessage(q.translate("generic_error"))}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.append(r)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ft.unregisterComponent(this)}}class QA extends be{constructor({content:n}){super({tag:"div"});S(this,"contentElement");this.element.classList.add("accordion-content"),this.contentElement=n,this.renderContent()}renderContent(){const n=typeof this.contentElement=="function"?this.contentElement():this.contentElement;this.element.append(n)}destroyContent(){super.destroy()}}const ek=()=>ne`
|
|
645
657
|
.accordion-header {
|
|
646
658
|
display: flex;
|
|
647
659
|
justify-content: flex-start;
|
|
648
660
|
align-items: center;
|
|
649
661
|
padding: 12px 0;
|
|
650
|
-
gap:
|
|
662
|
+
gap: 8px;
|
|
651
663
|
width: 100%;
|
|
652
664
|
cursor: pointer;
|
|
653
665
|
}
|
|
654
666
|
|
|
667
|
+
.title-description-wrapper {
|
|
668
|
+
display: flex;
|
|
669
|
+
flex-direction: column;
|
|
670
|
+
}
|
|
671
|
+
|
|
655
672
|
.actions-wrapper {
|
|
656
673
|
display: flex;
|
|
657
674
|
gap: 6px;
|
|
@@ -681,7 +698,34 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
681
698
|
height: auto;
|
|
682
699
|
padding: 12px 0;
|
|
683
700
|
}
|
|
684
|
-
`;class
|
|
701
|
+
`;class tk extends be{constructor({icon:n,title:r,description:i,content:o,isOpen:s=!1,auxImage:a,isDisabled:c=!1,onClick:u,onClose:l}){super({tag:"div",styles:()=>ek()});S(this,"isOpen");S(this,"isDisabled");S(this,"content");S(this,"onClick");S(this,"onClose");S(this,"accordionContent",null);S(this,"arrowWrapper");S(this,"header");this.isOpen=s,this.isDisabled=c,this.content=o,this.onClick=u,this.onClose=l,this.header=document.createElement("div"),this.header.classList.add("accordion-header"),this.isDisabled||this.header.addEventListener("click",this.handleClick.bind(this));const d=new mt({name:n,size:16,color:Z.getStyles().textPrimaryColor}).element,f=document.createElement("div");f.classList.add("title-description-wrapper");const h=new X({variant:"div",size:16,weight:500,text:r}).element;if(f.append(h),i){const g=new X({variant:"div",text:i??"",size:12,weight:400,color:Z.getStyles().textSecondaryColor}).element;f.append(h,g)}this.header.append(d,f);const p=document.createElement("div");if(p.classList.add("actions-wrapper"),a&&a.length){const g=document.createElement("div");g.classList.add("aux-icons-wrapper"),a.forEach(m=>{const v=new mt({name:m,size:24}).element;g.append(v)}),p.append(g)}if(this.arrowWrapper=document.createElement("span"),this.arrowWrapper.classList.add("arrow-wrapper"),!this.isDisabled){const g=new mt({name:"arrow_down_line",size:24,color:Z.getStyles().textPrimaryColor}).element;this.arrowWrapper.append(g)}p.append(this.arrowWrapper),this.header.append(p),this.element.append(this.header),this.isDisabled&&this.applyDisabledStyles(),(this.isOpen||this.isDisabled)&&(this.renderContent(),this.isDisabled||this.arrowWrapper.classList.add("rotated"))}handleClick(){var n;this.isDisabled||(n=this.onClick)==null||n.call(this)}applyDisabledStyles(){this.header.style.cursor="default",this.header.style.pointerEvents="none"}toggleContent(){this.isDisabled||(this.isOpen||(this.renderContent(),this.arrowWrapper.classList.add("rotated")),this.isOpen=!0)}destroyContent(){var n,r;this.isDisabled||(this.isOpen&&((n=this.onClose)==null||n.call(this),(r=this.accordionContent)==null||r.destroyContent(),this.accordionContent=null,this.arrowWrapper.classList.remove("rotated")),this.isOpen=!1)}renderContent(){this.accordionContent||(this.accordionContent=new QA({content:this.content}),this.element.append(this.accordionContent.element))}}class nk extends be{constructor({items:n,defaultActiveItem:r,onChangeContent:i}){super({tag:"div"});S(this,"openIndex");S(this,"accordionItems",[]);S(this,"onChangeContent");S(this,"hasSingleItem");this.hasSingleItem=n.length===1,this.openIndex=this.validateDefaultIndex(r??null,n.length),this.accordionItems=n.map((o,s)=>{const a=this.openIndex===s,c=this.hasSingleItem,u=new tk({icon:o.icon,title:o.title,description:o==null?void 0:o.description,content:o.content,isOpen:a,isDisabled:c,auxImage:o.auxImage,onClick:c?void 0:()=>{var l;this.handleItemClick(s),this.openIndex===s&&((l=o.onClickCallback)==null||l.call(o))},onClose:o.onClose});if(this.element.appendChild(u.element),s!==n.length-1){const l=new hf({text:s===0?q.translate("or"):""}).element;l.style.padding="4px 0",this.element.appendChild(l)}return u}),this.onChangeContent=i}validateDefaultIndex(n,r){return r===1?0:n!==null&&n>=0&&n<r?n:null}handleItemClick(n){var r;this.openIndex===n?this.openIndex=null:((r=this.onChangeContent)==null||r.call(this),this.openIndex=n),this.updateItems()}updateItems(){this.accordionItems.forEach((n,r)=>{this.openIndex===r?n.toggleContent():n.destroyContent()})}closeAllItems(){this.openIndex=null,this.updateItems()}}const rk=e=>ne`
|
|
702
|
+
background-color: ${e.backgroundColor};
|
|
703
|
+
|
|
704
|
+
display: flex;
|
|
705
|
+
flex-direction: column;
|
|
706
|
+
gap: 12px;
|
|
707
|
+
|
|
708
|
+
max-width: ${typeof e.width=="number"?`${e.width}px`:e.width};
|
|
709
|
+
padding: ${typeof e.paddingWrapper=="number"?`${e.paddingWrapper}px`:e.paddingWrapper};
|
|
710
|
+
border-radius: ${typeof e.borderRadiusWrapper=="number"?`${e.borderRadiusWrapper}px`:e.borderRadiusWrapper};
|
|
711
|
+
|
|
712
|
+
.loading-wrapper {
|
|
713
|
+
display: flex;
|
|
714
|
+
flex-direction: column;
|
|
715
|
+
justify-content: center;
|
|
716
|
+
align-items: center;
|
|
717
|
+
width: 100%;
|
|
718
|
+
gap: 8px;
|
|
719
|
+
min-height: 250px;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.payment-success-content {
|
|
723
|
+
display: flex;
|
|
724
|
+
flex-direction: column;
|
|
725
|
+
align-items: center;
|
|
726
|
+
gap: 8px;
|
|
727
|
+
}
|
|
728
|
+
`,Ot=({variant:e})=>{const t=Z.getStyles();switch(e){case"highlight":return t.badge.highlight;case"error":return t.badge.error;case"success":return t.badge.success;case"warning":return t.badge.warning;case"default":default:return t.badge.default}},ik=e=>{switch(e){case"end":return"flex-end";case"center":return"center";case"space-between":return"space-between";case"start":default:return"flex-start"}},ok=({variant:e="default",isFullWidth:t,align:n})=>ne`
|
|
685
729
|
box-sizing: border-box;
|
|
686
730
|
display: flex;
|
|
687
731
|
align-items: center;
|
|
@@ -689,31 +733,31 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
689
733
|
flex-wrap: wrap;
|
|
690
734
|
|
|
691
735
|
width: ${t?"100%":"fit-content"};
|
|
692
|
-
padding: ${typeof
|
|
736
|
+
padding: ${typeof Ot({variant:e}).padding=="number"?`${Ot({variant:e}).padding}px`:Ot({variant:e}).padding};
|
|
693
737
|
|
|
694
|
-
background-color: ${
|
|
695
|
-
border-radius: ${
|
|
738
|
+
background-color: ${Ot({variant:e}).backgroundColor};
|
|
739
|
+
border-radius: ${Ot({variant:e}).borderRadius}px;
|
|
696
740
|
|
|
697
|
-
border: ${
|
|
698
|
-
${
|
|
741
|
+
border: ${Ot({variant:e}).borderWidth}px
|
|
742
|
+
${Ot({variant:e}).borderStyle} ${Ot({variant:e}).borderColor};
|
|
699
743
|
|
|
700
|
-
justify-content: ${
|
|
744
|
+
justify-content: ${ik(n)};
|
|
701
745
|
|
|
702
746
|
.badge-content {
|
|
703
747
|
display: flex;
|
|
704
748
|
align-items: center;
|
|
705
749
|
gap: 4px;
|
|
706
750
|
flex-wrap: nowrap;
|
|
707
|
-
color: ${
|
|
751
|
+
color: ${Ot({variant:e}).textColor};
|
|
708
752
|
}
|
|
709
|
-
`;class
|
|
710
|
-
]))+`;
|
|
711
|
-
Make sure your charset is UTF-8`);
|
|
712
|
-
Suggested mode is: `+t.toString(
|
|
753
|
+
`;class Kl extends be{constructor({items:t,variant:n="default",isFullWidth:r=!1,align:i="center"}){super({tag:"div",styles:()=>ok({variant:n,isFullWidth:r,align:i})}),t.forEach(({title:o,icon:s,iconLeft:a,iconRight:c})=>{const u=document.createElement("div");if(u.classList.add("badge-content"),s||a){const d=new mt({name:s||a,size:12,color:Ot({variant:n}).textColor}).element;u.append(d)}const l=new X({text:o,weight:500,color:Ot({variant:n}).textColor,align:"center"}).element;if(u.append(l),c){const d=new mt({name:c,size:12,color:Ot({variant:n}).textColor}).element;u.append(d)}this.element.append(u)})}}function sk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kr={},Yl,V0;function ak(){return V0||(V0=1,Yl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Yl}var Jl={},Ln={},z0;function tr(){if(z0)return Ln;z0=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ln.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Ln.getSymbolTotalCodewords=function(r){return t[r]},Ln.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Ln.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Ln.isKanjiModeEnabled=function(){return typeof e<"u"},Ln.toSJIS=function(r){return e(r)},Ln}var Zl={},H0;function Xl(){return H0||(H0=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,i){if(e.isValid(r))return r;try{return t(r)}catch{return i}}})(Zl)),Zl}var Ql,j0;function ck(){if(j0)return Ql;j0=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Ql=e,Ql}var ed,q0;function uk(){if(q0)return ed;q0=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,i){const o=t*this.size+n;this.data[o]=r,i&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},ed=e,ed}var td={},W0;function lk(){return W0||(W0=1,(function(e){const t=tr().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,o=t(r),s=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-s;return a.push(6),a.reverse()},e.getPositions=function(r){const i=[],o=e.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let c=0;c<s;c++)a===0&&c===0||a===0&&c===s-1||a===s-1&&c===0||i.push([o[a],o[c]]);return i}})(td)),td}var nd={},G0;function dk(){if(G0)return nd;G0=1;const e=tr().getSymbolSize,t=7;return nd.getPositions=function(r){const i=e(r);return[[0,0],[i-t,0],[0,i-t]]},nd}var rd={},K0;function fk(){return K0||(K0=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const o=i.size;let s=0,a=0,c=0,u=null,l=null;for(let d=0;d<o;d++){a=c=0,u=l=null;for(let f=0;f<o;f++){let h=i.get(d,f);h===u?a++:(a>=5&&(s+=t.N1+(a-5)),u=h,a=1),h=i.get(f,d),h===l?c++:(c>=5&&(s+=t.N1+(c-5)),l=h,c=1)}a>=5&&(s+=t.N1+(a-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(i){const o=i.size;let s=0;for(let a=0;a<o-1;a++)for(let c=0;c<o-1;c++){const u=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const o=i.size;let s=0,a=0,c=0;for(let u=0;u<o;u++){a=c=0;for(let l=0;l<o;l++)a=a<<1&2047|i.get(u,l),l>=10&&(a===1488||a===93)&&s++,c=c<<1&2047|i.get(l,u),l>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let o=0;const s=i.data.length;for(let c=0;c<s;c++)o+=i.data[c];return Math.abs(Math.ceil(o*100/s/5)-10)*t.N4};function n(r,i,o){switch(r){case e.Patterns.PATTERN000:return(i+o)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(i+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return i*o%2+i*o%3===0;case e.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case e.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(i,o){const s=o.size;for(let a=0;a<s;a++)for(let c=0;c<s;c++)o.isReserved(c,a)||o.xor(c,a,n(i,c,a))},e.getBestMask=function(i,o){const s=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let u=0;u<s;u++){o(u),e.applyMask(u,i);const l=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),l<c&&(c=l,a=u)}return a}})(rd)),rd}var Ys={},Y0;function J0(){if(Y0)return Ys;Y0=1;const e=Xl(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Ys.getBlocksCount=function(i,o){switch(o){case e.L:return t[(i-1)*4+0];case e.M:return t[(i-1)*4+1];case e.Q:return t[(i-1)*4+2];case e.H:return t[(i-1)*4+3];default:return}},Ys.getTotalCodewordsCount=function(i,o){switch(o){case e.L:return n[(i-1)*4+0];case e.M:return n[(i-1)*4+1];case e.Q:return n[(i-1)*4+2];case e.H:return n[(i-1)*4+3];default:return}},Ys}var id={},to={},Z0;function pk(){if(Z0)return to;Z0=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let i=0;i<255;i++)e[i]=r,t[r]=i,r<<=1,r&256&&(r^=285);for(let i=255;i<512;i++)e[i]=e[i-255]})(),to.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},to.exp=function(r){return e[r]},to.mul=function(r,i){return r===0||i===0?0:e[t[r]+t[i]]},to}var X0;function hk(){return X0||(X0=1,(function(e){const t=pk();e.mul=function(r,i){const o=new Uint8Array(r.length+i.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<i.length;a++)o[s+a]^=t.mul(r[s],i[a]);return o},e.mod=function(r,i){let o=new Uint8Array(r);for(;o.length-i.length>=0;){const s=o[0];for(let c=0;c<i.length;c++)o[c]^=t.mul(i[c],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},e.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let o=0;o<r;o++)i=e.mul(i,new Uint8Array([1,t.exp(o)]));return i}})(id)),id}var od,Q0;function gk(){if(Q0)return od;Q0=1;const e=hk();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(r.length+this.degree);i.set(r);const o=e.mod(i,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},od=t,od}var sd={},ad={},cd={},e1;function t1(){return e1||(e1=1,cd.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),cd}var en={},n1;function r1(){if(n1)return en;n1=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
754
|
+
]))+`;en.KANJI=new RegExp(n,"g"),en.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),en.BYTE=new RegExp(r,"g"),en.NUMERIC=new RegExp(e,"g"),en.ALPHANUMERIC=new RegExp(t,"g");const i=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return en.testKanji=function(c){return i.test(c)},en.testNumeric=function(c){return o.test(c)},en.testAlphanumeric=function(c){return s.test(c)},en}var i1;function nr(){return i1||(i1=1,(function(e){const t=t1(),n=r1();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,s){if(e.isValid(o))return o;try{return r(o)}catch{return s}}})(ad)),ad}var o1;function mk(){return o1||(o1=1,(function(e){const t=tr(),n=J0(),r=Xl(),i=nr(),o=t1(),s=7973,a=t.getBCHDigit(s);function c(f,h,p){for(let g=1;g<=40;g++)if(h<=e.getCapacity(g,p,f))return g}function u(f,h){return i.getCharCountIndicator(f,h)+4}function l(f,h){let p=0;return f.forEach(function(g){const m=u(g.mode,h);p+=m+g.getBitsLength()}),p}function d(f,h){for(let p=1;p<=40;p++)if(l(f,p)<=e.getCapacity(p,h,i.MIXED))return p}e.from=function(h,p){return o.isValid(h)?parseInt(h,10):p},e.getCapacity=function(h,p,g){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=i.BYTE);const m=t.getSymbolTotalCodewords(h),v=n.getTotalCodewordsCount(h,p),y=(m-v)*8;if(g===i.MIXED)return y;const b=y-u(g,h);switch(g){case i.NUMERIC:return Math.floor(b/10*3);case i.ALPHANUMERIC:return Math.floor(b/11*2);case i.KANJI:return Math.floor(b/13);case i.BYTE:default:return Math.floor(b/8)}},e.getBestVersionForData=function(h,p){let g;const m=r.from(p,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,m);if(h.length===0)return 1;g=h[0]}else g=h;return c(g.mode,g.getLength(),m)},e.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;t.getBCHDigit(p)-a>=0;)p^=s<<t.getBCHDigit(p)-a;return h<<12|p}})(sd)),sd}var ud={},s1;function vk(){if(s1)return ud;s1=1;const e=tr(),t=1335,n=21522,r=e.getBCHDigit(t);return ud.getEncodedBits=function(o,s){const a=o.bit<<3|s;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},ud}var ld={},dd,a1;function yk(){if(a1)return dd;a1=1;const e=nr();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let i,o,s;for(i=0;i+3<=this.data.length;i+=3)o=this.data.substr(i,3),s=parseInt(o,10),r.put(s,10);const a=this.data.length-i;a>0&&(o=this.data.substr(i),s=parseInt(o,10),r.put(s,a*3+1))},dd=t,dd}var fd,c1;function bk(){if(c1)return fd;c1=1;const e=nr(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let o;for(o=0;o+2<=this.data.length;o+=2){let s=t.indexOf(this.data[o])*45;s+=t.indexOf(this.data[o+1]),i.put(s,11)}this.data.length%2&&i.put(t.indexOf(this.data[o]),6)},fd=n,fd}var pd,u1;function wk(){if(u1)return pd;u1=1;const e=nr();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,i=this.data.length;r<i;r++)n.put(this.data[r],8)},pd=t,pd}var hd,l1;function Ek(){if(l1)return hd;l1=1;const e=nr(),t=tr();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(i){return i*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i<this.data.length;i++){let o=t.toSJIS(this.data[i]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
|
|
755
|
+
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},hd=n,hd}var gd={exports:{}},d1;function Sk(){return d1||(d1=1,(function(e){var t={single_source_shortest_paths:function(n,r,i){var o={},s={};s[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,u,l,d,f,h,p,g,m;!a.empty();){c=a.pop(),u=c.value,d=c.cost,f=n[u]||{};for(l in f)f.hasOwnProperty(l)&&(h=f[l],p=d+h,g=s[l],m=typeof s[l]>"u",(m||g>p)&&(s[l]=p,a.push(l,p),o[l]=u))}if(typeof i<"u"&&typeof s[i]>"u"){var v=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],o=r;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,r,i){var o=t.single_source_shortest_paths(n,r,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,i={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(gd)),gd.exports}var f1;function _k(){return f1||(f1=1,(function(e){const t=nr(),n=yk(),r=bk(),i=wk(),o=Ek(),s=r1(),a=tr(),c=Sk();function u(v){return unescape(encodeURIComponent(v)).length}function l(v,y,b){const w=[];let C;for(;(C=v.exec(b))!==null;)w.push({data:C[0],index:C.index,mode:y,length:C[0].length});return w}function d(v){const y=l(s.NUMERIC,t.NUMERIC,v),b=l(s.ALPHANUMERIC,t.ALPHANUMERIC,v);let w,C;return a.isKanjiModeEnabled()?(w=l(s.BYTE,t.BYTE,v),C=l(s.KANJI,t.KANJI,v)):(w=l(s.BYTE_KANJI,t.BYTE,v),C=[]),y.concat(b,w,C).sort(function(E,P){return E.index-P.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function f(v,y){switch(y){case t.NUMERIC:return n.getBitsLength(v);case t.ALPHANUMERIC:return r.getBitsLength(v);case t.KANJI:return o.getBitsLength(v);case t.BYTE:return i.getBitsLength(v)}}function h(v){return v.reduce(function(y,b){const w=y.length-1>=0?y[y.length-1]:null;return w&&w.mode===b.mode?(y[y.length-1].data+=b.data,y):(y.push(b),y)},[])}function p(v){const y=[];for(let b=0;b<v.length;b++){const w=v[b];switch(w.mode){case t.NUMERIC:y.push([w,{data:w.data,mode:t.ALPHANUMERIC,length:w.length},{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.ALPHANUMERIC:y.push([w,{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.KANJI:y.push([w,{data:w.data,mode:t.BYTE,length:u(w.data)}]);break;case t.BYTE:y.push([{data:w.data,mode:t.BYTE,length:u(w.data)}])}}return y}function g(v,y){const b={},w={start:{}};let C=["start"];for(let _=0;_<v.length;_++){const E=v[_],P=[];for(let T=0;T<E.length;T++){const I=E[T],k=""+_+T;P.push(k),b[k]={node:I,lastCount:0},w[k]={};for(let O=0;O<C.length;O++){const D=C[O];b[D]&&b[D].node.mode===I.mode?(w[D][k]=f(b[D].lastCount+I.length,I.mode)-f(b[D].lastCount,I.mode),b[D].lastCount+=I.length):(b[D]&&(b[D].lastCount=I.length),w[D][k]=f(I.length,I.mode)+4+t.getCharCountIndicator(I.mode,y))}}C=P}for(let _=0;_<C.length;_++)w[C[_]].end=0;return{map:w,table:b}}function m(v,y){let b;const w=t.getBestModeForData(v);if(b=t.from(y,w),b!==t.BYTE&&b.bit<w.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(b)+`.
|
|
756
|
+
Suggested mode is: `+t.toString(w));switch(b===t.KANJI&&!a.isKanjiModeEnabled()&&(b=t.BYTE),b){case t.NUMERIC:return new n(v);case t.ALPHANUMERIC:return new r(v);case t.KANJI:return new o(v);case t.BYTE:return new i(v)}}e.fromArray=function(y){return y.reduce(function(b,w){return typeof w=="string"?b.push(m(w,null)):w.data&&b.push(m(w.data,w.mode)),b},[])},e.fromString=function(y,b){const w=d(y,a.isKanjiModeEnabled()),C=p(w),_=g(C,b),E=c.find_path(_.map,"start","end"),P=[];for(let T=1;T<E.length-1;T++)P.push(_.table[E[T]].node);return e.fromArray(h(P))},e.rawSplit=function(y){return e.fromArray(d(y,a.isKanjiModeEnabled()))}})(ld)),ld}var p1;function Ck(){if(p1)return Jl;p1=1;const e=tr(),t=Xl(),n=ck(),r=uk(),i=lk(),o=dk(),s=fk(),a=J0(),c=gk(),u=mk(),l=vk(),d=nr(),f=_k();function h(_,E){const P=_.size,T=o.getPositions(E);for(let I=0;I<T.length;I++){const k=T[I][0],O=T[I][1];for(let D=-1;D<=7;D++)if(!(k+D<=-1||P<=k+D))for(let F=-1;F<=7;F++)O+F<=-1||P<=O+F||(D>=0&&D<=6&&(F===0||F===6)||F>=0&&F<=6&&(D===0||D===6)||D>=2&&D<=4&&F>=2&&F<=4?_.set(k+D,O+F,!0,!0):_.set(k+D,O+F,!1,!0))}}function p(_){const E=_.size;for(let P=8;P<E-8;P++){const T=P%2===0;_.set(P,6,T,!0),_.set(6,P,T,!0)}}function g(_,E){const P=i.getPositions(E);for(let T=0;T<P.length;T++){const I=P[T][0],k=P[T][1];for(let O=-2;O<=2;O++)for(let D=-2;D<=2;D++)O===-2||O===2||D===-2||D===2||O===0&&D===0?_.set(I+O,k+D,!0,!0):_.set(I+O,k+D,!1,!0)}}function m(_,E){const P=_.size,T=u.getEncodedBits(E);let I,k,O;for(let D=0;D<18;D++)I=Math.floor(D/3),k=D%3+P-8-3,O=(T>>D&1)===1,_.set(I,k,O,!0),_.set(k,I,O,!0)}function v(_,E,P){const T=_.size,I=l.getEncodedBits(E,P);let k,O;for(k=0;k<15;k++)O=(I>>k&1)===1,k<6?_.set(k,8,O,!0):k<8?_.set(k+1,8,O,!0):_.set(T-15+k,8,O,!0),k<8?_.set(8,T-k-1,O,!0):k<9?_.set(8,15-k-1+1,O,!0):_.set(8,15-k-1,O,!0);_.set(T-8,8,1,!0)}function y(_,E){const P=_.size;let T=-1,I=P-1,k=7,O=0;for(let D=P-1;D>0;D-=2)for(D===6&&D--;;){for(let F=0;F<2;F++)if(!_.isReserved(I,D-F)){let V=!1;O<E.length&&(V=(E[O]>>>k&1)===1),_.set(I,D-F,V),k--,k===-1&&(O++,k=7)}if(I+=T,I<0||P<=I){I-=T,T=-T;break}}}function b(_,E,P){const T=new n;P.forEach(function(F){T.put(F.mode.bit,4),T.put(F.getLength(),d.getCharCountIndicator(F.mode,_)),F.write(T)});const I=e.getSymbolTotalCodewords(_),k=a.getTotalCodewordsCount(_,E),O=(I-k)*8;for(T.getLengthInBits()+4<=O&&T.put(0,4);T.getLengthInBits()%8!==0;)T.putBit(0);const D=(O-T.getLengthInBits())/8;for(let F=0;F<D;F++)T.put(F%2?17:236,8);return w(T,_,E)}function w(_,E,P){const T=e.getSymbolTotalCodewords(E),I=a.getTotalCodewordsCount(E,P),k=T-I,O=a.getBlocksCount(E,P),D=T%O,F=O-D,V=Math.floor(T/O),z=Math.floor(k/O),ye=z+1,oe=V-z,J=new c(oe);let re=0;const W=new Array(O),ce=new Array(O);let te=0;const _e=new Uint8Array(_.buffer);for(let rn=0;rn<O;rn++){const ir=rn<F?z:ye;W[rn]=_e.slice(re,re+ir),ce[rn]=J.encode(W[rn]),re+=ir,te=Math.max(te,ir)}const pe=new Uint8Array(T);let B=0,_t,Ct;for(_t=0;_t<te;_t++)for(Ct=0;Ct<O;Ct++)_t<W[Ct].length&&(pe[B++]=W[Ct][_t]);for(_t=0;_t<oe;_t++)for(Ct=0;Ct<O;Ct++)pe[B++]=ce[Ct][_t];return pe}function C(_,E,P,T){let I;if(Array.isArray(_))I=f.fromArray(_);else if(typeof _=="string"){let V=E;if(!V){const z=f.rawSplit(_);V=u.getBestVersionForData(z,P)}I=f.fromString(_,V||40)}else throw new Error("Invalid data");const k=u.getBestVersionForData(I,P);if(!k)throw new Error("The amount of data is too big to be stored in a QR Code");if(!E)E=k;else if(E<k)throw new Error(`
|
|
713
757
|
The chosen QR Code version cannot contain this amount of data.
|
|
714
758
|
Minimum version required to store current data is: `+k+`.
|
|
715
|
-
`);const O=
|
|
716
|
-
`;return typeof a=="function"&&a(null,
|
|
759
|
+
`);const O=b(E,P,I),D=e.getSymbolSize(E),F=new r(D);return h(F,E),p(F),g(F,E),v(F,P,0),E>=7&&m(F,E),y(F,O),isNaN(T)&&(T=s.getBestMask(F,v.bind(null,F,P))),s.applyMask(T,F),v(F,P,T),{modules:F,version:E,errorCorrectionLevel:P,maskPattern:T,segments:I}}return Jl.create=function(E,P){if(typeof E>"u"||E==="")throw new Error("No input text");let T=t.M,I,k;return typeof P<"u"&&(T=t.from(P.errorCorrectionLevel,t.M),I=u.from(P.version),k=s.from(P.maskPattern),P.toSJISFunc&&e.setToSJISFunction(P.toSJISFunc)),C(E,I,T,k)},Jl}var md={},vd={},h1;function g1(){return h1||(h1=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:i,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},e.getImageWidth=function(r,i){const o=e.getScale(r,i);return Math.floor((r+i.margin*2)*o)},e.qrToImageData=function(r,i,o){const s=i.modules.size,a=i.modules.data,c=e.getScale(s,o),u=Math.floor((s+o.margin*2)*c),l=o.margin*c,d=[o.color.light,o.color.dark];for(let f=0;f<u;f++)for(let h=0;h<u;h++){let p=(f*u+h)*4,g=o.color.light;if(f>=l&&h>=l&&f<u-l&&h<u-l){const m=Math.floor((f-l)/c),v=Math.floor((h-l)/c);g=d[a[m*s+v]?1:0]}r[p++]=g.r,r[p++]=g.g,r[p++]=g.b,r[p]=g.a}}})(vd)),vd}var m1;function Tk(){return m1||(m1=1,(function(e){const t=g1();function n(i,o,s){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,s,a){let c=a,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=r()),c=t.getOptions(c);const l=t.getImageWidth(o.modules.size,c),d=u.getContext("2d"),f=d.createImageData(l,l);return t.qrToImageData(f.data,o,c),n(d,u,l),d.putImageData(f,0,0),u},e.renderToDataURL=function(o,s,a){let c=a;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(o,s,c),l=c.type||"image/png",d=c.rendererOpts||{};return u.toDataURL(l,d.quality)}})(md)),md}var yd={},v1;function Ik(){if(v1)return yd;v1=1;const e=g1();function t(i,o){const s=i.a/255,a=o+'="'+i.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(i,o,s){let a=i+o;return typeof s<"u"&&(a+=" "+s),a}function r(i,o,s){let a="",c=0,u=!1,l=0;for(let d=0;d<i.length;d++){const f=Math.floor(d%o),h=Math.floor(d/o);!f&&!u&&(u=!0),i[d]?(l++,d>0&&f>0&&i[d-1]||(a+=u?n("M",f+s,.5+h+s):n("m",c,0),c=0,u=!1),f+1<o&&i[d+1]||(a+=n("h",l),l=0)):c++}return a}return yd.render=function(o,s,a){const c=e.getOptions(s),u=o.modules.size,l=o.modules.data,d=u+c.margin*2,f=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",h="<path "+t(c.color.dark,"stroke")+' d="'+r(l,u,c.margin)+'"/>',p='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+p+' shape-rendering="crispEdges">'+f+h+`</svg>
|
|
760
|
+
`;return typeof a=="function"&&a(null,m),m},yd}var y1;function xk(){if(y1)return Kr;y1=1;const e=ak(),t=Ck(),n=Tk(),r=Ik();function i(o,s,a,c,u){const l=[].slice.call(arguments,1),d=l.length,f=typeof l[d-1]=="function";if(!f&&!e())throw new Error("Callback required as last argument");if(f){if(d<2)throw new Error("Too few arguments provided");d===2?(u=a,a=s,s=c=void 0):d===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=c=void 0):d===2&&!s.getContext&&(c=a,a=s,s=void 0),new Promise(function(h,p){try{const g=t.create(a,c);h(o(g,s,c))}catch(g){p(g)}})}try{const h=t.create(a,c);u(null,o(h,s,c))}catch(h){u(h)}}return Kr.create=t.create,Kr.toCanvas=i.bind(null,n.render),Kr.toDataURL=i.bind(null,n.renderToDataURL),Kr.toString=i.bind(null,function(o,s,a){return r.render(o,a)}),Kr}var Ak=xk();const kk=sk(Ak),Rk=e=>ne`
|
|
717
761
|
display: flex;
|
|
718
762
|
justify-content: center;
|
|
719
763
|
align-items: center;
|
|
@@ -723,7 +767,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
723
767
|
|
|
724
768
|
border: ${e.qrCode.borderWidth}px ${e.qrCode.borderStyle} ${e.qrCode.borderColor};
|
|
725
769
|
border-radius: ${e.qrCode.borderRadius}px;
|
|
726
|
-
`;class
|
|
770
|
+
`;class b1 extends be{constructor({value:t,width:n=130,altText:r="QR Code"}){super({tag:"div",styles:i=>Rk(i)}),kk.toDataURL(t,{width:n,margin:0}).then(i=>{const o=document.createElement("img");o.src=i,o.alt=r,o.width=n,this.element.append(o)}).catch(i=>{console.error("Failed to generate QR code:",i)})}}const Pk=e=>`${Ye.getRuntimeConfig().RESOURCES_BUCKET}/img/flags/${e}.webp`,Ok=()=>ne`
|
|
727
771
|
display: flex;
|
|
728
772
|
flex-direction: column;
|
|
729
773
|
gap: 12px;
|
|
@@ -735,7 +779,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
735
779
|
|
|
736
780
|
width: 100%;
|
|
737
781
|
}
|
|
738
|
-
`;class
|
|
782
|
+
`;class Lk extends be{constructor({availableCountries:n,onSubmit:r}){super({tag:"form",styles:()=>Ok()});S(this,"inputDialCode");S(this,"inputPhoneNumber");S(this,"btnContinue");S(this,"inputsWrapper");S(this,"onSubmit");this.onSubmit=r;const i=n.map(o=>({name:o.name,value:o.callingCode,icon:Pk(o.iso)}));this.inputsWrapper=document.createElement("div"),this.inputsWrapper.classList.add("inputs-wrapper"),this.inputDialCode=new mf({name:"country",options:i,emptyMessage:q.translate("enter_country_code"),maxWidth:"180px",showValue:!0}),this.inputPhoneNumber=new yf({name:"phone",placeholder:q.translate("enter_your_phone"),type:"tel"}),this.inputsWrapper.append(this.inputDialCode.element,this.inputPhoneNumber.element),this.btnContinue=new mn({text:q.translate("continue"),iconRight:"arrow_right_line",isFullWidth:!0,size:"large",isDisabled:!0,isApTheme:!0,onClick:o=>{o.preventDefault(),this.handleSubmit()}}),this.element.append(this.inputsWrapper,this.btnContinue.element),this.inputDialCode.element.addEventListener("change",()=>this.validateForm()),this.inputPhoneNumber.element.addEventListener("input",()=>this.validateForm()),this.validateForm()}validateForm(){const n=this.inputDialCode.getValue(),r=this.inputPhoneNumber.getValue(),i=r&&r.toString().length>=5,o=!!n;this.btnContinue.setDisabled(!i||!o)}handleSubmit(){const n=new FormData(this.element),r=n.get("country"),i=n.get("phone"),o=`${r}${i}`;qe.trackEvent("ap_cl_identify_user_init",{phoneNumber:o}),this.btnContinue.setLoading(!1),this.onSubmit({phoneNumber:o})}setLoading(n){this.btnContinue.setLoading(n)}setDisable(n){this.btnContinue.setDisabled(n)}}class Nk{static generate(t,n={}){return Cb(Ye.getRuntimeConfig().CHECKOUT_URL,t,n).toString()}}const Mk=()=>ne`
|
|
739
783
|
display: flex;
|
|
740
784
|
flex-direction: column;
|
|
741
785
|
gap: 10px;
|
|
@@ -770,34 +814,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
770
814
|
opacity: 1;
|
|
771
815
|
}
|
|
772
816
|
}
|
|
773
|
-
`;class
|
|
774
|
-
background-color: ${e.backgroundColor};
|
|
775
|
-
|
|
776
|
-
display: flex;
|
|
777
|
-
flex-direction: column;
|
|
778
|
-
gap: 12px;
|
|
779
|
-
|
|
780
|
-
max-width: ${typeof e.width=="number"?`${e.width}px`:e.width};
|
|
781
|
-
padding: ${typeof e.paddingWrapper=="number"?`${e.paddingWrapper}px`:e.paddingWrapper};
|
|
782
|
-
border-radius: ${typeof e.borderRadiusWrapper=="number"?`${e.borderRadiusWrapper}px`:e.borderRadiusWrapper};
|
|
783
|
-
|
|
784
|
-
.loading-wrapper {
|
|
785
|
-
display: flex;
|
|
786
|
-
flex-direction: column;
|
|
787
|
-
justify-content: center;
|
|
788
|
-
align-items: center;
|
|
789
|
-
width: 100%;
|
|
790
|
-
gap: 8px;
|
|
791
|
-
min-height: 250px;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.payment-success-content {
|
|
795
|
-
display: flex;
|
|
796
|
-
flex-direction: column;
|
|
797
|
-
align-items: center;
|
|
798
|
-
gap: 8px;
|
|
799
|
-
}
|
|
800
|
-
`,Bv=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Uv=e=>j`
|
|
817
|
+
`;class w1 extends be{constructor(n){super({tag:"div",styles:()=>Mk()});S(this,"componentProps");S(this,"btnAstroPay",null);S(this,"formCountryPhone");S(this,"pushFeedbackWrapper");S(this,"pollingService",null);S(this,"updatedInitialState");S(this,"renderAPComponent",()=>{var n;if(this.updatedInitialState){if(this.element.innerHTML="",this.btnAstroPay=new mn({text:((n=this.componentProps)==null?void 0:n.actionLabel)??"AstroPay",onClick:this.handleAstroPayClick.bind(this),isFullWidth:!0,iconRight:"arrow_right_line",isApTheme:!0}),this.element.append(this.btnAstroPay.element),this.componentProps.benefits){const r=new Kl({items:this.componentProps.benefits.batch,variant:"highlight",isFullWidth:!0,align:"center"}).element;this.element.append(r)}this.updatedInitialState=!1}});this.componentProps=n,this.updatedInitialState=!0,fn.astroPayPaymentStarted(this.componentProps.paymentExternalId),this.renderAPComponent()}handleAstroPayClick(){var n,r;if(fn.astroPayPaymentClicked(this.componentProps.paymentExternalId),(r=(n=this.componentProps).onClickCallback)==null||r.call(n),this.updatedInitialState=!0,Sb()){this.handleMobileFlow();return}if(this.componentProps.user.hasAccount){this.handleAccountFlow();return}this.renderPhoneInput()}async fetchIdentifyUser(n,r){var i,o,s;try{const a={phoneNumber:Q1(n)};if((await We.postIdentifyUser(this.componentProps.paymentExternalId,a)).user.hasAccount){fn.astroPayPaymentUserIdentified(this.componentProps.paymentExternalId),(i=this.formCountryPhone)==null||i.setDisable(!0),this.handleAccountFlow();return}r==null||r()}catch(a){const c=a;(s=(o=this.componentProps)==null?void 0:o.onError)==null||s.call(o);const u=new X({text:c.message,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.append(u)}}async handlePhoneNumberSubmit(n){try{this.formCountryPhone&&this.formCountryPhone.setLoading(!0),await this.fetchIdentifyUser(n.phoneNumber,()=>this.handleNoAccountFlow())}finally{this.formCountryPhone&&this.formCountryPhone.setLoading(!1)}}renderPhoneInput(){var n;this.element.innerHTML="",this.formCountryPhone=new Lk({availableCountries:((n=this.componentProps)==null?void 0:n.countries)??[],onSubmit:r=>{fn.astroPayPaymentPhoneNumberEntered(this.componentProps.paymentExternalId),this.handlePhoneNumberSubmit(r)}}),this.element.append(this.formCountryPhone.element)}generateRedirectUrl(){return Nk.generate(`checkout-payment/${this.componentProps.paymentExternalId}`,{data:xd(this.componentProps.paymentAmount)})}handleMobileFlow(){const n=this.generateRedirectUrl(),r=window.open(n,"_blank");(!r||r.closed||typeof r.closed>"u")&&(window.location.href=n)}handleAccountFlow(){this.renderAlreadySent(),this.checkPaymentStatus()}handleNoAccountFlow(){const n=this.generateRedirectUrl(),r=window.open(n,"_blank");(!r||r.closed||typeof r.closed>"u")&&(window.location.href=n)}renderAlreadySent(){var c;this.pushFeedbackWrapper&&this.pushFeedbackWrapper.remove(),(c=this.btnAstroPay)==null||c.setDisabled(!0),this.pushFeedbackWrapper=document.createElement("div"),this.pushFeedbackWrapper.classList.add("sent-message-wrapper");const n=new Kl({items:[{title:q.translate("push_notification_sent"),icon:"notification_fill"}],variant:"highlight",isFullWidth:!0,align:"center"}).element,r=document.createElement("div");r.classList.add("sent-message-content");const i=new X({text:q.translate("didnt_receive"),size:16,weight:600}).element,o=new X({text:q.translate("scan_qr_copy_link"),size:14,weight:400}).element;r.append(i,o);const s=new b1({width:100,value:this.generateRedirectUrl(),altText:q.translate("qr_code")}).element,a=new mn({text:q.translate("copy_payment_link"),variant:"copy-to-clipboard",size:"small",iconRight:"copy_2_line",onClick:()=>{fn.astroPayPaymentLinkCopied(this.componentProps.paymentExternalId),Js(this.generateRedirectUrl())}}).element;this.pushFeedbackWrapper.append(n,r,s,a),this.element.append(this.pushFeedbackWrapper)}async checkPaymentStatus(){try{const n=await We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message)}}initializePollingService(n){this.pollingService=new Gl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePaymentSuccess(n){var o,s;const r=[],i=new pa({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showWaitingInfo(n){if(!this.pushFeedbackWrapper)return;let r=this.pushFeedbackWrapper.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.pushFeedbackWrapper.append(r)),r.innerHTML="";const i=new an({size:12,color:Z.getStyles().textPrimaryColor}).element,o=new X({text:n,size:12}).element;r.append(i,o)}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i)}showErrorMessage(n){if(!this.pushFeedbackWrapper)return;const r=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor,align:"center"}).element;this.pushFeedbackWrapper.append(r)}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null),this.element.querySelectorAll(".loading-pooling").forEach(r=>r.remove())}removePollingContent(){this.stopPolling(),this.renderAPComponent()}destroy(){this.stopPolling(),this.element.remove()}}const Dk=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Fk=e=>ne`
|
|
801
818
|
display: flex;
|
|
802
819
|
flex-wrap: nowrap;
|
|
803
820
|
align-items: center;
|
|
@@ -812,7 +829,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
812
829
|
|
|
813
830
|
min-width: min-content;
|
|
814
831
|
white-space: nowrap;
|
|
815
|
-
`;class
|
|
832
|
+
`;class Uk extends be{constructor(n){super({tag:"div",styles:r=>Fk(r)});S(this,"compProps");S(this,"intervalId",null);S(this,"isTimeOver",!1);this.compProps={timeoutText:q.translate("time_up"),...n},this.startTimer(),this.renderTime()}startTimer(){this.intervalId=window.setInterval(()=>{var n,r;this.compProps.time-=1,this.renderTime(),this.compProps.time<=0&&(this.isTimeOver=!0,this.stopTimer(),(r=(n=this.compProps).onTimeOut)==null||r.call(n),this.renderTime())},1e3)}renderTime(){const n=Dk(this.compProps.time);if(this.element.innerHTML="",this.compProps.iconLeft){const r=new mt({name:this.compProps.iconLeft,color:Z.getStyles().timer.textColor}).element;this.element.append(r)}if(this.compProps.text){const r=this.isTimeOver?this.compProps.timeoutText:this.compProps.text,i=this.isTimeOver?"":n,o=new X({variant:"div",text:r,size:14,weight:400,lineHeight:21,color:Z.getStyles().timer.textColor,align:"center"}).element,s=new X({variant:"div",text:i,size:14,weight:600,lineHeight:21,color:Z.getStyles().timer.textColor,align:"center"}).element;if(s.style.fontFamily="monospace",this.element.append(o,s),this.compProps.iconRight){const a=new mt({name:this.compProps.iconRight,color:Z.getStyles().timer.textColor}).element;this.element.append(a)}}}stopTimer(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}destroy(){this.stopTimer(),super.destroy()}}const Bk=e=>ne`
|
|
816
833
|
display: flex;
|
|
817
834
|
flex-direction: column;
|
|
818
835
|
gap: 10px;
|
|
@@ -833,7 +850,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
833
850
|
padding: 16px;
|
|
834
851
|
border: 1px solid ${e.primaryColor};
|
|
835
852
|
border-radius: 16px;
|
|
836
|
-
background-color: ${
|
|
853
|
+
background-color: ${A.neutral_lightest};
|
|
837
854
|
}
|
|
838
855
|
|
|
839
856
|
.timeout-container {
|
|
@@ -848,7 +865,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
848
865
|
align-items: center;
|
|
849
866
|
gap: 8px;
|
|
850
867
|
}
|
|
851
|
-
`;class zv extends se{constructor(n){super({tag:"div",styles:r=>Vv(r)});S(this,"componentProps");S(this,"loadingWrapper");S(this,"timerElement",null);S(this,"timerInstance",null);S(this,"pollingService",null);this.componentProps=n,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const n=document.createElement("div");n.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element,s=new H({text:V.translate("waiting_confirmation"),size:20,lineHeight:30,weight:600}).element;s.style.marginTop="8px";const i=new H({text:V.translate("do_not_close_window"),size:16,lineHeight:24}).element;return n.append(r,s,i),n}async fetchPaymentMethodData(){var n,r;try{const s={methodCode:this.componentProps.paymentMethod.code},i=await Ie.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,s);this.renderSections(i.sections)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(i.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const n=await Ie.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Gt.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Gt.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopTimer(),this.stopPolling()}}initializePollingService(n){this.pollingService=new _c(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePollingError(n){var s,i;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(i=(s=this.componentProps)==null?void 0:s.onError)==null||i.call(s)}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentSuccess(n){var i,o;const r=[],s=new Oi({type:"success",title:(i=n.data.successSection)==null?void 0:i.title,description:(o=n.data.successSection)==null?void 0:o.description}).element;r.push(s),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showErrorMessage(n){this.element.innerHTML="";const r=document.createElement("div");r.classList.add("timeout-container");const s=new H({text:n,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;r.append(s,this.renderRetryButton()),this.element.append(r)}showWaitingInfo(n){let r=this.element.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.element.append(r)),r.innerHTML="";const s=new It({size:12,color:z.getStyles().textPrimaryColor}).element,i=new H({text:n}).element;r.append(s,i)}async renderSections(n){n.filter(r=>!!r).sort((r,s)=>r.order-s.order).forEach(r=>{const{componentType:s,metadata:i}=r;switch(s){case Xt.AMOUNT_DISPLAY:this.renderAmountDisplay(i);break;case Xt.COPY:this.renderCopy(i);break;case Xt.DESCRIPTION:this.renderDescription(i);break;case Xt.EXPIRATION_TIMER:this.renderTimer(i);break;case Xt.QR_CODE:this.renderQRCode(i);break;case Xt.SHARE:this.renderShare(i);break;default:console.warn("Unknown component type:",s)}}),await this.checkPaymentStatus()}renderCopy(n){const r=new Dt({text:n.label,variant:"copy-to-clipboard",size:"medium",iconLeft:n.iconLeft,iconRight:n.iconRight??"copy_2_line",onClick:()=>{hi(n.value)}}).element;this.element.append(r)}renderShare(n){const r=new Dt({text:n.label,variant:"text",size:"medium",iconRight:n.iconRight,iconLeft:n.iconLeft,onClick:()=>{var s,i,o;tm(((s=n==null?void 0:n.richTextInfo)==null?void 0:s.title)??"Share",((i=n==null?void 0:n.richTextInfo)==null?void 0:i.description)??n.value,(o=n==null?void 0:n.richTextInfo)==null?void 0:o.url)}}).element;this.element.append(r)}renderDescription(n){const r=new H({text:`${n.text} ${Pi(n.amount,n.currency,Le.getCurrencyMode())}`,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderQRCode(n){const r=new Th({value:n.value,altText:V.translate("qr_code")}).element;this.element.append(r)}renderAmountDisplay(n){const r=new H({text:n.value,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderTimer(n){this.timerInstance=new $v({time:n.time,text:n.label,iconLeft:n.iconLeft,iconRight:n.iconRight,timeoutText:n.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(n)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(n){this.stopPolling(),this.stopTimer();const r=document.createElement("div");r.classList.add("timeout-container"),this.timerElement&&r.append(this.timerElement),n.timeoutInfo.description&&r.append(this.renderExpiredBadge(n.timeoutInfo.description)),n.timeoutInfo.retry&&r.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(r)}renderRetryButton(){return new Dt({text:V.translate("try_again"),variant:"primary",size:"medium",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.timerElement=null,this.timerInstance=null,this.stopPolling(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}}).element}renderExpiredBadge(n){return new Cc({items:[{title:n,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.stopPolling(),this.element.remove()}}const Hv={IX:"system_pix",[st.CREDIT_CARD]:"bank_card_line",[st.DEBIT_CARD]:"bank_card_line",[st.CW]:"bank_card_line",[st.DC]:"bank_card_line",[st.CC]:"bank_card_line"},jv={[st.CREDIT_CARD]:["payment_visa","payment_master"],[st.DEBIT_CARD]:["payment_visa","payment_master"],[st.CW]:["payment_visa","payment_master"],[st.DC]:["payment_visa","payment_master"],[st.CC]:["payment_visa","payment_master"]},Wv=e=>!!e.enabled,qv=({paymentMethods:e,paymentExternalId:t,amount:n,currency:r,country:s,cardConfig:i,onSuccess:o,onError:a})=>e!=null&&e.length?e.filter(Wv).map(c=>{let l=null;const u=()=>(l==null||l.destroy(),Kf.includes(c.code)?l=new Gf({paymentExternalId:t,amount:n,currency:r,country:s,paymentMethod:c,showPaymentSummary:i==null?void 0:i.showPaymentSummary,expirationDateFormat:i==null?void 0:i.expirationDateFormat,onSuccess:o,onError:a}):l=new zv({paymentExternalId:t,paymentMethod:c,onSuccess:o,onError:a}),l.element),d=()=>{l==null||l.destroy(),l=null};return{icon:c.logo||Hv[c.code]||"pay_line",title:c.label,content:u,onClose:d,auxImage:jv[c.code]}}):[];class Gv extends se{constructor(n){super({tag:"div",elementId:"payment-component",styles:s=>Fv(s)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"accPaymentMethods");this.componentProps={...n,showTitle:n.showTitle??!0,showDescription:n.showDescription??!0,country:n.country.trim(),currency:n.currency.trim()},ct.registerComponent(this),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),xe.trackEvent("ap_cl_full_checkout_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,user:a,order:c,paymentExternalId:l}=this.componentProps;let u;if(l)u=await Ie.getPaymentDetails(l,"full_checkout");else{const d={country:o,currency:i,amount:s,user:a,order:c};u=await Ie.postCreatePayment(d,"full_checkout")}this.renderPaymentMethods(u)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const o=new H({text:i.message,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.appendChild(o)}finally{this.loadingWrapper.remove()}}renderPaymentMethods(n){var p,h;const{paymentExternalId:r,user:s,paymentMethods:i,countries:o,paymentComponentDescription:a,benefits:c}=n;if(this.element.innerHTML="",this.componentProps.showTitle){const f=new H({text:V.translate("astro_express_checkout"),variant:"div",size:16,weight:600}).element;this.element.append(f)}if(this.componentProps.showDescription&&a){const f=new H({text:a}).element;this.element.append(f)}const l={amount:this.componentProps.amount,currency:this.componentProps.currency},u=new Ah({paymentExternalId:r,user:s,countries:o,benefits:c,paymentAmount:l,onSuccess:f=>this.showSuccessContent(f),onError:this.componentProps.onError,onClickCallback:()=>{var f;return(f=this.accPaymentMethods)==null?void 0:f.closeAllItems()}});this.element.append(u.element);const d=qv({paymentMethods:i,paymentExternalId:r,amount:this.componentProps.amount,currency:this.componentProps.currency,country:this.componentProps.country,onSuccess:f=>this.showSuccessContent(f),onError:(p=this.componentProps)==null?void 0:p.onError,cardConfig:(h=this.componentProps)==null?void 0:h.cardConfig});if(d.length>0){const f=new ki({}).element;this.accPaymentMethods=new sv({items:d,onChangeContent:()=>u.removePollingContent()}),this.element.append(f,this.accPaymentMethods.element)}}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(s=>r.append(s)),this.element.append(r),xe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const s=new Ii({onSuccess:this.componentProps.onSuccess}).element;this.element.append(s)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}const Kv=e=>j`
|
|
868
|
+
`;class $k extends be{constructor(n){super({tag:"div",styles:r=>Bk(r)});S(this,"componentProps");S(this,"loadingWrapper");S(this,"timerElement",null);S(this,"timerInstance",null);S(this,"pollingService",null);this.componentProps=n,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const n=document.createElement("div");n.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:Z.getStyles().primaryColor}).element,i=new X({text:q.translate("waiting_confirmation"),size:20,lineHeight:30,weight:600}).element;i.style.marginTop="8px";const o=new X({text:q.translate("do_not_close_window"),size:16,lineHeight:24}).element;return n.append(r,i,o),n}async fetchPaymentMethodData(){var n,r,i;try{if((n=this.componentProps.paymentMethod)!=null&&n.uri){const o={methodCode:this.componentProps.paymentMethod.code},s=await We.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,o);this.renderSections(s.sections)}else throw new Error(q.translate("generic_error"))}catch(o){const s=o;(i=(r=this.componentProps)==null?void 0:r.onError)==null||i.call(r),this.showErrorMessage(s.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const n=await We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopTimer(),this.stopPolling()}}initializePollingService(n){this.pollingService=new Gl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i)}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentSuccess(n){var o,s;const r=[],i=new pa({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showErrorMessage(n){this.element.innerHTML="";const r=document.createElement("div");r.classList.add("timeout-container");const i=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;r.append(i,this.renderRetryButton()),this.element.append(r)}showWaitingInfo(n){let r=this.element.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.element.append(r)),r.innerHTML="";const i=new an({size:12,color:Z.getStyles().textPrimaryColor}).element,o=new X({text:n}).element;r.append(i,o)}async renderSections(n){n.filter(r=>!!r).sort((r,i)=>r.order-i.order).forEach(r=>{const{componentType:i,metadata:o}=r;switch(i){case Dn.AMOUNT_DISPLAY:this.renderAmountDisplay(o);break;case Dn.COPY:this.renderCopy(o);break;case Dn.DESCRIPTION:this.renderDescription(o);break;case Dn.EXPIRATION_TIMER:this.renderTimer(o);break;case Dn.QR_CODE:this.renderQRCode(o);break;case Dn.SHARE:this.renderShare(o);break;default:console.warn("Unknown component type:",i)}}),await this.checkPaymentStatus()}renderCopy(n){const r=new mn({text:n.label,variant:"copy-to-clipboard",size:"medium",iconLeft:n.iconLeft,iconRight:n.iconRight??"copy_2_line",onClick:()=>{Js(n.value)}}).element;this.element.append(r)}renderShare(n){const r=new mn({text:n.label,variant:"text",size:"medium",iconRight:n.iconRight,iconLeft:n.iconLeft,onClick:()=>{var i,o,s;G1(((i=n==null?void 0:n.richTextInfo)==null?void 0:i.title)??"Share",((o=n==null?void 0:n.richTextInfo)==null?void 0:o.description)??n.value,(s=n==null?void 0:n.richTextInfo)==null?void 0:s.url)}}).element;this.element.append(r)}renderDescription(n){const r=new X({text:`${n.text} ${fa(n.amount,n.currency,Ye.getCurrencyMode())}`,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderQRCode(n){const r=new b1({value:n.value,altText:q.translate("qr_code")}).element;this.element.append(r)}renderAmountDisplay(n){const r=new X({text:n.value,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderTimer(n){this.timerInstance=new Uk({time:n.time,text:n.label,iconLeft:n.iconLeft,iconRight:n.iconRight,timeoutText:n.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(n)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(n){this.stopPolling(),this.stopTimer();const r=document.createElement("div");r.classList.add("timeout-container"),this.timerElement&&r.append(this.timerElement),n.timeoutInfo.description&&r.append(this.renderExpiredBadge(n.timeoutInfo.description)),n.timeoutInfo.retry&&r.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(r)}renderRetryButton(){return new mn({text:q.translate("try_again"),variant:"primary",size:"medium",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.timerElement=null,this.timerInstance=null,this.stopPolling(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}}).element}renderExpiredBadge(n){return new Kl({items:[{title:n,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.stopPolling(),this.element.remove()}}const Vk={[Oe.AP]:"astropay_payment_method",[Oe.IX]:"system_pix",[Oe.CREDIT_CARD]:"bank_card_line",[Oe.DEBIT_CARD]:"bank_card_line",[Oe.CW]:"bank_card_line",[Oe.DC]:"bank_card_line",[Oe.CC]:"bank_card_line"},zk={[Oe.CREDIT_CARD]:["payment_visa","payment_master"],[Oe.DEBIT_CARD]:["payment_visa","payment_master"],[Oe.CW]:["payment_visa","payment_master"],[Oe.DC]:["payment_visa","payment_master"],[Oe.CC]:["payment_visa","payment_master"]},Hk=(e,t)=>{switch(e){case Oe.CREDIT_CARD:case Oe.DEBIT_CARD:case Oe.CW:case Oe.DC:case Oe.CC:fn.astroPayPaymentCardClicked(t);break}},jk=e=>!!e.enabled,qk=(e,t)=>{const{paymentExternalId:n,amount:r,currency:i,country:o,user:s,countries:a,benefits:c,cardConfig:u,actionLabel:l,onSuccess:d,onError:f}=t;switch(e.code){case Oe.AP:return new w1({paymentExternalId:n,user:s,countries:a,benefits:c,paymentAmount:{amount:r,currency:i},actionLabel:l,onSuccess:d,onError:f});default:return $0.includes(e.code)?new B0({paymentExternalId:n,amount:r,currency:i,country:o,paymentMethod:e,showPaymentSummary:u==null?void 0:u.showPaymentSummary,expirationDateFormat:u==null?void 0:u.expirationDateFormat,onSuccess:d,onError:f}):new $k({paymentExternalId:n,paymentMethod:e,onSuccess:d,onError:f})}},Wk=({paymentMethods:e,paymentExternalId:t,...n})=>e!=null&&e.length?e.filter(jk).map(r=>{let i=null;const o=()=>{i==null||i.destroy();const a={paymentExternalId:t,...n};return i=qk(r,a),i.element},s=()=>{i==null||i.destroy(),i=null};return{icon:r.logo||Vk[r.code]||"pay_line",title:r.label,description:r==null?void 0:r.description,auxImage:zk[r.code],content:o,onClose:s,onClickCallback:()=>Hk(r.code,t)}}):[];class Gk extends be{constructor(n){super({tag:"div",elementId:"payment-component",styles:i=>rk(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"accPaymentMethods");this.componentProps={...n,showTitle:n.showTitle??!0,showDescription:n.showDescription??!0,country:n.country.trim(),currency:n.currency.trim()},Ft.registerComponent(this),fn.astroPayPaymentImpression("AstroPayFullCheckout"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.trackEvent("ap_cl_full_checkout_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,user:a,order:c,paymentExternalId:u}=this.componentProps;let l;if(u)l=await We.getPaymentDetails(u,"full_checkout");else{const d={country:s,currency:o,amount:i,user:a,order:c};l=await We.postCreatePayment(d,"full_checkout")}this.renderPaymentMethods(l)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const s=new X({text:o.message,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.appendChild(s)}finally{this.loadingWrapper.remove()}}renderPaymentMethods(n){var f,h,p,g;const{paymentExternalId:r,user:i,paymentMethods:o,countries:s,paymentComponentDescription:a,benefits:c,metadata:u}=n;if(this.element.innerHTML="",this.componentProps.showTitle){const m=new X({text:q.translate("checkout_method"),variant:"div",size:26,lineHeight:36,weight:600}).element;this.element.append(m)}if(this.componentProps.showDescription&&a){const m=new X({text:a,size:14,color:Z.getStyles().textSecondaryColor,weight:400}).element;this.element.append(m)}const l={code:Oe.AP,label:((f=n==null?void 0:n.metadata)==null?void 0:f.title)||q.translate("astro_express_checkout"),description:(h=n==null?void 0:n.metadata)==null?void 0:h.description,enabled:!0},d=Wk({paymentMethods:[l,...o??[]],paymentExternalId:r,amount:this.componentProps.amount,currency:this.componentProps.currency,country:this.componentProps.country,user:i,countries:s,benefits:c,actionLabel:u==null?void 0:u.actionLabel,onSuccess:m=>this.showSuccessContent(m),onError:(p=this.componentProps)==null?void 0:p.onError,cardConfig:(g=this.componentProps)==null?void 0:g.cardConfig});d.length>0&&(this.accPaymentMethods=new nk({items:d,defaultActiveItem:0}),this.element.append(this.accPaymentMethods.element))}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ft.unregisterComponent(this)}}const Kk=e=>ne`
|
|
852
869
|
background-color: ${e.backgroundColor};
|
|
853
870
|
|
|
854
871
|
display: flex;
|
|
@@ -875,5 +892,5 @@ Minimum version required to store current data is: `+k+`.
|
|
|
875
892
|
align-items: center;
|
|
876
893
|
gap: 8px;
|
|
877
894
|
}
|
|
878
|
-
`;class Yv extends se{constructor(n){super({tag:"div",styles:s=>Kv(s)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="AP",ct.registerComponent(this),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),xe.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,user:a,order:c}=this.componentProps,l={country:o,currency:i,amount:s,user:a,order:c,methodCode:this.methodCode},u=await Ie.postCreatePayment(l,"astropay_payment");this.renderAstroPayMethod(u)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const o=new H({text:i.message,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.appendChild(o)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(n){const{paymentExternalId:r,user:s,countries:i,benefits:o}=n;this.element.innerHTML="";const a={amount:this.componentProps.amount,currency:this.componentProps.currency},c=new Ah({paymentExternalId:r,user:s,countries:i,benefits:o,paymentAmount:a,onSuccess:l=>this.showSuccessContent(l)}).element;this.element.append(c)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(s=>r.append(s)),this.element.append(r),xe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const s=new Ii({onSuccess:this.componentProps.onSuccess}).element;this.element.append(s)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}Yh();const Kc=new WeakMap;function _t(e){return Kc.has(e)}function Zv(e){let t=e;for(;t;){if(!_t(t)&&!Xa(t))return!1;t=Gs(t)}return!0}function je(e){return Kc.get(e)}function Jv(e,t){Kc.set(e,t)}function Yc(e,t){const n=e.tagName,r=e.value;if(Ks(e,t)){const s=e.type;return n==="INPUT"&&(s==="button"||s==="submit"||s==="reset")?r:!r||n==="OPTION"?void 0:qt}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const Xv=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Qv=/^[A-Za-z]+:|^\/\//,eS=/^data:.*,/i;function tS(e,t){return e.replace(Xv,(n,r,s,i,o,a)=>{const c=s||o||a;if(!t||!c||Qv.test(c)||eS.test(c))return n;const l=r||i||"";return`url(${l}${nS(c,t)}${l})`})}function nS(e,t){try{return Fs(e,t).href}catch{return e}}const rS=/[^a-z1-6-_]/;function kh(e){const t=e.toLowerCase().trim();return rS.test(t)?"div":t}function Rh(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}const Ct={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},wn={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},ot={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},dt={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Ph={Play:0,Pause:1};function Oh(e){if(!(e===void 0||e.length===0))return e.map(t=>{const n=t.cssRules||t.rules;return{cssRules:Array.from(n,i=>i.cssText),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}})}function Lh(e,t,n,r){if(t===D.HIDDEN)return null;const s=e.getAttribute(n);if(t===D.MASK&&n!==Qa&&!mp.includes(n)&&n!==r.actionNameAttribute){const i=e.tagName;switch(n){case"title":case"alt":case"placeholder":return qt}if(i==="IMG"&&(n==="src"||n==="srcset")){const o=e;if(o.naturalWidth>0)return Rh(o.naturalWidth,o.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?Rh(a,c):ip}if(i==="SOURCE"&&(n==="src"||n==="srcset"))return ip;if(i==="A"&&n==="href"||s&&n.startsWith("data-")||i==="IFRAME"&&n==="srcdoc")return qt}return!s||typeof s!="string"?s:Zd(s)?Jd(s):s}function sS(e,t,n){if(t===D.HIDDEN)return{};const r={},s=kh(e.tagName),i=e.ownerDocument;for(let u=0;u<e.attributes.length;u+=1){const p=e.attributes.item(u).name,h=Lh(e,t,p,n.configuration);h!==null&&(r[p]=h)}if(e.value&&(s==="textarea"||s==="select"||s==="option"||s==="input")){const u=Yc(e,t);u!==void 0&&(r.value=u)}if(s==="option"&&t===D.ALLOW){const u=e;u.selected&&(r.selected=u.selected)}if(s==="link"){const u=Array.from(i.styleSheets).find(p=>p.href===e.href),d=Zc(u);d&&u&&(r._cssText=d)}if(s==="style"&&e.sheet){const u=Zc(e.sheet);u&&(r._cssText=u)}const o=e;if(s==="input"&&(o.type==="radio"||o.type==="checkbox")&&(t===D.ALLOW?r.checked=!!o.checked:Ks(o,t)&&delete r.checked),s==="audio"||s==="video"){const u=e;r.rr_mediaState=u.paused?"paused":"played"}let a,c;const l=n.serializationContext;switch(l.status){case 0:a=Math.round(e.scrollTop),c=Math.round(e.scrollLeft),(a||c)&&l.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:c});break;case 1:l.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:c}=l.elementsScrollPositions.get(e));break}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}function Zc(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,k1()?iS:Nh).join("");return tS(n,e.href)}function iS(e){if(aS(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return Nh(e)}function Nh(e){return oS(e)&&Zc(e.styleSheet)||e.cssText}function oS(e){return"styleSheet"in e}function aS(e){return"selectorText"in e}function Jc(e,t){const n=uS(e,t);if(!n)return null;const r=je(e)||lS(),s=n;return s.id=r,Jv(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),s}let cS=1;function lS(){return cS++}function Xc(e,t){const n=[];return sp(e,r=>{const s=Jc(r,t);s&&n.push(s)}),n}function uS(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return dS(e,t);case e.DOCUMENT_FRAGMENT_NODE:return pS(e,t);case e.DOCUMENT_TYPE_NODE:return fS(e);case e.ELEMENT_NODE:return hS(e,t);case e.TEXT_NODE:return gS(e,t);case e.CDATA_SECTION_NODE:return bS()}}function dS(e,t){return{type:wn.Document,childNodes:Xc(e,t),adoptedStyleSheets:Oh(e.adoptedStyleSheets)}}function pS(e,t){const n=Xa(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:wn.DocumentFragment,childNodes:Xc(e,t),isShadowRoot:n,adoptedStyleSheets:n?Oh(e.adoptedStyleSheets):void 0}}function fS(e){return{type:wn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function hS(e,t){const n=kh(e.tagName),r=mS(e)||void 0,s=op(ap(e),t.parentNodePrivacyLevel);if(s===D.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:wn.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[Qa]:by},childNodes:[],isSVG:r}}if(s===D.IGNORE)return;const i=sS(e,s,t);let o=[];if(gy(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===s&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:s,ignoreWhiteSpace:n==="head"},o=Xc(e,a)}return{type:wn.Element,tagName:n,attributes:i,childNodes:o,isSVG:r}}function mS(e){return e.tagName==="svg"||e instanceof SVGElement}function gS(e,t){const n=lp(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:wn.Text,textContent:n}}function bS(){return{type:wn.CDATA,textContent:""}}function yS(e,t,n){return Jc(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function Mh(e){return!!e.changedTouches}function Wr(e){return e.composed===!0&&qs(e.target)?e.composedPath()[0]:e.target}const Dh=25;function wS(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>Dh||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>Dh}const vS=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)wS(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},Fh=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function pt(e,t){return{data:{source:e,...t},type:Ct.IncrementalSnapshot,timestamp:ye()}}const SS=50;function _S(e,t){const{throttled:n,cancel:r}=zt(i=>{const o=Wr(i);if(_t(o)){const a=Bh(i);if(!a)return;const c={id:je(o),timeOffset:0,x:a.x,y:a.y};t(pt(Mh(i)?ot.TouchMove:ot.MouseMove,{positions:[c]}))}},SS,{trailing:!1}),{stop:s}=Ve(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{s(),r()}}}function Bh(e){let{clientX:t,clientY:n}=Mh(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:s}=vS(t,n);t=r,n=s}if(!Number.isFinite(t)||!Number.isFinite(n)){e.isTrusted&&Rt("mouse/touch event without x/y");return}return{x:t,y:n}}const Uh={pointerup:dt.MouseUp,mousedown:dt.MouseDown,click:dt.Click,contextmenu:dt.ContextMenu,dblclick:dt.DblClick,focus:dt.Focus,blur:dt.Blur,touchstart:dt.TouchStart,touchend:dt.TouchEnd};function CS(e,t,n){const r=s=>{const i=Wr(s);if(wt(i,e.defaultPrivacyLevel)===D.HIDDEN||!_t(i))return;const o=je(i),a=Uh[s.type];let c;if(a!==dt.Blur&&a!==dt.Focus){const u=Bh(s);if(!u)return;c={id:o,type:a,x:u.x,y:u.y}}else c={id:o,type:a};const l={id:n.getIdForEvent(s),...pt(ot.MouseInteraction,c)};t(l)};return Ve(e,document,Object.keys(Uh),r,{capture:!0,passive:!0})}const ES=100;function $h(e,t,n,r=document){const{throttled:s,cancel:i}=zt(a=>{const c=Wr(a);if(!c||wt(c,e.defaultPrivacyLevel)===D.HIDDEN||!_t(c))return;const l=je(c),u=c===document?{scrollTop:rc(),scrollLeft:$p()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,u),t(pt(ot.Scroll,{id:l,x:u.scrollLeft,y:u.scrollTop}))},ES),{stop:o}=oe(e,r,"scroll",s,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}const xS=200;function IS(e,t){const n=Vp(e).subscribe(r=>{t(pt(ot.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function TS(e,t){const n=window.visualViewport;if(!n)return{stop:q};const{throttled:r,cancel:s}=zt(()=>{t({data:Fh(n),type:Ct.VisualViewport,timestamp:ye()})},xS,{trailing:!1}),{stop:i}=Ve(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{i(),s()}}}function AS(e,t){return Ve(e,document,["play","pause"],n=>{const r=Wr(n);!r||wt(r,e.defaultPrivacyLevel)===D.HIDDEN||!_t(r)||t(pt(ot.MediaInteraction,{id:je(r),type:n.type==="play"?Ph.Play:Ph.Pause}))},{capture:!0,passive:!0})}function kS(e){function t(s,i){s&&_t(s.ownerNode)&&i(je(s.ownerNode))}const n=[$e(CSSStyleSheet.prototype,"insertRule",({target:s,parameters:[i,o]})=>{t(s,a=>e(pt(ot.StyleSheetRule,{id:a,adds:[{rule:i,index:o}]})))}),$e(CSSStyleSheet.prototype,"deleteRule",({target:s,parameters:[i]})=>{t(s,o=>e(pt(ot.StyleSheetRule,{id:o,removes:[{index:i}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(s){n.push($e(s.prototype,"insertRule",({target:i,parameters:[o,a]})=>{t(i.parentStyleSheet,c=>{const l=Vh(i);l&&(l.push(a||0),e(pt(ot.StyleSheetRule,{id:c,adds:[{rule:o,index:l}]})))})}),$e(s.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i.parentStyleSheet,a=>{const c=Vh(i);c&&(c.push(o),e(pt(ot.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(s=>s.stop())}}}function Vh(e){const t=[];let n=e;for(;n.parentRule;){const o=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(o),n=n.parentRule}if(!n.parentStyleSheet)return;const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(s),t}function RS(e,t){return Ve(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:Ct.Focus,timestamp:ye()})})}function PS(e,t,n){const r=e.subscribe(12,s=>{var i,o;s.rawRumEvent.type==="action"&&s.rawRumEvent.action.type==="click"&&(!((o=(i=s.rawRumEvent.action.frustration)===null||i===void 0?void 0:i.type)===null||o===void 0)&&o.length)&&"events"in s.domainContext&&s.domainContext.events&&s.domainContext.events.length&&t({timestamp:s.rawRumEvent.date,type:Ct.FrustrationRecord,data:{frustrationTypes:s.rawRumEvent.action.frustration.type,recordIds:s.domainContext.events.map(a=>n.getIdForEvent(a))}})});return{stop:()=>{r.unsubscribe()}}}function OS(e,t){const n=e.subscribe(5,()=>{t({timestamp:ye(),type:Ct.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function zh(e,t,n=document){const r=e.defaultPrivacyLevel,s=new WeakMap,i=n!==document,{stop:o}=Ve(e,n,i?["change"]:["input","change"],u=>{const d=Wr(u);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(i)a=q;else{const u=[Rr(HTMLInputElement.prototype,"value",c),Rr(HTMLInputElement.prototype,"checked",c),Rr(HTMLSelectElement.prototype,"value",c),Rr(HTMLTextAreaElement.prototype,"value",c),Rr(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{u.forEach(d=>d.stop())}}return{stop:()=>{a(),o()}};function c(u){const d=wt(u,r);if(d===D.HIDDEN)return;const p=u.type;let h;if(p==="radio"||p==="checkbox"){if(Ks(u,d))return;h={isChecked:u.checked}}else{const m=Yc(u,d);if(m===void 0)return;h={text:m}}l(u,h);const f=u.name;p==="radio"&&f&&u.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(f)}"]`).forEach(m=>{m!==u&&l(m,{isChecked:!1})})}function l(u,d){if(!_t(u))return;const p=s.get(u);(!p||p.text!==d.text||p.isChecked!==d.isChecked)&&(s.set(u,d),t(pt(ot.Input,{id:je(u),...d})))}}const LS=100,NS=16;function MS(e){let t=q,n=[];function r(){t(),e(n),n=[]}const{throttled:s,cancel:i}=zt(r,NS,{leading:!1});return{addMutations:o=>{n.length===0&&(t=Td(s,{timeout:LS})),n.push(...o)},flush:r,stop:()=>{t(),i()}}}function Hh(e,t,n,r){const s=Vd();if(!s)return{stop:q,flush:q};const i=MS(a=>{DS(a.concat(o.takeRecords()),e,t,n)}),o=new s($(i.addMutations));return o.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),i.stop()},flush:()=>{i.flush()}}}function DS(e,t,n,r){const s=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(p=>{jh(p,r.removeShadowRoot)})});const i=e.filter(d=>d.target.isConnected&&Zv(d.target)&&wt(d.target,n.defaultPrivacyLevel,s)!==D.HIDDEN),{adds:o,removes:a,hasBeenSerialized:c}=FS(i.filter(d=>d.type==="childList"),n,r,s),l=BS(i.filter(d=>d.type==="characterData"&&!c(d.target)),n,s),u=US(i.filter(d=>d.type==="attributes"&&!c(d.target)),n,s);!l.length&&!u.length&&!a.length&&!o.length||t(pt(ot.Mutation,{adds:o,removes:a,texts:l,attributes:u}))}function FS(e,t,n,r){const s=new Set,i=new Map;for(const p of e)p.addedNodes.forEach(h=>{s.add(h)}),p.removedNodes.forEach(h=>{s.has(h)||i.set(h,p.target),s.delete(h)});const o=Array.from(s);$S(o);const a=new Set,c=[];for(const p of o){if(u(p))continue;const h=wt(p.parentNode,t.defaultPrivacyLevel,r);if(h===D.HIDDEN||h===D.IGNORE)continue;const f=Jc(p,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!f)continue;const m=Gs(p);c.push({nextId:d(p),parentId:je(m),node:f})}const l=[];return i.forEach((p,h)=>{_t(h)&&l.push({parentId:je(p),id:je(h)})}),{adds:c,removes:l,hasBeenSerialized:u};function u(p){return _t(p)&&a.has(je(p))}function d(p){let h=p.nextSibling;for(;h;){if(_t(h))return je(h);h=h.nextSibling}return null}}function BS(e,t,n){var r;const s=[],i=new Set,o=e.filter(a=>i.has(a.target)?!1:(i.add(a.target),!0));for(const a of o){if(a.target.textContent===a.oldValue)continue;const l=wt(Gs(a.target),t.defaultPrivacyLevel,n);l===D.HIDDEN||l===D.IGNORE||s.push({id:je(a.target),value:(r=lp(a.target,!1,l))!==null&&r!==void 0?r:null})}return s}function US(e,t,n){const r=[],s=new Map,i=e.filter(a=>{const c=s.get(a.target);return c&&c.has(a.attributeName)?!1:(c?c.add(a.attributeName):s.set(a.target,new Set([a.attributeName])),!0)}),o=new Map;for(const a of i){if(a.target.getAttribute(a.attributeName)===a.oldValue)continue;const l=wt(a.target,t.defaultPrivacyLevel,n),u=Lh(a.target,l,a.attributeName,t);let d;if(a.attributeName==="value"){const h=Yc(a.target,l);if(h===void 0)continue;d=h}else typeof u=="string"?d=u:d=null;let p=o.get(a.target);p||(p={id:je(a.target),attributes:{}},r.push(p),o.set(a.target,p)),p.attributes[a.attributeName]=d}return r}function $S(e){e.sort((t,n)=>{const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_CONTAINS||r&Node.DOCUMENT_POSITION_FOLLOWING?1:r&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function jh(e,t){qs(e)&&t(e.shadowRoot),sp(e,n=>jh(n,t))}function VS(){const e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}const zS=(e,t,n)=>{const r=new Map,s={addShadowRoot:i=>{if(r.has(i))return;const o=Hh(t,e,s,i),a=zh(e,t,i),c=$h(e,t,n,i);r.set(i,{flush:()=>o.flush(),stop:()=>{o.stop(),a.stop(),c.stop()}})},removeShadowRoot:i=>{const o=r.get(i);o&&(o.stop(),r.delete(i))},stop:()=>{r.forEach(({stop:i})=>i())},flush:()=>{r.forEach(({flush:i})=>i())}};return s};function HS(e,t,n,r,s,i){const o=(c=ye(),l={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:u,height:d}=Qs(),p=[{data:{height:d,href:window.location.href,width:u},type:Ct.Meta,timestamp:c},{data:{has_focus:document.hasFocus()},type:Ct.Focus,timestamp:c},{data:{node:yS(document,r,l),initialOffset:{left:$p(),top:rc()}},type:Ct.FullSnapshot,timestamp:c}];return window.visualViewport&&p.push({data:Fh(window.visualViewport),type:Ct.VisualViewport,timestamp:c}),p};i(o());const{unsubscribe:a}=n.subscribe(2,c=>{s(),i(o(c.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))});return{stop:a}}function jS(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function WS(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const s=p=>{t(p),Ma("record",{record:p});const h=e.viewHistory.findView();Q5(h.id)},i=VS(),o=zS(n,s,i),{stop:a}=HS(i,o,r,n,c,p=>p.forEach(h=>s(h)));function c(){o.flush(),u.flush()}const l=jS(),u=Hh(s,n,o,document),d=[u,_S(n,s),CS(n,s,l),$h(n,s,i,document),IS(n,s),zh(n,s),AS(n,s),kS(s),RS(n,s),TS(n,s),PS(r,s,l),OS(r,p=>{c(),s(p)})];return{stop:()=>{o.stop(),d.forEach(p=>p.stop()),a()},flushMutations:c,shadowRootsController:o}}function qS(e,t,n){const r=new FormData;r.append("segment",new Blob([e],{type:"application/octet-stream"}),`${t.session.id}-${t.start}`);const s={raw_segment_size:n,compressed_segment_size:e.byteLength,...t},i=JSON.stringify(s);return r.append("event",new Blob([i],{type:"application/json"})),{data:r,bytesCount:e.byteLength}}function GS({context:e,creationReason:t,encoder:n}){let r=0;const s=e.view.id,i={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:J5(s),source:"browser",...e};X5(s);function o(c,l){i.start=Math.min(i.start,c.timestamp),i.end=Math.max(i.end,c.timestamp),i.records_count+=1,i.has_full_snapshot||(i.has_full_snapshot=c.type===Ct.FullSnapshot);const u=n.isEmpty?'{"records":[':",";n.write(u+JSON.stringify(c),d=>{r+=d,l(r)})}function a(c){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(i).slice(1)}
|
|
879
|
-
`),n.finish(
|
|
895
|
+
`;class Yk extends be{constructor(n){super({tag:"div",styles:i=>Kk(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="AP",Ft.registerComponent(this),fn.astroPayPaymentImpression("AstroPayPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,user:a,order:c}=this.componentProps,u={country:s,currency:o,amount:i,user:a,order:c,methodCode:this.methodCode},l=await We.postCreatePayment(u,"astropay_payment");this.renderAstroPayMethod(l)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const s=new X({text:o.message,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.appendChild(s)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(n){const{paymentExternalId:r,user:i,countries:o,benefits:s,metadata:a}=n;this.element.innerHTML="";const c={amount:this.componentProps.amount,currency:this.componentProps.currency},u=new w1({paymentExternalId:r,user:i,countries:o,benefits:s,paymentAmount:c,actionLabel:a==null?void 0:a.actionLabel,onSuccess:l=>this.showSuccessContent(l)}).element;this.element.append(u)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ft.unregisterComponent(this)}}V1();const bd=new WeakMap;function tn(e){return bd.has(e)}function Jk(e){let t=e;for(;t;){if(!tn(t)&&!_l(t))return!1;t=ks(t)}return!0}function ht(e){return bd.get(e)}function Zk(e,t){bd.set(e,t)}function wd(e,t){const n=e.tagName,r=e.value;if(Rs(e,t)){const i=e.type;return n==="INPUT"&&(i==="button"||i==="submit"||i==="reset")?r:!r||n==="OPTION"?void 0:Pn}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const Xk=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Qk=/^[A-Za-z]+:|^\/\//,eR=/^data:.*,/i;function tR(e,t){return e.replace(Xk,(n,r,i,o,s,a)=>{const c=i||s||a;if(!t||!c||Qk.test(c)||eR.test(c))return n;const u=r||o||"";return`url(${u}${nR(c,t)}${u})`})}function nR(e,t){try{return bs(e,t).href}catch{return e}}const rR=/[^a-z1-6-_]/;function E1(e){const t=e.toLowerCase().trim();return rR.test(t)?"div":t}function S1(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}const nn={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},rr={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Lt={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},$t={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},_1={Play:0,Pause:1};function C1(e){if(!(e===void 0||e.length===0))return e.map(t=>{const n=t.cssRules||t.rules;return{cssRules:Array.from(n,o=>o.cssText),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}})}function T1(e,t,n,r){if(t===H.HIDDEN)return null;const i=e.getAttribute(n);if(t===H.MASK&&n!==Cl&&!cv.includes(n)&&n!==r.actionNameAttribute){const o=e.tagName;switch(n){case"title":case"alt":case"placeholder":return Pn}if(o==="IMG"&&(n==="src"||n==="srcset")){const s=e;if(s.naturalWidth>0)return S1(s.naturalWidth,s.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?S1(a,c):Xm}if(o==="SOURCE"&&(n==="src"||n==="srcset"))return Xm;if(o==="A"&&n==="href"||i&&n.startsWith("data-")||o==="IFRAME"&&n==="srcdoc")return Pn}return!i||typeof i!="string"?i:Hm(i)?jm(i):i}function iR(e,t,n){if(t===H.HIDDEN)return{};const r={},i=E1(e.tagName),o=e.ownerDocument;for(let l=0;l<e.attributes.length;l+=1){const f=e.attributes.item(l).name,h=T1(e,t,f,n.configuration);h!==null&&(r[f]=h)}if(e.value&&(i==="textarea"||i==="select"||i==="option"||i==="input")){const l=wd(e,t);l!==void 0&&(r.value=l)}if(i==="option"&&t===H.ALLOW){const l=e;l.selected&&(r.selected=l.selected)}if(i==="link"){const l=Array.from(o.styleSheets).find(f=>f.href===e.href),d=Ed(l);d&&l&&(r._cssText=d)}if(i==="style"&&e.sheet){const l=Ed(e.sheet);l&&(r._cssText=l)}const s=e;if(i==="input"&&(s.type==="radio"||s.type==="checkbox")&&(t===H.ALLOW?r.checked=!!s.checked:Rs(s,t)&&delete r.checked),i==="audio"||i==="video"){const l=e;r.rr_mediaState=l.paused?"paused":"played"}let a,c;const u=n.serializationContext;switch(u.status){case 0:a=Math.round(e.scrollTop),c=Math.round(e.scrollLeft),(a||c)&&u.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:c});break;case 1:u.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:c}=u.elementsScrollPositions.get(e));break}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}function Ed(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,IC()?oR:I1).join("");return tR(n,e.href)}function oR(e){if(aR(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return I1(e)}function I1(e){return sR(e)&&Ed(e.styleSheet)||e.cssText}function sR(e){return"styleSheet"in e}function aR(e){return"selectorText"in e}function Sd(e,t){const n=lR(e,t);if(!n)return null;const r=ht(e)||uR(),i=n;return i.id=r,Zk(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}let cR=1;function uR(){return cR++}function _d(e,t){const n=[];return Zm(e,r=>{const i=Sd(r,t);i&&n.push(i)}),n}function lR(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return dR(e,t);case e.DOCUMENT_FRAGMENT_NODE:return fR(e,t);case e.DOCUMENT_TYPE_NODE:return pR(e);case e.ELEMENT_NODE:return hR(e,t);case e.TEXT_NODE:return mR(e,t);case e.CDATA_SECTION_NODE:return vR()}}function dR(e,t){return{type:rr.Document,childNodes:_d(e,t),adoptedStyleSheets:C1(e.adoptedStyleSheets)}}function fR(e,t){const n=_l(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:rr.DocumentFragment,childNodes:_d(e,t),isShadowRoot:n,adoptedStyleSheets:n?C1(e.adoptedStyleSheets):void 0}}function pR(e){return{type:rr.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function hR(e,t){const n=E1(e.tagName),r=gR(e)||void 0,i=Qm(ev(e),t.parentNodePrivacyLevel);if(i===H.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:rr.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[Cl]:h5},childNodes:[],isSVG:r}}if(i===H.IGNORE)return;const o=iR(e,i,t);let s=[];if(p5(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===i&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:i,ignoreWhiteSpace:n==="head"},s=_d(e,a)}return{type:rr.Element,tagName:n,attributes:o,childNodes:s,isSVG:r}}function gR(e){return e.tagName==="svg"||e instanceof SVGElement}function mR(e,t){const n=nv(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:rr.Text,textContent:n}}function vR(){return{type:rr.CDATA,textContent:""}}function yR(e,t,n){return Sd(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function x1(e){return!!e.changedTouches}function no(e){return e.composed===!0&&As(e.target)?e.composedPath()[0]:e.target}const A1=25;function bR(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>A1||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>A1}const wR=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)bR(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},k1=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function Vt(e,t){return{data:{source:e,...t},type:nn.IncrementalSnapshot,timestamp:Fe()}}const ER=50;function SR(e,t){const{throttled:n,cancel:r}=xn(o=>{const s=no(o);if(tn(s)){const a=R1(o);if(!a)return;const c={id:ht(s),timeOffset:0,x:a.x,y:a.y};t(Vt(x1(o)?Lt.TouchMove:Lt.MouseMove,{positions:[c]}))}},ER,{trailing:!1}),{stop:i}=dt(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function R1(e){let{clientX:t,clientY:n}=x1(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:i}=wR(t,n);t=r,n=i}if(!Number.isFinite(t)||!Number.isFinite(n)){e.isTrusted&&dn("mouse/touch event without x/y");return}return{x:t,y:n}}const P1={pointerup:$t.MouseUp,mousedown:$t.MouseDown,click:$t.Click,contextmenu:$t.ContextMenu,dblclick:$t.DblClick,focus:$t.Focus,blur:$t.Blur,touchstart:$t.TouchStart,touchend:$t.TouchEnd};function _R(e,t,n){const r=i=>{const o=no(i);if(Xt(o,e.defaultPrivacyLevel)===H.HIDDEN||!tn(o))return;const s=ht(o),a=P1[i.type];let c;if(a!==$t.Blur&&a!==$t.Focus){const l=R1(i);if(!l)return;c={id:s,type:a,x:l.x,y:l.y}}else c={id:s,type:a};const u={id:n.getIdForEvent(i),...Vt(Lt.MouseInteraction,c)};t(u)};return dt(e,document,Object.keys(P1),r,{capture:!0,passive:!0})}const CR=100;function O1(e,t,n,r=document){const{throttled:i,cancel:o}=xn(a=>{const c=no(a);if(!c||Xt(c,e.defaultPrivacyLevel)===H.HIDDEN||!tn(c))return;const u=ht(c),l=c===document?{scrollTop:Al(),scrollLeft:Lv()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,l),t(Vt(Lt.Scroll,{id:u,x:l.scrollLeft,y:l.scrollTop}))},CR),{stop:s}=Se(e,r,"scroll",i,{capture:!0,passive:!0});return{stop:()=>{s(),o()}}}const TR=200;function IR(e,t){const n=Nv(e).subscribe(r=>{t(Vt(Lt.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function xR(e,t){const n=window.visualViewport;if(!n)return{stop:ae};const{throttled:r,cancel:i}=xn(()=>{t({data:k1(n),type:nn.VisualViewport,timestamp:Fe()})},TR,{trailing:!1}),{stop:o}=dt(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}function AR(e,t){return dt(e,document,["play","pause"],n=>{const r=no(n);!r||Xt(r,e.defaultPrivacyLevel)===H.HIDDEN||!tn(r)||t(Vt(Lt.MediaInteraction,{id:ht(r),type:n.type==="play"?_1.Play:_1.Pause}))},{capture:!0,passive:!0})}function kR(e){function t(i,o){i&&tn(i.ownerNode)&&o(ht(i.ownerNode))}const n=[lt(CSSStyleSheet.prototype,"insertRule",({target:i,parameters:[o,s]})=>{t(i,a=>e(Vt(Lt.StyleSheetRule,{id:a,adds:[{rule:o,index:s}]})))}),lt(CSSStyleSheet.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i,s=>e(Vt(Lt.StyleSheetRule,{id:s,removes:[{index:o}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(i){n.push(lt(i.prototype,"insertRule",({target:o,parameters:[s,a]})=>{t(o.parentStyleSheet,c=>{const u=L1(o);u&&(u.push(a||0),e(Vt(Lt.StyleSheetRule,{id:c,adds:[{rule:s,index:u}]})))})}),lt(i.prototype,"deleteRule",({target:o,parameters:[s]})=>{t(o.parentStyleSheet,a=>{const c=L1(o);c&&(c.push(s),e(Vt(Lt.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(i=>i.stop())}}}function L1(e){const t=[];let n=e;for(;n.parentRule;){const s=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(s),n=n.parentRule}if(!n.parentStyleSheet)return;const i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(i),t}function RR(e,t){return dt(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:nn.Focus,timestamp:Fe()})})}function PR(e,t,n){const r=e.subscribe(12,i=>{var o,s;i.rawRumEvent.type==="action"&&i.rawRumEvent.action.type==="click"&&(!((s=(o=i.rawRumEvent.action.frustration)===null||o===void 0?void 0:o.type)===null||s===void 0)&&s.length)&&"events"in i.domainContext&&i.domainContext.events&&i.domainContext.events.length&&t({timestamp:i.rawRumEvent.date,type:nn.FrustrationRecord,data:{frustrationTypes:i.rawRumEvent.action.frustration.type,recordIds:i.domainContext.events.map(a=>n.getIdForEvent(a))}})});return{stop:()=>{r.unsubscribe()}}}function OR(e,t){const n=e.subscribe(5,()=>{t({timestamp:Fe(),type:nn.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function N1(e,t,n=document){const r=e.defaultPrivacyLevel,i=new WeakMap,o=n!==document,{stop:s}=dt(e,n,o?["change"]:["input","change"],l=>{const d=no(l);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(o)a=ae;else{const l=[Vi(HTMLInputElement.prototype,"value",c),Vi(HTMLInputElement.prototype,"checked",c),Vi(HTMLSelectElement.prototype,"value",c),Vi(HTMLTextAreaElement.prototype,"value",c),Vi(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{l.forEach(d=>d.stop())}}return{stop:()=>{a(),s()}};function c(l){const d=Xt(l,r);if(d===H.HIDDEN)return;const f=l.type;let h;if(f==="radio"||f==="checkbox"){if(Rs(l,d))return;h={isChecked:l.checked}}else{const g=wd(l,d);if(g===void 0)return;h={text:g}}u(l,h);const p=l.name;f==="radio"&&p&&l.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(p)}"]`).forEach(g=>{g!==l&&u(g,{isChecked:!1})})}function u(l,d){if(!tn(l))return;const f=i.get(l);(!f||f.text!==d.text||f.isChecked!==d.isChecked)&&(i.set(l,d),t(Vt(Lt.Input,{id:ht(l),...d})))}}const LR=100,NR=16;function MR(e){let t=ae,n=[];function r(){t(),e(n),n=[]}const{throttled:i,cancel:o}=xn(r,NR,{leading:!1});return{addMutations:s=>{n.length===0&&(t=wm(i,{timeout:LR})),n.push(...s)},flush:r,stop:()=>{t(),o()}}}function M1(e,t,n,r){const i=Nm();if(!i)return{stop:ae,flush:ae};const o=MR(a=>{DR(a.concat(s.takeRecords()),e,t,n)}),s=new i(Y(o.addMutations));return s.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{s.disconnect(),o.stop()},flush:()=>{o.flush()}}}function DR(e,t,n,r){const i=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(f=>{D1(f,r.removeShadowRoot)})});const o=e.filter(d=>d.target.isConnected&&Jk(d.target)&&Xt(d.target,n.defaultPrivacyLevel,i)!==H.HIDDEN),{adds:s,removes:a,hasBeenSerialized:c}=FR(o.filter(d=>d.type==="childList"),n,r,i),u=UR(o.filter(d=>d.type==="characterData"&&!c(d.target)),n,i),l=BR(o.filter(d=>d.type==="attributes"&&!c(d.target)),n,i);!u.length&&!l.length&&!a.length&&!s.length||t(Vt(Lt.Mutation,{adds:s,removes:a,texts:u,attributes:l}))}function FR(e,t,n,r){const i=new Set,o=new Map;for(const f of e)f.addedNodes.forEach(h=>{i.add(h)}),f.removedNodes.forEach(h=>{i.has(h)||o.set(h,f.target),i.delete(h)});const s=Array.from(i);$R(s);const a=new Set,c=[];for(const f of s){if(l(f))continue;const h=Xt(f.parentNode,t.defaultPrivacyLevel,r);if(h===H.HIDDEN||h===H.IGNORE)continue;const p=Sd(f,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!p)continue;const g=ks(f);c.push({nextId:d(f),parentId:ht(g),node:p})}const u=[];return o.forEach((f,h)=>{tn(h)&&u.push({parentId:ht(f),id:ht(h)})}),{adds:c,removes:u,hasBeenSerialized:l};function l(f){return tn(f)&&a.has(ht(f))}function d(f){let h=f.nextSibling;for(;h;){if(tn(h))return ht(h);h=h.nextSibling}return null}}function UR(e,t,n){var r;const i=[],o=new Set,s=e.filter(a=>o.has(a.target)?!1:(o.add(a.target),!0));for(const a of s){if(a.target.textContent===a.oldValue)continue;const u=Xt(ks(a.target),t.defaultPrivacyLevel,n);u===H.HIDDEN||u===H.IGNORE||i.push({id:ht(a.target),value:(r=nv(a.target,!1,u))!==null&&r!==void 0?r:null})}return i}function BR(e,t,n){const r=[],i=new Map,o=e.filter(a=>{const c=i.get(a.target);return c&&c.has(a.attributeName)?!1:(c?c.add(a.attributeName):i.set(a.target,new Set([a.attributeName])),!0)}),s=new Map;for(const a of o){if(a.target.getAttribute(a.attributeName)===a.oldValue)continue;const u=Xt(a.target,t.defaultPrivacyLevel,n),l=T1(a.target,u,a.attributeName,t);let d;if(a.attributeName==="value"){const h=wd(a.target,u);if(h===void 0)continue;d=h}else typeof l=="string"?d=l:d=null;let f=s.get(a.target);f||(f={id:ht(a.target),attributes:{}},r.push(f),s.set(a.target,f)),f.attributes[a.attributeName]=d}return r}function $R(e){e.sort((t,n)=>{const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_CONTAINS||r&Node.DOCUMENT_POSITION_FOLLOWING?1:r&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function D1(e,t){As(e)&&t(e.shadowRoot),Zm(e,n=>D1(n,t))}function VR(){const e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}const zR=(e,t,n)=>{const r=new Map,i={addShadowRoot:o=>{if(r.has(o))return;const s=M1(t,e,i,o),a=N1(e,t,o),c=O1(e,t,n,o);r.set(o,{flush:()=>s.flush(),stop:()=>{s.stop(),a.stop(),c.stop()}})},removeShadowRoot:o=>{const s=r.get(o);s&&(s.stop(),r.delete(o))},stop:()=>{r.forEach(({stop:o})=>o())},flush:()=>{r.forEach(({flush:o})=>o())}};return i};function HR(e,t,n,r,i,o){const s=(c=Fe(),u={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:l,height:d}=Ms(),f=[{data:{height:d,href:window.location.href,width:l},type:nn.Meta,timestamp:c},{data:{has_focus:document.hasFocus()},type:nn.Focus,timestamp:c},{data:{node:yR(document,r,u),initialOffset:{left:Lv(),top:Al()}},type:nn.FullSnapshot,timestamp:c}];return window.visualViewport&&f.push({data:k1(window.visualViewport),type:nn.VisualViewport,timestamp:c}),f};o(s());const{unsubscribe:a}=n.subscribe(2,c=>{i(),o(s(c.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))});return{stop:a}}function jR(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function qR(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const i=f=>{t(f),sl("record",{record:f});const h=e.viewHistory.findView();Jx(h.id)},o=VR(),s=zR(n,i,o),{stop:a}=HR(o,s,r,n,c,f=>f.forEach(h=>i(h)));function c(){s.flush(),l.flush()}const u=jR(),l=M1(i,n,s,document),d=[l,SR(n,i),_R(n,i,u),O1(n,i,o,document),IR(n,i),N1(n,i),AR(n,i),kR(i),RR(n,i),xR(n,i),PR(r,i,u),OR(r,f=>{c(),i(f)})];return{stop:()=>{s.stop(),d.forEach(f=>f.stop()),a()},flushMutations:c,shadowRootsController:s}}function WR(e,t,n){const r=new FormData;r.append("segment",new Blob([e],{type:"application/octet-stream"}),`${t.session.id}-${t.start}`);const i={raw_segment_size:n,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(i);return r.append("event",new Blob([o],{type:"application/json"})),{data:r,bytesCount:e.byteLength}}function GR({context:e,creationReason:t,encoder:n}){let r=0;const i=e.view.id,o={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:Kx(i),source:"browser",...e};Yx(i);function s(c,u){o.start=Math.min(o.start,c.timestamp),o.end=Math.max(o.end,c.timestamp),o.records_count+=1,o.has_full_snapshot||(o.has_full_snapshot=c.type===nn.FullSnapshot);const l=n.isEmpty?'{"records":[':",";n.write(l+JSON.stringify(c),d=>{r+=d,u(r)})}function a(c){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(o).slice(1)}
|
|
896
|
+
`),n.finish(u=>{Zx(o.view.id,u.rawBytesCount),c(o,u)})}return{addRecord:s,flush:a}}const KR=5*Qe;let F1=6e4;function YR(e,t,n,r,i,o){return JR(e,()=>ZR(t.applicationId,n,r),i,o)}function JR(e,t,n,r){let i={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:o}=e.subscribe(2,()=>{a("view_change")}),{unsubscribe:s}=e.subscribe(11,c=>{a(c.reason)});function a(c){i.status===1&&(i.segment.flush((u,l)=>{const d=WR(l.output,u,l.rawBytesCount);vm(c)?n.sendOnExit(d):n.send(d)}),ut(i.expirationTimeoutId)),c!=="stop"?i={status:0,nextSegmentCreationReason:c}:i={status:2}}return{addRecord:c=>{if(i.status!==2){if(i.status===0){const u=t();if(!u)return;i={status:1,segment:GR({encoder:r,context:u,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:Ue(()=>{a("segment_duration_limit")},KR)}}i.segment.addRecord(c,u=>{u>F1&&a("segment_bytes_limit")})}},stop:()=>{a("stop"),o(),s()}}}function ZR(e,t,n){const r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function XR(e){const t=Mr();return{addRecord:n=>{const r=e.findView();t.send("record",n,r.id)}}}function QR(e,t,n,r,i,o){const s=[],a=d=>{e.notify(14,{error:d}),dn("Error reported to customer",{"error.message":d.message})},c=o||hm(t.sessionReplayEndpointBuilder,F1,a);let u;if(Yn())({addRecord:u}=XR(r));else{const d=YR(e,t,n,r,c,i);u=d.addRecord,s.push(d.stop)}const{stop:l}=qR({emit:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(l),{stop:()=>{s.forEach(d=>d())}}}const e8=Object.freeze(Object.defineProperty({__proto__:null,startRecording:QR},Symbol.toStringTag,{value:"Module"}));function t8(e){let t=0;for(const n of e)n.stackId!==void 0&&t++;return t}const ro=new Map;let Yr=!1;function n8(){Yr=performance.now()}function r8(){Yr=!1,ro.clear()}function i8(e,t){ro.set(t,e)}function U1(e){if(!(Yr===!1||e.startTime<Yr))return ro.get(e.startTime)}function o8(e){if(!(Yr===!1||e<Yr))for(const t of ro.keys())t<e&&ro.delete(t)}function s8({rawRumEvent:e,startTime:t}){if(e.type!=="long_task")return;const n=e.long_task.id;i8(n,t)}const a8=(e,t,n,r)=>{const i=c8(e,t,n,r),o=l8(e,i),s=t.build("fetch",o);return dn("Sending profile to public profiling intake",{profilingIntakeURL:s,applicationId:n,sessionId:r}),fetch(s,{body:o.data,method:"POST"})};function c8(e,t,n,r){const i=t.tags,o=d8(e,n,r),s=u8(i),a=new Date(e.timeOrigin+e.startTime),c=new Date(e.timeOrigin+e.endTime);return{...o,attachments:["wall-time.json"],start:a.toISOString(),end:c.toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:s.join(",")}}function u8(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function l8(e,t){const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=new FormData;return r.append("event",new Blob([JSON.stringify(t)],{type:"application/json"}),"event.json"),r.append("wall-time.json",n,"wall-time.json"),{data:r,bytesCount:0}}function d8(e,t,n){const r={application:{id:t}};n&&(r.session={id:n});const i=Array.from(new Set(e.views.map(s=>s.viewId)));i.length&&(r.view={id:i});const o=e.longTasks.map(s=>U1(s)).filter(s=>s!==void 0);return o.length&&(r.long_task={id:o}),r}const f8={sendProfile:a8},B1={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function p8(e,t,n,r=B1){const i=Zn(fe.LONG_ANIMATION_FRAME);let o;const s=[];let a={state:"stopped"};function c(T){a.state!=="running"&&(o=T?{startTime:T.startClocks.relative,viewId:T.id,viewName:T.name}:void 0,s.push(Se(e,window,"visibilitychange",b).stop,Se(e,window,"beforeunload",w).stop),d())}async function u(){await h("stopped"),r8(),s.forEach(T=>T())}function l(T){if(T.state==="running")return{cleanupTasks:T.cleanupTasks,observer:T.observer};const I=[];let k;if(e.trackLongTasks){k=new PerformanceObserver(v),k.observe({entryTypes:[C()]});const D=t.subscribe(12,F=>{s8(F)});n8(),I.push(()=>k==null?void 0:k.disconnect()),I.push(D.unsubscribe)}const O=t.subscribe(2,D=>{p({viewId:D.id,viewName:D.name,startTime:D.startClocks.relative})});return I.push(O.unsubscribe),{cleanupTasks:I,observer:k}}function d(){const T=Jt().Profiler;if(!T)throw new Error("RUM Profiler is not supported in this browser.");f(a).catch(ln);const{cleanupTasks:I,observer:k}=l(a);let O;try{O=new T({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(D){se.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",D);return}a={state:"running",startTime:performance.now(),profiler:O,timeoutId:Ue(d,r.collectIntervalMs),longTasks:[],views:[],cleanupTasks:I,observer:k},p(o),O.addEventListener("samplebufferfull",m)}async function f(T){var I,k;if(T.state!=="running")return;y((k=(I=T.observer)===null||I===void 0?void 0:I.takeRecords())!==null&&k!==void 0?k:[]),ut(T.timeoutId),T.profiler.removeEventListener("samplebufferfull",m);const{startTime:O,longTasks:D,views:F}=T,V=performance.now();await T.profiler.stop().then(z=>{const ye=performance.now(),oe=D.length>0,J=ye-O<r.minProfileDurationMs,re=t8(z.samples)<r.minNumberOfSamples;!oe&&(J||re)||(g(Object.assign(z,{startTime:O,endTime:ye,timeOrigin:performance.timeOrigin,longTasks:D,views:F,sampleInterval:r.sampleIntervalMs})),o8(V))}).catch(ln)}async function h(T){a.state==="running"&&(a.cleanupTasks.forEach(I=>I()),await f(a),a={state:T})}function p(T){a.state!=="running"||!T||a.views.push(T)}function g(T){var I;const k=(I=n.findTrackedSession())===null||I===void 0?void 0:I.id;f8.sendProfile(T,e.profilingEndpointBuilder,e.applicationId,k).catch(ln)}function m(){d()}function v(T){y(T.getEntries())}function y(T){if(a.state==="running")for(const I of T)I.duration<r.sampleIntervalMs||a.longTasks.push({id:U1(I),duration:I.duration,entryType:I.entryType,startTime:I.startTime})}function b(){document.visibilityState==="hidden"&&a.state==="running"?h("paused").catch(ln):document.visibilityState==="visible"&&a.state==="paused"&&d()}function w(){d()}function C(){return i?"long-animation-frame":"longtask"}function _(){return a.state==="stopped"}function E(){return a.state==="running"}function P(){return a.state==="paused"}return{start:c,stop:u,isStopped:_,isRunning:E,isPaused:P}}const h8=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:B1,createRumProfiler:p8},Symbol.toStringTag,{value:"Module"}));Ge.AstroPayCardPayment=XA,Ge.AstroPayCore=Ft,Ge.AstroPayFullCheckout=Gk,Ge.AstroPayPayment=Yk,Ge.Core=Ft,Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"})}));
|