@astropay/payments-lib 1.0.4 → 2.0.0
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/README.md +18 -8
- package/dist/astropay-payments-lib.es.js +1 -1
- package/dist/astropay-payments-lib.umd.js +143 -148
- package/dist/{main-BtluJl6M.js → main-DhA4kci7.js} +14710 -14466
- package/dist/{profiler-CtuhY6VX.js → profiler-CVMzUp0S.js} +1 -1
- package/dist/public/AstroPayCardPayment/index.d.ts +1 -3
- package/dist/{startRecording-hiPgcX9z.js → startRecording-DlN4lIUz.js} +1 -1
- package/dist/types/index.d.ts +3 -7
- package/package.json +3 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Te,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(Te=typeof globalThis<"u"?globalThis:Te||self,v(Te.AstroPay={}))})(this,(function(Te){"use strict";var m_=Object.defineProperty;var g_=(Te,v,Et)=>v in Te?m_(Te,v,{enumerable:!0,configurable:!0,writable:!0,value:Et}):Te[v]=Et;var S=(Te,v,Et)=>g_(Te,typeof v!="symbol"?v+"":v,Et);const v={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"},Et={poppins:"Poppins"},Yh=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)}},Zh={backgroundColor:v.surface_dark,fontFamily:Et.poppins,textColor:v.neutral_light,primaryColor:v.primary_base,secondaryColor:v.primary_darkest,textPrimaryColor:v.neutral_lightest,textSecondaryColor:v.primary_lightest,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:v.success_base,textSize:12},error:{textColor:v.error_lighter,textSize:12}},input:{normal:{textColor:v.neutral_lightest,backgroundColor:v.neutral_darkest,hintTextColor:v.neutral_darker,placeholderTextColor:v.neutral_dark,borderColor:v.transparent,borderRadius:8,borderWidth:3},focus:{textColor:v.neutral_lightest,backgroundColor:v.neutral_darkest,hintTextColor:v.neutral_darker,placeholderTextColor:v.neutral_darker,borderColor:v.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:v.neutral_darker,backgroundColor:v.neutral_dark,hintTextColor:v.neutral_darker,placeholderTextColor:v.neutral_base,borderColor:v.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:v.neutral_lightest,backgroundColor:v.neutral_darkest,hintTextColor:v.error_base,placeholderTextColor:v.neutral_darker,borderColor:v.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:v.neutral_lightest,backgroundColor:v.primary_base,borderColor:v.transparent,borderWidth:0},secondary:{textColor:v.primary_lightest,backgroundColor:v.primary_darkest,borderColor:v.transparent,borderWidth:0},text:{textColor:v.primary_base,backgroundColor:"unset",borderColor:v.primary_base,borderWidth:1},disabled:{textColor:v.neutral_dark,backgroundColor:v.neutral_base,borderColor:v.transparent,borderWidth:0}},divider:{color:v.neutral_base,variant:"dashed",size:1},card:{padding:12,backgroundColor:v.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:v.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:v.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:v.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:v.neutral_light,backgroundColor:v.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:v.primary_light,backgroundColor:v.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:v.error_light,backgroundColor:v.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:v.success_light,backgroundColor:v.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:v.warning_light,backgroundColor:v.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:v.error_lightest,backgroundColor:v.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:Et.poppins,apPrimaryColor:v.primary_base,apButtonPrimaryBgColor:v.primary_base,apButtonPrimaryTxtColor:v.neutral_darkest,apButtonSecondaryBgColor:v.primary_darkest,apButtonSecondaryTxtColor:v.primary_base,apButtonTextTxtColor:v.primary_base,apButtonDisableBgColor:v.neutral_base,apButtonDisableTextColor:v.neutral_dark},el={backgroundColor:v.surface_light,fontFamily:Et.poppins,textColor:v.neutral_darkest,primaryColor:v.primary_base,secondaryColor:v.primary_lightest,textPrimaryColor:v.neutral_darkest,textSecondaryColor:v.primary_darker,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:v.success_darker,textSize:12},error:{textColor:v.error_dark,textSize:12}},input:{normal:{textColor:v.neutral_darkest,backgroundColor:v.neutral_lighter,hintTextColor:v.neutral_dark,placeholderTextColor:v.neutral_dark,borderColor:v.transparent,borderRadius:8,borderWidth:3},focus:{textColor:v.neutral_darkest,backgroundColor:v.neutral_lighter,hintTextColor:v.neutral_dark,placeholderTextColor:v.neutral_dark,borderColor:v.primary_darker,borderRadius:8,borderWidth:3},disabled:{textColor:v.neutral_dark,backgroundColor:v.neutral_base,hintTextColor:v.neutral_dark,placeholderTextColor:v.neutral_darker,borderColor:v.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:v.neutral_darkest,backgroundColor:v.neutral_lighter,hintTextColor:v.error_dark,placeholderTextColor:v.neutral_dark,borderColor:v.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:v.neutral_darkest,backgroundColor:v.primary_base,borderColor:v.transparent,borderWidth:0},secondary:{textColor:v.primary_darker,backgroundColor:v.primary_lightest,borderColor:v.transparent,borderWidth:0},text:{textColor:v.primary_base,backgroundColor:"unset",borderColor:v.primary_base,borderWidth:1},disabled:{textColor:v.neutral_dark,backgroundColor:v.neutral_base,borderColor:v.transparent,borderWidth:0}},divider:{color:v.neutral_base,variant:"dashed",size:1},card:{padding:12,backgroundColor:v.neutral_light,borderWidth:0,borderStyle:"none",borderColor:v.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:v.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:v.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:v.neutral_dark,backgroundColor:v.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:v.primary_dark,backgroundColor:v.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:v.error_dark,backgroundColor:v.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:v.success_dark,backgroundColor:v.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:v.warning_darker,backgroundColor:v.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:v.error_dark,backgroundColor:v.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:Et.poppins,apPrimaryColor:v.primary_base,apButtonPrimaryBgColor:v.primary_base,apButtonPrimaryTxtColor:v.neutral_darkest,apButtonSecondaryBgColor:v.primary_lightest,apButtonSecondaryTxtColor:v.primary_dark,apButtonTextTxtColor:v.primary_dark,apButtonDisableBgColor:v.neutral_base,apButtonDisableTextColor:v.neutral_dark},Jh=["production","sandbox"],Xh=["light","dark"],Qh=["en","pt","es"],em=["iso","symbol"],hi=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(s){n(s)}finally{document.body.removeChild(r)}}),tm=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 fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),Xh=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),Jc=e=>{const t=JSON.stringify(e);return btoa(t)},bn=Array.isArray,xt=e=>e!==null&&typeof e=="object"&&!bn(e),jr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[Jh(n)]:xt(r)?jr(r):bn(r)?r.map(s=>xt(s)?jr(s):s):r}),{}),Qh=e=>{if(bn(e))return e.map(t=>xt(t)?jr(t):t);throw new Error("Input is not an array")},Wr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[Xh(n)]:xt(r)?Wr(r):bn(r)?r.map(s=>xt(s)?Wr(s):s):r}),{}),em=e=>{if(bn(e))return e.map(t=>xt(t)?Wr(t):t);throw new Error("Input is not an array")},Xc=(e,t)=>bn(e)?t==="snake_case-to-camelCase"?Qh(e):em(e):xt(e)?t==="snake_case-to-camelCase"?jr(e):Wr(e):e,Qc=(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]=Qc(i,s):s!==void 0&&(n[r]=s)}return n},tm={light:Zc,dark:Wh},qt=class qt{static init(t){const n=Hr(t==null?void 0:t.theme,Gh,"light");qt.currentTheme=n,qt.styles=Qc(tm[n],t==null?void 0:t.styles)}static getStyles(){return qt.styles}static getTheme(){return qt.currentTheme}};_(qt,"currentTheme","light"),_(qt,"styles",Zc);let V=qt;class te{constructor({tag:t,elementId:n,styles:r}){_(this,"element");if(this.element=document.createElement(t),n&&this.element.setAttribute("id",n),r){const s=V.getStyles(),i=r(s);this.element.className=i}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof te?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function nm(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 rm(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 sm=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(rm(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=nm(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}(),xe="-ms-",qr="-moz-",K="-webkit-",el="comm",hi="rule",mi="decl",im="@import",tl="@keyframes",om="@layer",am=Math.abs,Gr=String.fromCharCode,cm=Object.assign;function lm(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 nl(e){return e.trim()}function um(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,n){return e.replace(t,n)}function gi(e,t){return e.indexOf(t)}function ve(e,t){return e.charCodeAt(t)|0}function nr(e,t,n){return e.slice(t,n)}function ft(e){return e.length}function bi(e){return e.length}function Kr(e,t){return t.push(e),e}function dm(e,t){return e.map(t).join("")}var Yr=1,yn=1,rl=0,Ne=0,pe=0,wn="";function Zr(e,t,n,r,s,i,o){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Yr,column:yn,length:o,return:""}}function rr(e,t){return cm(Zr("",null,null,"",null,null,0),e,{length:-e.length},t)}function pm(){return pe}function fm(){return pe=Ne>0?ve(wn,--Ne):0,yn--,pe===10&&(yn=1,Yr--),pe}function ze(){return pe=Ne<rl?ve(wn,Ne++):0,yn++,pe===10&&(yn=1,Yr++),pe}function ht(){return ve(wn,Ne)}function Jr(){return Ne}function sr(e,t){return nr(wn,e,t)}function ir(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 sl(e){return Yr=yn=1,rl=ft(wn=e),Ne=0,[]}function il(e){return wn="",e}function Xr(e){return nl(sr(Ne-1,yi(e===91?e+2:e===40?e+1:e)))}function hm(e){for(;(pe=ht())&&pe<33;)ze();return ir(e)>2||ir(pe)>3?"":" "}function mm(e,t){for(;--t&&ze()&&!(pe<48||pe>102||pe>57&&pe<65||pe>70&&pe<97););return sr(e,Jr()+(t<6&&ht()==32&&ze()==32))}function yi(e){for(;ze();)switch(pe){case e:return Ne;case 34:case 39:e!==34&&e!==39&&yi(pe);break;case 40:e===41&&yi(e);break;case 92:ze();break}return Ne}function gm(e,t){for(;ze()&&e+pe!==57;)if(e+pe===84&&ht()===47)break;return"/*"+sr(t,Ne-1)+"*"+Gr(e===47?e:ze())}function bm(e){for(;!ir(ht());)ze();return sr(e,Ne)}function ym(e){return il(Qr("",null,null,null,[""],e=sl(e),0,[0],e))}function Qr(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,y=1,x=0,w="",C=s,P=i,R=r,b=w;g;)switch(f=x,x=ze()){case 40:if(f!=108&&ve(b,d-1)==58){gi(b+=Y(Xr(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:b+=Xr(x);break;case 9:case 10:case 13:case 32:b+=hm(f);break;case 92:b+=mm(Jr()-1,7);continue;case 47:switch(ht()){case 42:case 47:Kr(wm(gm(ze(),Jr()),t,n),c);break;default:b+="/"}break;case 123*m:a[l++]=ft(b)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+u:y==-1&&(b=Y(b,/\f/g,"")),h>0&&ft(b)-d&&Kr(h>32?al(b+";",r,n,d-1):al(Y(b," ","")+";",r,n,d-2),c);break;case 59:b+=";";default:if(Kr(R=ol(b,t,n,l,u,s,a,w,C=[],P=[],d),i),x===123)if(u===0)Qr(b,t,R,R,C,i,d,a,P);else switch(p===99&&ve(b,3)===110?100:p){case 100:case 108:case 109:case 115:Qr(e,R,R,r&&Kr(ol(e,R,R,0,0,s,a,w,s,C=[],d),P),s,P,d,a,r?C:P);break;default:Qr(b,R,R,R,[""],P,0,a,P)}}l=u=h=0,m=y=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&&fm()==125)continue}switch(b+=Gr(x),x*m){case 38:y=u>0?1:(b+="\f",-1);break;case 44:a[l++]=(ft(b)-1)*y,y=1;break;case 64:ht()===45&&(b+=Xr(ze())),p=ht(),u=d=ft(w=b+=bm(Jr())),x++;break;case 45:f===45&&ft(b)==2&&(m=0)}}return i}function ol(e,t,n,r,s,i,o,a,c,l,u){for(var d=s-1,p=s===0?i:[""],h=bi(p),f=0,m=0,g=0;f<r;++f)for(var y=0,x=nr(e,d+1,d=am(m=o[f])),w=e;y<h;++y)(w=nl(m>0?p[y]+" "+x:Y(x,/&\f/g,p[y])))&&(c[g++]=w);return Zr(e,t,n,s===0?hi:a,c,l,u)}function wm(e,t,n){return Zr(e,t,n,el,Gr(pm()),nr(e,2,-2),0)}function al(e,t,n,r){return Zr(e,t,n,mi,nr(e,0,r),nr(e,r+1,-1),r)}function vn(e,t){for(var n="",r=bi(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function vm(e,t,n,r){switch(e.type){case om:if(e.children.length)break;case im:case mi:return e.return=e.return||e.value;case el:return"";case tl:return e.return=e.value+"{"+vn(e.children,r)+"}";case hi:e.value=e.props.join(",")}return ft(n=vn(e.children,r))?e.return=e.value+"{"+n+"}":""}function _m(e){var t=bi(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 Sm(e){return function(t){t.root||(t=t.return)&&e(t)}}function Cm(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Em=function(t,n,r){for(var s=0,i=0;s=i,i=ht(),s===38&&i===12&&(n[r]=1),!ir(i);)ze();return sr(t,Ne)},xm=function(t,n){var r=-1,s=44;do switch(ir(s)){case 0:s===38&&ht()===12&&(n[r]=1),t[r]+=Em(Ne-1,n,r);break;case 2:t[r]+=Xr(s);break;case 4:if(s===44){t[++r]=ht()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Gr(s)}while(s=ze());return t},Im=function(t,n){return il(xm(sl(t),n))},cl=new WeakMap,Tm=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&&!cl.get(r))&&!s){cl.set(t,!0);for(var i=[],o=Im(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]}}},Rm=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function ll(e,t){switch(lm(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+qr+e+xe+e+e;case 6828:case 4268:return K+e+xe+e+e;case 6165:return K+e+xe+"flex-"+e+e;case 5187:return K+e+Y(e,/(\w+).+(:[^]+)/,K+"box-$1$2"+xe+"flex-$1$2")+e;case 5443:return K+e+xe+"flex-item-"+Y(e,/flex-|-self/,"")+e;case 4675:return K+e+xe+"flex-line-pack"+Y(e,/align-content|flex-|-self/,"")+e;case 5548:return K+e+xe+Y(e,"shrink","negative")+e;case 5292:return K+e+xe+Y(e,"basis","preferred-size")+e;case 6060:return K+"box-"+Y(e,"-grow","")+K+e+xe+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"+xe+"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(ve(e,t+1)){case 109:if(ve(e,t+4)!==45)break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+K+"$2-$3$1"+qr+(ve(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~gi(e,"stretch")?ll(Y(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ve(e,t+1)!==115)break;case 6444:switch(ve(e,ft(e)-3-(~gi(e,"!important")&&10))){case 107:return Y(e,":",":"+K)+e;case 101:return Y(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+K+(ve(e,14)===45?"inline-":"")+"box$3$1"+K+"$2$3$1"+xe+"$2box$3")+e}break;case 5936:switch(ve(e,t+11)){case 114:return K+e+xe+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return K+e+xe+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return K+e+xe+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return K+e+xe+e+e}return e}var Am=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case mi:t.return=ll(t.value,t.length);break;case tl:return vn([rr(t,{value:Y(t.value,"@","@"+K)})],s);case hi:if(t.length)return dm(t.props,function(i){switch(um(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return vn([rr(t,{props:[Y(i,/:(read-\w+)/,":"+qr+"$1")]})],s);case"::placeholder":return vn([rr(t,{props:[Y(i,/:(plac\w+)/,":"+K+"input-$1")]}),rr(t,{props:[Y(i,/:(plac\w+)/,":"+qr+"$1")]}),rr(t,{props:[Y(i,/:(plac\w+)/,xe+"input-$1")]})],s)}return""})}},km=[Am],Om=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||km,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(" "),y=1;y<g.length;y++)i[g[y]]=!0;a.push(m)});var c,l=[Tm,Rm];{var u,d=[vm,Sm(function(m){u.insert(m)})],p=_m(l.concat(s,d)),h=function(g){return vn(ym(g),p)};c=function(g,y,x,w){u=x,h(g?g+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)}}var f={key:n,sheet:new sm({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 Pm(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 Lm={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},Nm=/[A-Z]|^ms/g,Mm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ul=function(t){return t.charCodeAt(1)===45},dl=function(t){return t!=null&&typeof t!="boolean"},wi=Cm(function(e){return ul(e)?e:e.replace(Nm,"-$&").toLowerCase()}),pl=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Mm,function(r,s,i){return Lt={name:s,styles:i,next:Lt},s})}return Lm[t]!==1&&!ul(t)&&typeof n=="number"&&n!==0?n+"px":n};function es(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 Lt={name:s.name,styles:s.styles,next:Lt},s.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Lt={name:o.name,styles:o.styles,next:Lt},o=o.next;var a=i.styles+";";return a}return Dm(e,t,n)}}var c=n;if(t==null)return c;var l=t[c];return l!==void 0?l:c}function Dm(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=es(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]+"}":dl(a)&&(r+=wi(i)+":"+pl(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++)dl(o[c])&&(r+=wi(i)+":"+pl(i,o[c])+";");else{var l=es(e,t,o);switch(i){case"animation":case"animationName":{r+=wi(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var fl=/label:\s*([^\s;{]+)\s*(;|$)/g,Lt;function vi(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="";Lt=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,s+=es(n,t,i);else{var o=i;s+=o[0]}for(var a=1;a<e.length;a++)if(s+=es(n,t,e[a]),r){var c=i;s+=c[a]}fl.lastIndex=0;for(var l="",u;(u=fl.exec(s))!==null;)l+="-"+u[1];var d=Pm(s)+l;return{name:d,styles:s,next:Lt}}function hl(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var Fm=function(t,n,r){var s=t.key+"-"+n.name;t.registered[s]===void 0&&(t.registered[s]=n.styles)},Bm=function(t,n,r){Fm(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 ml(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function gl(e,t,n){var r=[],s=hl(e,r,n);return r.length<2?n:s+t(r)}var Um=function(t){var n=Om(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=vi(l,n.registered,void 0);return Bm(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=vi(l,n.registered),p="animation-"+d.name;return ml(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=vi(l,n.registered);ml(n,d)},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return gl(n.registered,r,$m(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:hl.bind(null,n.registered),merge:gl.bind(null,n.registered,r)}},$m=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},_i=Um({key:"css"}),Vm=_i.cx,or=_i.keyframes,W=_i.css;const zm=or`
|
|
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`
|
|
4
4
|
100% {
|
|
5
5
|
transform: rotate(360deg);
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,Xm=lr`
|
|
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 fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=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
|
+
`,Qm=lr`
|
|
24
24
|
100% {
|
|
25
25
|
transform: rotate(1turn);
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,eg=(e,t)=>j`
|
|
28
28
|
width: ${e}px;
|
|
29
29
|
height: ${e}px;
|
|
30
30
|
border-radius: 50%;
|
|
31
31
|
position: relative;
|
|
32
|
-
animation: ${
|
|
32
|
+
animation: ${Jm} 1s linear infinite;
|
|
33
33
|
|
|
34
34
|
&::before {
|
|
35
35
|
content: '';
|
|
@@ -38,9 +38,9 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
38
38
|
inset: 0px;
|
|
39
39
|
border-radius: 50%;
|
|
40
40
|
border: 2.5px solid ${t};
|
|
41
|
-
animation: ${
|
|
41
|
+
animation: ${Xm} 2s linear infinite;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,tg=(e,t)=>j`
|
|
44
44
|
width: ${e}px;
|
|
45
45
|
aspect-ratio: 1;
|
|
46
46
|
border-radius: 50%;
|
|
@@ -48,8 +48,8 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=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 It extends
|
|
51
|
+
animation: ${Qm} 1s infinite linear;
|
|
52
|
+
`;class It extends se{constructor({size:t=24,color:n="currentColor",variant:r="inline"}){super({tag:r==="inline"?"span":"div",styles:()=>r==="inline"?eg(t,n):tg(t,n)})}}const ng=(e,t)=>j`
|
|
53
53
|
font-family: ${e.fontFamily};
|
|
54
54
|
color: ${(t==null?void 0:t.color)||e.textColor};
|
|
55
55
|
|
|
@@ -59,20 +59,25 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
59
59
|
|
|
60
60
|
line-height: ${t.lineHeight}px;
|
|
61
61
|
text-transform: ${t.uppercase?"uppercase":"none"};
|
|
62
|
-
`;class z extends te{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=>Gm(u,l)}),this.element.textContent=t}}const Km={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>'},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="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0143 15.4459C15.5042 15.4459 15.0245 15.2473 14.6638 14.8867L12.7139 12.9368C12.577 12.7995 12.3384 12.7999 12.2015 12.9368L10.2445 14.8939C9.8838 15.2544 9.40408 15.453 8.89404 15.453H8.50977L10.9794 17.9226C11.7507 18.6938 13.0012 18.6938 13.7725 17.9226L16.2491 15.4459H16.0143Z" fill="currentColor"/><path d="M8.89393 8.548C9.40397 8.548 9.88369 8.7466 10.2444 9.10711L12.2014 11.0645C12.3424 11.2055 12.5725 11.206 12.7138 11.0643L14.6637 9.11424C15.0244 8.75373 15.5041 8.55514 16.0141 8.55514H16.249L13.7724 6.07848C13.001 5.30717 11.7505 5.30717 10.9793 6.07848L8.50977 8.54801L8.89393 8.548Z" fill="currentColor"/><path d="M18.297 10.6042L16.8003 9.10752C16.7674 9.12072 16.7317 9.12896 16.694 9.12896H16.0135C15.6617 9.12896 15.3174 9.27165 15.0688 9.52042L13.1189 11.4703C12.9364 11.6528 12.6967 11.7441 12.4571 11.7441C12.2174 11.7441 11.9778 11.6528 11.7953 11.4705L9.83812 9.5133C9.58952 9.26447 9.24514 9.12183 8.89333 9.12183H8.05661C8.02092 9.12183 7.98757 9.11342 7.95608 9.10156L6.45348 10.6042C5.68217 11.3755 5.68217 12.6259 6.45348 13.3972L7.95602 14.8998C7.98757 14.8879 8.02092 14.8795 8.05661 14.8795H8.89333C9.24514 14.8795 9.58952 14.7369 9.83812 14.4881L11.7952 12.5311C12.1489 12.1776 12.7655 12.1775 13.1189 12.5312L15.0688 14.481C15.3174 14.7297 15.6617 14.8724 16.0135 14.8724H16.694C16.7317 14.8724 16.7674 14.8807 16.8003 14.8939L18.297 13.3972C19.0682 12.6259 19.0682 11.3755 18.297 10.6042" fill="currentColor"/></svg>'}},Ym={"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",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"},bl={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",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"},ae={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ae={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"},Nt={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 Ym[t]}static getBrowserTypeByAlias(t){return bl[t]||""}}const ee=/version\/(\d+(\.?_?\d+)+)/i,Zm=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(ee,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(ee,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(ee,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(ee,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(ee,e)||I.getFirstMatch(/(?:whale)[\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(ee,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(ee,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(ee,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(ee,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(ee,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(ee,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,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(ee,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(ee,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(ee,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)}}}],Jm=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ae.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ae.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:Ae.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ae.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:Ae.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:Ae.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:Ae.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:Ae.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:Ae.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ae.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ae.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Ae.Linux}}},{test:[/CrOS/],describe(){return{name:Ae.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ae.PlayStation4,version:t}}}],Xm=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:ae.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:ae.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:ae.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:ae.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:ae.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:ae.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:ae.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:ae.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:ae.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:ae.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:ae.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:ae.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:ae.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:ae.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:ae.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:ae.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:ae.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:ae.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:ae.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:ae.tv}}}],Qm=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Nt.Blink};const n=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Nt.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Nt.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:Nt.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:Nt.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Nt.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Nt.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class yl{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(Zm,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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(Jm,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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(Xm,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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(Qm,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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))}}/*!
|
|
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`
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
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))}}/*!
|
|
63
68
|
* Bowser - a browser detector
|
|
64
69
|
* https://github.com/lancedikson/bowser
|
|
65
70
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
66
71
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
67
|
-
*/class
|
|
68
|
-
hue-rotate(${
|
|
72
|
+
*/class Fl{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Dl(t,n)}static parse(t){return new Dl(t).getResult()}static get BROWSER_MAP(){return Ml}static get ENGINE_MAP(){return Mt}static get OS_MAP(){return Oe}static get PLATFORMS_MAP(){return le}}var fr=(e=>(e.IOS="IOS",e.ANDROID="ANDROID",e.DESKTOP="DESKTOP",e))(fr||{}),Bl=(e=>(e.FIREFOX="Firefox",e.CHROME="Chrome",e.SAFARI="Safari",e.EDGE="Edge",e.OPERA="Opera",e))(Bl||{});const Ul=()=>{const t=Fl.getParser(window.navigator.userAgent).getOSName().toUpperCase();return t&&Object.values(fr).includes(t)?t:fr.DESKTOP},kg=()=>{const e=Ul();return e===fr.ANDROID||e===fr.IOS},Rg=e=>{const t=Fl.getParser(window.navigator.userAgent).getBrowserName();return Array.isArray(e)?e.includes(t):t===e},hr=(e,t)=>{let n=e;return Object.keys(t).forEach(r=>{const s=t[r];n=n.replace(new RegExp(`:${r}\\b`,"g"),s),n=n.replace(new RegExp(`\\{${r}\\}`,"g"),s)}),n},Pg=(e,t,n)=>{const r=new URL(e);return t&&(r.pathname=t),n&&Object.entries(n).forEach(([s,i])=>{r.searchParams.append(s,i)}),r},Og=e=>{try{return new URL(e).pathname.toLowerCase().endsWith(".svg")}catch{return!1}},Lg=e=>{if(/^#/.test(e)){const t=e.substring(1),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),s=parseInt(t.substring(4,6),16),i=t.length===8?parseInt(t.substring(6,8),16)/255:1,o=i%1===0?i:+i.toFixed(2);return{r:n,g:r,b:s,a:o}}return e},Ti=(e,t)=>{if(/^#/.test(e)){const n=Lg(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},$l=e=>["#ffffff","#fff","white","#000000","#000","black","#808080","gray","grey"].includes(e.toLowerCase()),Ng=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),s=Math.min(e,t,n);let i=0;if(r!==s){const o=r-s;switch(r){case e:i=(t-n)/o+(t<n?6:0);break;case t:i=(n-e)/o+2;break;case n:i=(e-t)/o+4;break}i/=6}return Math.round(i*360)},Mg=e=>{if(!e||e==="currentColor"||$l(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[s,i,o,a]=r.map(Number);return Ng(i,o,a)},Dg=e=>!e||e==="currentColor"?"none":$l(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(${Mg(e)}deg) brightness(97%) contrast(113%)`,Fg=e=>j`
|
|
69
74
|
background-image: var(--icon-url);
|
|
70
75
|
background-repeat: no-repeat;
|
|
71
76
|
background-size: contain;
|
|
72
77
|
background-position: center;
|
|
73
78
|
background-color: transparent;
|
|
74
|
-
filter: ${
|
|
75
|
-
`,
|
|
79
|
+
filter: ${Dg(e)};
|
|
80
|
+
`,Bg=e=>j`
|
|
76
81
|
background-color: ${e};
|
|
77
82
|
-webkit-mask-box-image: var(--icon-url);
|
|
78
83
|
-webkit-mask-image: var(--icon-url);
|
|
@@ -83,7 +88,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
83
88
|
mask-repeat: no-repeat;
|
|
84
89
|
mask-size: contain;
|
|
85
90
|
mask-position: center;
|
|
86
|
-
`,
|
|
91
|
+
`,Ug=({size:e,color:t,isSvgResource:n,isAlternativeStyles:r})=>j`
|
|
87
92
|
display: inline-flex;
|
|
88
93
|
align-items: center;
|
|
89
94
|
justify-content: center;
|
|
@@ -106,70 +111,70 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
106
111
|
height: ${e}px;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
${n&&
|
|
114
|
+
${n&&j`
|
|
110
115
|
width: ${e}px;
|
|
111
116
|
height: ${e}px;
|
|
112
117
|
|
|
113
|
-
${r?
|
|
118
|
+
${r?Fg(t):Bg(t)}
|
|
114
119
|
`}
|
|
115
|
-
`;class He extends te{constructor({name:t,color:n="currentColor",size:r=16,alt:s}){const i=rg(t),o=tg(vl.FIREFOX);super({tag:"span",styles:()=>ug({size:r,color:n,isSvgResource:i,isAlternativeStyles:o})});const a=Km[t];if(a)this.element.innerHTML=a.svg;else if(i){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=s??"icon",this.element.append(c)}}}const F=e=>typeof e=="string",lr=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Cl=e=>e==null?"":""+e,dg=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},pg=/###/g,El=e=>e&&e.indexOf("###")>-1?e.replace(pg,"."):e,xl=e=>!e||F(e),ur=(e,t,n)=>{const r=F(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(xl(e))return{};const i=El(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return xl(e)?{}:{obj:e,k:El(r[s])}},Il=(e,t,n)=>{const{obj:r,k:s}=ur(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=ur(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=ur(e,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},fg=(e,t,n,r)=>{const{obj:s,k:i}=ur(e,t,Object);s[i]=s[i]||[],s[i].push(n)},ts=(e,t)=>{const{obj:n,k:r}=ur(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},hg=(e,t,n)=>{const r=ts(e,n);return r!==void 0?r:ts(t,n)},Tl=(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]):Tl(e[r],t[r],n):e[r]=t[r]);return e},_n=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var mg={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gg=e=>F(e)?e.replace(/[&<>"'\/]/g,t=>mg[t]):e;class bg{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 yg=[" ",",","?","!",";"],wg=new bg(20),vg=(e,t,n)=>{t=t||"",n=n||"";const r=yg.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=wg.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},Ci=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},ns=e=>e==null?void 0:e.replace("_","-"),_g={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 rs{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||_g,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 rs(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new rs(this.logger,t)}}var mt=new rs;class ss{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 Rl extends ss{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=ts(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:Ci((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),Il(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=ts(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Tl(c,r,i):c={...c,...r},Il(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 Al={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 kl={},Ol=e=>!F(e)&&typeof e!="boolean"&&typeof e!="number";class is extends ss{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dg(["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&&!vg(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 A=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${A}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${A}${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,y=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!F(n.count),w=is.hasDefaultValue(n),C=x?this.pluralResolver.getSuffix(l,n.count,n):"",P=n.ordinal&&x?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",R=x&&!n.ordinal&&n.count===0,b=R&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${C}`]||n[`defaultValue${P}`]||n.defaultValue;let k=p;y&&!p&&w&&(k=b);const T=Ol(k),O=Object.prototype.toString.apply(k);if(y&&k&&T&&m.indexOf(O)<0&&!(F(g)&&Array.isArray(k))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,k,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(d.res=A,d.usedParams=this.getUsedParamsDetails(n),d):A}if(i){const A=Array.isArray(k),L=A?[]:{},N=A?f:h;for(const M in k)if(Object.prototype.hasOwnProperty.call(k,M)){const se=`${N}${i}${M}`;w&&!p?L[M]=this.translate(se,{...n,defaultValue:Ol(b)?b[M]:void 0,joinArrays:!1,ns:a}):L[M]=this.translate(se,{...n,joinArrays:!1,ns:a}),L[M]===se&&(L[M]=k[M])}p=L}}else if(y&&F(g)&&Array.isArray(p))p=p.join(g),p&&(p=this.extendTranslation(p,t,n,r));else{let A=!1,L=!1;!this.isValidLookup(p)&&w&&(A=!0,p=b),this.isValidLookup(p)||(L=!0,p=o);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:p,se=w&&b!==p&&this.options.updateMissing;if(L||A||se){if(this.logger.log(se?"updateKey":"missingKey",l,c,o,se?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 we=[];const Ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ye&&Ye[0])for(let re=0;re<Ye.length;re++)we.push(Ye[re]);else this.options.saveMissingTo==="all"?we=this.languageUtils.toResolveHierarchy(n.lng||this.language):we.push(n.lng||this.language);const ot=(re,oe,ie)=>{var Re;const Le=w&&ie!==p?ie:M;this.options.missingKeyHandler?this.options.missingKeyHandler(re,c,oe,Le,se,n):(Re=this.backendConnector)!=null&&Re.saveMissing&&this.backendConnector.saveMissing(re,c,oe,Le,se,n),this.emit("missingKey",re,c,oe,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?we.forEach(re=>{const oe=this.pluralResolver.getSuffixes(re,n);R&&n[`defaultValue${this.options.pluralSeparator}zero`]&&oe.indexOf(`${this.options.pluralSeparator}zero`)<0&&oe.push(`${this.options.pluralSeparator}zero`),oe.forEach(ie=>{ot([re],o+ie,n[`defaultValue${ie}`]||b)})}):ot(we,o,b))}p=this.extendTranslation(p,t,n,d,r),L&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${o}`),(L||A)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,A?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=Al.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 y,x;this.isValidLookup(r)||(a=g,!kl[`${m[0]}-${g}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(a))&&(kl[`${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 R;if(this.isValidLookup(r))return;o=w;const C=[u];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,w,g,n);else{let b;p&&(b=this.pluralResolver.getSuffix(w,n.count,n));const k=`${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+k)),f){const O=`${u}${this.options.contextSeparator}${n.context}`;C.push(O),p&&(C.push(O+b),n.ordinal&&b.indexOf(T)===0&&C.push(O+b.replace(T,this.options.pluralSeparator)),h&&C.push(O+k))}}let P;for(;P=C.pop();)this.isValidLookup(r)||(i=P,r=this.getResource(w,g,P,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 Pl{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mt.create("languageUtils")}getScriptPartFromCode(t){if(t=ns(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=ns(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 Ll={zero:0,one:1,two:2,few:3,many:4,other:5},Nl={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sg{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=ns(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!"),Nl;if(!t.match(/-|_/))return Nl;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)=>Ll[s]-Ll[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 Ml=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=hg(e,t,n);return!i&&s&&F(n)&&(i=Ci(e,n,r),i===void 0&&(i=Ci(t,n,r))),i},Ei=e=>e.replace(/\$/g,"$$$$");class Cg{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:y,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:gg,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?_n(i):o||"{{",this.suffix=a?_n(a):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?_n(p):h||_n("$t("),this.nestingSuffix=f?_n(f):m||_n(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||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=Ml(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(),y=m.join(this.formatSeparator).trim();return this.format(Ml(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),y,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=>Ei(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?Ei(this.escape(f)):Ei(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 y=u(t,i,s);o=F(y)?y:""}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=Cl(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=Cl(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 Eg=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}},Sn=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(ns(r),s),t[o]=a),a(n)}};class xg{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mt.create("formatter"),this.options=t,this.formats={number:Sn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Sn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Sn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Sn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Sn((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()]=Sn(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}=Eg(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 Ig=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Tg extends ss{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=>{fg(c.loaded,[i],o),Ig(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 Dl=()=>({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}}),Fl=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},os=()=>{},Rg=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class dr extends ss{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Fl(t),this.services={},this.logger=mt,this.modules={external:[]},Rg(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=Dl();this.options={...s,...this.options,...Fl(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=xg;const d=new Pl(this.options);this.store=new Rl(this.options.resources,this.options);const p=this.services;p.logger=mt,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new Sg(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 Cg(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Tg(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 is(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=os),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=lr(),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]:os;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=lr();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=os),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"&&Al.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=lr();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=lr();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=lr();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 Pl(Dl());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 dr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:os;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new dr(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 Rl(a,s),i.services.resourceStore=i.store}return i.translator=new is(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 he=dr.createInstance();he.createInstance=dr.createInstance,he.createInstance,he.dir,he.init,he.loadResources,he.reloadResources,he.use,he.changeLanguage,he.getFixedT,he.t,he.exists,he.setDefaultNamespace,he.hasLoadedNamespace,he.loadNamespaces,he.loadLanguages;const Ag={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"}},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"}},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"}}};class H{static init(t){const n=Hr(t==null?void 0:t.language,Kh,"en");return he.init({lng:n,fallbackLng:"en",resources:Ag,interpolation:{escapeValue:!1}})}static getCurrent(){return he.language}static translate(t,n){return he.t(t,n??{})}}const pr={small:"32px",medium:"40px",large:"48px"},kg=(e="medium")=>`calc(${pr[e]} + 8px * 2 )`,Og=or`
|
|
120
|
+
`;class qe extends se{constructor({name:t,color:n="currentColor",size:r=16,alt:s}){const i=Og(t),o=Rg(Bl.FIREFOX);super({tag:"span",styles:()=>Ug({size:r,color:n,isSvgResource:i,isAlternativeStyles:o})});const a=Cg[t];if(a)this.element.innerHTML=a.svg;else if(i){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=s??"icon",this.element.append(c)}}}const mr={small:"32px",medium:"40px",large:"48px"},$g=(e="medium")=>`calc(${mr[e]} + 8px * 2 )`,Vg=lr`
|
|
116
121
|
0% { transform: none; }
|
|
117
122
|
12.5% { transform: none; }
|
|
118
123
|
25% { transform: scale(1.1); }
|
|
119
124
|
37.5% { transform: scale(1.1); }
|
|
120
125
|
50% { transform: none; }
|
|
121
126
|
100% { transform: none; }
|
|
122
|
-
`,
|
|
127
|
+
`,zg=(e="medium")=>{const t=mr[e],n=`calc(${t} * -1)`,r=`calc(${t} * -2)`;return lr`
|
|
123
128
|
0% { transform: translateY(0); }
|
|
124
129
|
12.5% { transform: translateY(${n}); }
|
|
125
130
|
25% { transform: translateY(${n}); }
|
|
126
131
|
37.5% { transform: translateY(${r}); }
|
|
127
132
|
87.5% { transform: translateY(${r}); }
|
|
128
133
|
100% { transform: translateY(0); }
|
|
129
|
-
`},
|
|
134
|
+
`},Hg=(e,t="medium")=>{switch(t){case"small":return j`
|
|
130
135
|
padding: 8px;
|
|
131
|
-
height: ${
|
|
136
|
+
height: ${mr[t]};
|
|
132
137
|
font-size: 12px;
|
|
133
138
|
line-height: 16px;
|
|
134
139
|
border-radius: ${e.button.small.borderRadius}px;
|
|
135
140
|
font-weight: 600;
|
|
136
|
-
`;case"medium":return
|
|
141
|
+
`;case"medium":return j`
|
|
137
142
|
padding: 8px 16px;
|
|
138
|
-
height: ${
|
|
143
|
+
height: ${mr[t]};
|
|
139
144
|
line-height: 24px;
|
|
140
145
|
border-radius: ${e.button.medium.borderRadius}px;
|
|
141
146
|
font-size: 14px;
|
|
142
|
-
`;case"large":default:return
|
|
147
|
+
`;case"large":default:return j`
|
|
143
148
|
padding: 8px 16px;
|
|
144
|
-
height: ${
|
|
149
|
+
height: ${mr[t]};
|
|
145
150
|
line-height: 32px;
|
|
146
151
|
border-radius: ${e.button.large.borderRadius}px;
|
|
147
152
|
font-size: 16px;
|
|
148
|
-
`}},
|
|
153
|
+
`}},Ai=(e,t)=>j`
|
|
149
154
|
cursor: not-allowed;
|
|
150
155
|
background-color: ${t?e.apButtonDisableBgColor:e.button.disabled.backgroundColor};
|
|
151
156
|
color: ${t?e.apButtonDisableTextColor:e.button.disabled.textColor};
|
|
152
|
-
`,
|
|
157
|
+
`,jg=(e,t,n)=>{switch(e){case"primary":return j`
|
|
153
158
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
154
159
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
155
160
|
border: ${n.isApTheme?"unset":`${t.button.primary.borderWidth}px solid ${t.button.primary.borderColor}`};
|
|
156
161
|
&:hover {
|
|
157
|
-
background-color: ${
|
|
162
|
+
background-color: ${Ti(n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor,.7)};
|
|
158
163
|
}
|
|
159
164
|
&:disabled {
|
|
160
|
-
${
|
|
165
|
+
${Ai(t,n.isApTheme)}
|
|
161
166
|
}
|
|
162
|
-
`;case"secondary":return
|
|
167
|
+
`;case"secondary":return j`
|
|
163
168
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
164
169
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
165
170
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
166
171
|
&:hover {
|
|
167
|
-
background-color: ${
|
|
172
|
+
background-color: ${Ti(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
168
173
|
}
|
|
169
174
|
&:disabled {
|
|
170
|
-
${
|
|
175
|
+
${Ai(t,n.isApTheme)}
|
|
171
176
|
}
|
|
172
|
-
`;case"text":return
|
|
177
|
+
`;case"text":return j`
|
|
173
178
|
background-color: ${n.isApTheme?"unset":t.button.text.backgroundColor};
|
|
174
179
|
color: ${n.isApTheme?t.apButtonTextTxtColor:t.button.text.textColor};
|
|
175
180
|
border: ${n.isApTheme?1:t.button.text.borderWidth}px solid
|
|
@@ -180,23 +185,23 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
180
185
|
background-color: ${n.isApTheme?"unset":t.button.disabled.backgroundColor};
|
|
181
186
|
cursor: not-allowed;
|
|
182
187
|
}
|
|
183
|
-
`;case"copy-to-clipboard":return
|
|
188
|
+
`;case"copy-to-clipboard":return j`
|
|
184
189
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
185
190
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
186
191
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
187
192
|
&:hover {
|
|
188
|
-
background-color: ${
|
|
193
|
+
background-color: ${Ti(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
189
194
|
}
|
|
190
195
|
&:disabled {
|
|
191
|
-
${
|
|
196
|
+
${Ai(t,n.isApTheme)}
|
|
192
197
|
}
|
|
193
198
|
&[data-is-copied='true'] {
|
|
194
199
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
195
200
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
196
201
|
box-shadow: none;
|
|
197
|
-
animation: ${
|
|
202
|
+
animation: ${Vg} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
198
203
|
}
|
|
199
|
-
`;default:return
|
|
204
|
+
`;default:return j``}},Wg=(e,t)=>{const{size:n,variant:r,isFullWidth:s}=t,i=j`
|
|
200
205
|
border: none;
|
|
201
206
|
cursor: pointer;
|
|
202
207
|
display: inline-flex;
|
|
@@ -238,7 +243,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
238
243
|
opacity 0.3s ease,
|
|
239
244
|
visibility 0.3s ease;
|
|
240
245
|
|
|
241
|
-
margin-top: ${
|
|
246
|
+
margin-top: ${$g(n)};
|
|
242
247
|
}
|
|
243
248
|
|
|
244
249
|
&:focus-visible {
|
|
@@ -247,7 +252,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
247
252
|
|
|
248
253
|
&[data-is-copied='true'] {
|
|
249
254
|
.content-wrapper {
|
|
250
|
-
animation: ${
|
|
255
|
+
animation: ${zg(n)} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
251
256
|
}
|
|
252
257
|
|
|
253
258
|
.content-copy {
|
|
@@ -255,7 +260,21 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
255
260
|
opacity: 1;
|
|
256
261
|
}
|
|
257
262
|
}
|
|
258
|
-
`;return
|
|
263
|
+
`;return Zm(i,Hg(e,n),jg(r,e,t))};class Dt extends se{constructor({text:n,size:r="large",variant:s="primary",iconLeft:i,iconRight:o,isLoading:a=!1,isDisabled:c=!1,isFullWidth:l=!1,onClick:u,copyText:d=V.translate("copied"),isApTheme:p=!1}){const h={size:r,variant:s,isFullWidth:l,isApTheme:p};super({tag:"button",styles:f=>Wg(f,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=u,this.copyText=d,this.element.disabled=c,this.originalText=n,this.originalIconLeft=i,this.originalIconRight=o,this.variant=s,this.updateContent({text:n,iconLeft:i,iconRight:o}),this.element.addEventListener("click",this.handleClick.bind(this))}updateContent({text:n,iconLeft:r,iconRight:s}){this.element.innerHTML="";const i=document.createElement("div");if(i.classList.add("content-wrapper"),this.isLoading){const o=new It({size:16}).element;o.style.margin="auto",i.append(o),this.element.append(i)}else{const o=document.createElement("div");if(o.classList.add("content-info"),r&&(this.iconLeft=new qe({name:r}),o.append(this.iconLeft.element)),n&&o.appendChild(document.createTextNode(n)),s&&(this.iconRight=new qe({name:s}),o.append(this.iconRight.element)),i.append(o),this.variant==="copy-to-clipboard"){const a=document.createElement("div");a.classList.add("content-copy"),a.append(document.createTextNode(this.copyText)),i.append(a)}this.element.append(i)}}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 X=(e,t,n)=>{const r=z.getStyles();return t?r.input.disabled:e?r.input.error:r.input.normal},Jt=(e,t,n)=>({label:{size:12,lineHeight:16,weight:500,color:X(e,t).textColor},helperText:{size:12,lineHeight:16,weight:400,color:X(e,t).hintTextColor}}),qg=e=>j`
|
|
264
|
+
display: flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
gap: 10px;
|
|
267
|
+
width: 100%;
|
|
268
|
+
|
|
269
|
+
.divider-line {
|
|
270
|
+
flex-grow: 1;
|
|
271
|
+
border: none;
|
|
272
|
+
background: none;
|
|
273
|
+
border-top: ${e.divider.size}px ${e.divider.color};
|
|
274
|
+
border-top-style: ${e.divider.variant};
|
|
275
|
+
margin: 0;
|
|
276
|
+
}
|
|
277
|
+
`;class ki extends se{constructor({text:t}){super({tag:"div",styles:r=>qg(r)});const n=document.createElement("hr");if(n.classList.add("divider-line"),this.element.appendChild(n),t){const r=new H({text:t,size:16,weight:600,lineHeight:24}),s=document.createElement("hr");s.classList.add("divider-line"),r.render(this.element),this.element.appendChild(s)}}}const Vl=(e,{error:t,disabled:n,maxWidth:r})=>j`
|
|
259
278
|
display: flex;
|
|
260
279
|
flex-direction: column;
|
|
261
280
|
gap: 4px;
|
|
@@ -270,17 +289,17 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
270
289
|
display: flex;
|
|
271
290
|
align-items: center;
|
|
272
291
|
|
|
273
|
-
background-color: ${
|
|
274
|
-
color: ${
|
|
292
|
+
background-color: ${X(t,n).backgroundColor};
|
|
293
|
+
color: ${X(t,n).textColor};
|
|
275
294
|
|
|
276
|
-
border: ${
|
|
277
|
-
${
|
|
295
|
+
border: ${X(t,n).borderWidth}px solid
|
|
296
|
+
${X(t,n).borderColor};
|
|
278
297
|
transition: border-color 0.3s ease;
|
|
279
298
|
cursor: pointer;
|
|
280
299
|
|
|
281
300
|
height: 40px;
|
|
282
301
|
padding: 0px;
|
|
283
|
-
border-radius: ${
|
|
302
|
+
border-radius: ${X(t,n).borderRadius}px;
|
|
284
303
|
|
|
285
304
|
:hover,
|
|
286
305
|
:focus-within {
|
|
@@ -319,16 +338,16 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
319
338
|
|
|
320
339
|
&::placeholder {
|
|
321
340
|
font-size: 16px;
|
|
322
|
-
color: ${
|
|
341
|
+
color: ${X(t,n).placeholderTextColor};
|
|
323
342
|
opacity: 1;
|
|
324
343
|
}
|
|
325
344
|
&:-ms-input-placeholder {
|
|
326
345
|
font-size: 16px;
|
|
327
|
-
color: ${
|
|
346
|
+
color: ${X(t,n).placeholderTextColor};
|
|
328
347
|
}
|
|
329
348
|
&::-ms-input-placeholder {
|
|
330
349
|
font-size: 16px;
|
|
331
|
-
color: ${
|
|
350
|
+
color: ${X(t,n).placeholderTextColor};
|
|
332
351
|
}
|
|
333
352
|
|
|
334
353
|
&::-webkit-contacts-auto-fill-button {
|
|
@@ -362,14 +381,14 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
362
381
|
overflow-y: auto;
|
|
363
382
|
border: 1px solid ${e.input.focus.borderColor};
|
|
364
383
|
border-radius: 8px;
|
|
365
|
-
background-color: ${
|
|
384
|
+
background-color: ${X(t,n).backgroundColor};
|
|
366
385
|
z-index: 10;
|
|
367
386
|
list-style-type: none;
|
|
368
387
|
padding: 0;
|
|
369
388
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
370
389
|
|
|
371
390
|
scrollbar-width: thin;
|
|
372
|
-
scrollbar-color: ${e.input.focus.borderColor} ${
|
|
391
|
+
scrollbar-color: ${e.input.focus.borderColor} ${X().backgroundColor};
|
|
373
392
|
|
|
374
393
|
&::-webkit-scrollbar {
|
|
375
394
|
width: 6px;
|
|
@@ -377,7 +396,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
377
396
|
}
|
|
378
397
|
|
|
379
398
|
&::-webkit-scrollbar-track {
|
|
380
|
-
background: ${
|
|
399
|
+
background: ${X().backgroundColor};
|
|
381
400
|
border-radius: 8px;
|
|
382
401
|
}
|
|
383
402
|
|
|
@@ -397,7 +416,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
397
416
|
padding: 8px;
|
|
398
417
|
cursor: pointer;
|
|
399
418
|
transition: background-color 0.2s ease;
|
|
400
|
-
color: ${
|
|
419
|
+
color: ${X(t,n).textColor};
|
|
401
420
|
|
|
402
421
|
&:hover {
|
|
403
422
|
background-color: ${e.input.focus.backgroundColor};
|
|
@@ -418,7 +437,7 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
418
437
|
.select-icon {
|
|
419
438
|
margin-left: 8px;
|
|
420
439
|
}
|
|
421
|
-
`;class
|
|
440
|
+
`;class zl extends se{constructor({name:n,label:r,options:s,helperText:i,placeholder:o=V.translate("select"),emptyMessage:a=V.translate("select_item"),error:c=!1,disabled:l=!1,maxWidth:u="100%",showValue:d=!1,validateOn:p,onChange:h}){super({tag:"div",styles:m=>Vl(m,{error:c,disabled:l,maxWidth:u})});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=s,this.emptyMessage=a,this.showValue=d,this.currentErrorState=c,this.currentDisabledState=l,this.currentHelperText=i,this.validateOn=p,this.maxWidth=u,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=l,o&&(this.inputElement.placeholder=o),this.selectContainer.append(this.inputElement),this.dropdownIcon=document.createElement("span"),this.dropdownIcon.classList.add("dropdown-icon-wrapper");const f=new qe({name:"arrow_down_line",size:24}).element;this.dropdownIcon.appendChild(f),this.selectContainer.appendChild(this.dropdownIcon),this.optionsList=document.createElement("ul"),this.optionsList.classList.add("select-options-list"),this.selectContainer.append(this.optionsList),this.renderOptions(s),this.selectContainer.addEventListener("click",m=>{this.optionsList.contains(m.target)||(this.toggleDropdown(!0),this.inputElement.setSelectionRange(0,this.inputElement.value.length),this.inputElement.focus())}),this.inputElement.addEventListener("input",m=>{var g;this.handleInput(m),(g=this.onChange)==null||g.call(this)}),this.selectContainer.addEventListener("change",this.handleInputChange.bind(this)),this.inputElement.addEventListener("keydown",m=>this.handleKeyDown(m)),i&&this.renderHelperText(i),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=Jt(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new H({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=Jt(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new H({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=>Vl(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 s=document.createElement("li");if(s.classList.add("select-option"),r.icon){const o=new qe({name:r.icon,size:20}).element;s.appendChild(o)}const i=new H({text:`${r.name} ${this.showValue?r.value:""}`,size:16,lineHeight:24,weight:400}).element;s.appendChild(i),s.dataset.value=String(r.value),s.addEventListener("click",()=>this.handleOptionClick(r)),this.optionsList.append(s)});else{const r=document.createElement("div");r.classList.add("empty-option");const s=new H({text:this.emptyMessage??""}).element;r.append(s),this.optionsList.append(r)}}handleInput(n){const r=n.target.value.toLowerCase();if(r===""){const i=this.selectContainer.querySelector(".select-icon");i&&i.remove(),this.selectedValue=null}const s=this.options.filter(i=>{const o=i.name.toLowerCase().includes(r),a=this.showValue?String(i.value).toLowerCase().includes(r):!1;return o||a});this.renderOptions(s),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:s}){const i=this.selectContainer.querySelector(".select-icon");if(i&&i.remove(),s){const a=new qe({name:s,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 o=new Event("change",{bubbles:!0});this.inputElement.dispatchEvent(o)}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 s=this.optionsList.querySelectorAll(".select-option");switch(r){case"ArrowDown":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex+1)%s.length,this.highlightOption(this.highlightedIndex);break;case"ArrowUp":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex-1+s.length)%s.length,this.highlightOption(this.highlightedIndex);break;case"Enter":if(n.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<this.filteredOptions.length){const i=this.filteredOptions[this.highlightedIndex];this.handleOptionClick(i)}break}}highlightOption(n){const r=this.optionsList.querySelectorAll(".select-option");if(r.forEach(s=>s.classList.remove("highlighted")),n>=0&&n<r.length){const s=r[n];s.classList.add("highlighted"),s.scrollIntoView({block:"nearest"})}}getValue(){return this.selectedValue}setValue(n){const r=this.options.find(s=>s.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 s=n||(this.getValue()?V.translate("invalid_field"):V.translate("required_field"));this.renderHelperText(s)}return r}destroy(){document.removeEventListener("click",this.handleClickOutside.bind(this)),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),super.destroy()}}const Hl=(e,{error:t,disabled:n})=>j`
|
|
422
441
|
display: flex;
|
|
423
442
|
flex-direction: column;
|
|
424
443
|
gap: 4px;
|
|
@@ -438,16 +457,16 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
438
457
|
line-height: normal;
|
|
439
458
|
height: 40px;
|
|
440
459
|
padding: 8px;
|
|
441
|
-
border-radius: ${
|
|
460
|
+
border-radius: ${X(t,n).borderRadius}px;
|
|
442
461
|
font-size: 16px;
|
|
443
462
|
line-height: 24px;
|
|
444
463
|
outline: none;
|
|
445
464
|
caret-color: ${e.textColor};
|
|
446
465
|
|
|
447
|
-
background-color: ${
|
|
448
|
-
color: ${
|
|
449
|
-
border: ${
|
|
450
|
-
${
|
|
466
|
+
background-color: ${X(t,n).backgroundColor};
|
|
467
|
+
color: ${X(t,n).textColor};
|
|
468
|
+
border: ${X(t,n).borderWidth}px solid
|
|
469
|
+
${X(t,n).borderColor};
|
|
451
470
|
transition: border-color 0.3s ease;
|
|
452
471
|
|
|
453
472
|
:hover,
|
|
@@ -474,23 +493,23 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
474
493
|
}
|
|
475
494
|
&::placeholder {
|
|
476
495
|
font-size: 16px;
|
|
477
|
-
color: ${
|
|
496
|
+
color: ${X(t,n).placeholderTextColor};
|
|
478
497
|
opacity: 1;
|
|
479
498
|
}
|
|
480
499
|
&:-ms-input-placeholder {
|
|
481
500
|
font-size: 16px;
|
|
482
|
-
color: ${
|
|
501
|
+
color: ${X(t,n).placeholderTextColor};
|
|
483
502
|
}
|
|
484
503
|
&::-ms-input-placeholder {
|
|
485
504
|
font-size: 16px;
|
|
486
|
-
color: ${
|
|
505
|
+
color: ${X(t,n).placeholderTextColor};
|
|
487
506
|
}
|
|
488
507
|
&::-webkit-contacts-auto-fill-button {
|
|
489
508
|
visibility: hidden;
|
|
490
509
|
pointer-events: none;
|
|
491
510
|
}
|
|
492
511
|
}
|
|
493
|
-
`;class
|
|
512
|
+
`;class jl extends se{constructor({name:n,label:r,helperText:s,type:i="text",placeholder:o,error:a=!1,disabled:c=!1,validationRegex:l,validateOn:u,mask:d,maxLength:p,minLength:h,onChange:f,onBlur:m}){super({tag:"div",styles:g=>Hl(g,{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=s,this.validateOn=u,this.validationRegex=l,this.mask=d,this.onChange=f,this.onBlur=m,r&&this.renderLabel(),this.inputElement=document.createElement("input"),this.inputElement.type=i==="number"?"number":"text",this.inputElement.inputMode=i,this.inputElement.name=n,this.inputElement.id=n,this.inputElement.autocomplete="off",this.inputElement.disabled=c,o&&(this.inputElement.placeholder=o),p&&(this.inputElement.maxLength=p),h&&(this.inputElement.minLength=h),this.inputElement.classList.add("input-field"),this.element.append(this.inputElement),["number","tel"].includes(i)&&this.inputElement.addEventListener("input",this.handleNumericInput.bind(this)),this.inputElement.addEventListener("input",this.handleInputChange.bind(this)),this.inputElement.addEventListener("blur",this.handleInputBlur.bind(this)),s&&this.renderHelperText(s)}handleInputChange(){var n;this.inputElement.value=sm(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=Jt(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new H({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=Jt(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new H({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=>Hl(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=im(this.inputElement.value,this.mask),s=this.validationRegex.test(r);if(this.setErrorState(!s),this.renderLabel(),!s){const i=n||(this.getValue().trim()?V.translate("invalid_field"):V.translate("required_field"));this.renderHelperText(i)}return s}}var Xt=(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))(Xt||{}),Ri=(e=>(e.TEXT="TEXT",e.SELECT="SELECT",e))(Ri||{});const Gg=e=>{if(e)try{return new RegExp(e)}catch{console.warn("Invalid regex from backend:",e);return}},Kg=e=>e.map(t=>({name:t.value,value:t.key}));var Wl=(e=>(e.MOBILE="480px",e.TABLET="768px",e.LAPTOP="1024px",e.DESKTOP="1280px",e))(Wl||{});const Yg=()=>j`
|
|
494
513
|
display: flex;
|
|
495
514
|
flex-direction: column;
|
|
496
515
|
gap: 12px;
|
|
@@ -498,8 +517,13 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
498
517
|
.row-container {
|
|
499
518
|
display: flex;
|
|
500
519
|
gap: 12px;
|
|
520
|
+
flex-direction: row;
|
|
521
|
+
|
|
522
|
+
@media (max-width: ${Wl.MOBILE}) {
|
|
523
|
+
flex-direction: column;
|
|
524
|
+
}
|
|
501
525
|
}
|
|
502
|
-
`;class
|
|
526
|
+
`;class Zg extends se{constructor(n){super({tag:"div",styles:()=>Yg()});S(this,"componentProps");S(this,"dynamicInputs",{});S(this,"onValidationChange",()=>{});if(this.componentProps=n,n.title){const r=new ki({text:n.title}).element;this.element.append(r)}this.renderDynamicInputs()}renderDynamicInputs(){if(!this.componentProps.requiredFields)return;const n=this.componentProps.requiredFields.find(i=>i.field==="document_type"),r=this.componentProps.requiredFields.find(i=>i.field==="document_number"),s=this.componentProps.requiredFields.filter(i=>i.field!=="document_type"&&i.field!=="document_number");n&&r?this.renderDocumentNumberWithType(n,r):(n&&this.renderStandardInput(n),r&&this.renderStandardInput(r)),s.forEach(i=>{this.renderStandardInput(i)})}renderDocumentNumberWithType(n,r){const s=document.createElement("div");s.classList.add("row-container");const i=this.createInputElement(n),o=this.createInputElement(r);this.dynamicInputs[n.field]=i,this.dynamicInputs[r.field]=o,this.addInputEventListeners(i,n.type),this.addInputEventListeners(o,r.type),s.append(i.element,o.element),this.element.append(s)}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===Ri.SELECT?this.createSelectInput({name:n.field,label:n.label,placeholder:n.placeholder,options:Kg(n.values),validateOn:"onChange"}):this.createTextInput({name:n.field,label:n.label,placeholder:n.placeholder,type:"text",validationRegex:Gg(n.regex),validateOn:"onChange"})}createSelectInput(n){return new zl(n)}createTextInput(n){return new jl(n)}addInputEventListeners(n,r){const s=r===Ri.TEXT?"input":"change";n.element.addEventListener(s,()=>{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,s])=>{const i=s.getValue();n[r]=i!==null?String(i):""}),n}setValidationChangeHandler(n){this.onValidationChange=n,this.triggerValidationChange()}triggerValidationChange(){this.onValidationChange&&this.onValidationChange(this.validateForm())}setFieldError(n,r,s){const i=this.dynamicInputs[n];i&&(i.setErrorState(r),s&&i.setHelperText(s))}}const Jg={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.0",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.0",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.0",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com"}};var gr=(e=>(e.SESSION_ID="session_id",e))(gr||{});const Pt=class Pt{static init(t){const n=Gr(t==null?void 0:t.environment,[...Jh,"test"],"production"),r=Gr(t==null?void 0:t.currencyMode,em,"iso");Pt.environment=n,Pt.currencyMode=r}static getRuntimeConfig(){const t=Pt.environment||"production";return Jg[t]}static getEnvironment(){return Pt.environment}static getCurrencyMode(){return Pt.currencyMode}};S(Pt,"environment"),S(Pt,"currencyMode");let Le=Pt;const Xg={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"},Qg=(e,t)=>{const n=Xg[t]||"en-US";return new Intl.NumberFormat(n,{style:"decimal",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},e1={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:"$"},t1=e=>e===void 0?"":e1[e.trim()]||e,Pi=(e,t,n)=>{const r=Qg(e,t);return n==="symbol"?`${t1(t)} ${r}`:`${r} ${t}`},n1=e=>j`
|
|
503
527
|
display: flex;
|
|
504
528
|
flex-direction: column;
|
|
505
529
|
background-color: ${e.card.backgroundColor};
|
|
@@ -508,23 +532,23 @@ ${n}`:""}`;await fi(r)}};function Hr(e,t,n){return t.includes(e)?e:n}const Jh=e=
|
|
|
508
532
|
padding: ${e.card.padding}px;
|
|
509
533
|
border: ${e.card.borderWidth}px ${e.card.borderStyle} ${e.card.borderColor};
|
|
510
534
|
border-radius: ${e.card.borderRadius}px;
|
|
511
|
-
`;class
|
|
535
|
+
`;class r1 extends se{constructor(t){super({tag:"div",styles:s=>n1(s)});const n=new H({text:V.translate("payment_amount"),size:16,lineHeight:24,weight:600}).element,r=new H({text:Pi(t.amount,t.currency,Le.getCurrencyMode()),size:26,lineHeight:24,weight:600}).element;this.element.append(n,r)}}const s1=()=>j`
|
|
512
536
|
display: flex;
|
|
513
537
|
flex-direction: column;
|
|
514
538
|
align-items: center;
|
|
515
539
|
gap: 8px;
|
|
516
|
-
`;class Ti extends te{constructor(t){super({tag:"div",styles:()=>qg()});const n=t.type==="success",r=n?V.getStyles().messages.success.textColor:V.getStyles().messages.error.textColor,s=new He({name:n?"check_circle_line":"close_circle_line",size:96,color:r}).element;if(this.element.append(s),t.title){const i=new z({text:t.title,size:20,lineHeight:30,weight:600,align:"center"}).element;this.element.append(i)}if(t.description){const i=new z({text:t.description,size:16,lineHeight:24,align:"center"}).element;this.element.append(i)}}}const as={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},Tt=console,En={};Object.keys(as).forEach(e=>{En[e]=Tt[e]});const fr="Datadog Browser SDK:",q={debug:En.debug.bind(Tt,fr),log:En.log.bind(Tt,fr),info:En.info.bind(Tt,fr),warn:En.warn.bind(Tt,fr),error:En.error.bind(Tt,fr)},cs="https://docs.datadoghq.com",Gg=`${cs}/real_user_monitoring/browser/troubleshooting`,Ri="More details:";function Hl(e,t){return(...n)=>{try{return e(...n)}catch(r){q.error(t,r)}}}function Mt(e){return e!==0&&Math.random()*100<=e}function ls(e,t){return+e.toFixed(t)}function Kg(e){return hr(e)&&e>=0&&e<=100}function hr(e){return typeof e=="number"}const Ie=1e3,Me=60*Ie,jl=60*Me,Wl=365*(24*jl);function us(e){return{relative:e,timeStamp:Zg(e)}}function Yg(e){return{relative:Ai(e),timeStamp:e}}function Zg(e){const t=Ze()-performance.now();return t>mr()?Math.round(xn(t,e)):Xg(e)}function Jg(){return Math.round(Ze()-xn(mr(),performance.now()))}function B(e){return hr(e)?ls(e*1e6,0):e}function Ze(){return new Date().getTime()}function me(){return Ze()}function Je(){return performance.now()}function ke(){return{relative:Je(),timeStamp:me()}}function ql(){return{relative:0,timeStamp:mr()}}function _e(e,t){return t-e}function xn(e,t){return e+t}function Ai(e){return e-mr()}function Xg(e){return Math.round(xn(mr(),e))}function Qg(e){return e<Wl}let ki;function mr(){return ki===void 0&&(ki=performance.timing.navigationStart),ki}const gr=1024,Gl=1024*gr,e1=/[^\u0000-\u007F]/;function Kl(e){return e1.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function t1(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 br(e){return{...e}}function ds(e,t){return Object.keys(e).some(n=>e[n]===t)}function Kt(e){return Object.keys(e).length===0}function n1(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function gt(){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 Dt(e,t){const n=gt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let Oi,Yl=!1;function r1(e){Oi=e}function s1(e){Yl=e}function $(e){return function(){return Yt(e,this,arguments)}}function Yt(e,t,n){try{return e.apply(t,n)}catch(r){Rt(r)}}function Rt(e){if(Pi(e),Oi)try{Oi(e)}catch(t){Pi(t)}}function Pi(...e){Yl&&q.error("[MONITOR]",...e)}function ge(e,t){return Dt(gt(),"setTimeout")($(e),t)}function De(e){Dt(gt(),"clearTimeout")(e)}function In(e,t){return Dt(gt(),"setInterval")($(e),t)}function ps(e){Dt(gt(),"clearInterval")(e)}class X{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 Zl(...e){return new X(t=>{const n=e.map(r=>r.subscribe(s=>t.notify(s)));return()=>n.forEach(r=>r.unsubscribe())})}function Ft(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=ge(()=>{s&&o&&e(...o),i=!1,o=void 0},t)},cancel:()=>{De(a),i=!1,o=void 0}}}function G(){}function Se(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,Se)}const fs=/([\w-]+)\s*=\s*([^;]+)/g;function yr(e,t){for(fs.lastIndex=0;;){const n=fs.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function i1(e){const t=new Map;for(fs.lastIndex=0;;){const n=fs.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Jl(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 o1(){return Xl()===0}function a1(){return Xl()===1}let hs;function Xl(){return hs??(hs=c1())}function c1(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 wr(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 Li(e){return yr(document.cookie,e)}let Ni;function Bt(e){return Ni||(Ni=i1(document.cookie)),Ni.get(e)}function Ql(e,t){wr(e,"",0,t)}function l1(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${Se()}`,n="test";wr(t,n,Me,e);const r=Li(t)===n;return Ql(t,e),r}catch(t){return q.error(t),!1}}let Mi;function u1(){if(Mi===void 0){const e=`dd_site_test_${Se()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!Li(e);)r=`${n.pop()}.${r}`,wr(e,t,Ie,{domain:r});Ql(e,{domain:r}),Mi=r}return Mi}const Tn="_dd_s";function d1(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function eu(e){return Object.values(e)}function Di(e){return Object.entries(e)}const Zt=4*jl,tu=15*Me,p1=Wl,vr={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},nu=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Fi="&";function f1(e){return!!e&&(e.indexOf(Fi)!==-1||nu.test(e))}const h1="1";function Jt(e,t){const n={isExpired:h1};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=Se()),n}function ms(e){return Kt(e)}function ru(e){return!ms(e)}function gs(e){return e.isExpired!==void 0||!m1(e)}function m1(e){return(e.created===void 0||Ze()-Number(e.created)<Zt)&&(e.expire===void 0||Ze()<Number(e.expire))}function su(e){e.expire=String(Ze()+tu)}function Bi(e){return Di(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Fi)}function iu(e){const t={};return f1(e)&&e.split(Fi).forEach(n=>{const r=nu.exec(n);if(r!==null){const[,s,i]=r;s==="aid"?t.anonymousId=i:t[s]=i}}),t}const g1="_dd",b1="_dd_r",y1="_dd_l",w1="rum",v1="logs";function _1(e){if(!Bt(Tn)){const n=Bt(g1),r=Bt(b1),s=Bt(y1),i={};n&&(i.id=n),s&&/^[01]$/.test(s)&&(i[v1]=s),r&&/^[012]$/.test(r)&&(i[w1]=r),ru(i)&&(su(i),e.persistSession(i))}}function ou(e){const t=I1(e);return l1(t)?{type:vr.COOKIE,cookieOptions:t}:void 0}function S1(e,t){const n={isLockEnabled:o1(),persistSession:C1(t),retrieveSession:x1,expireSession:r=>E1(t,r,e)};return _1(n),n}function C1(e){return t=>{wr(Tn,Bi(t),tu,e)}}function E1(e,t,n){const r=Jt(t,n);wr(Tn,Bi(r),n.trackAnonymousUser?p1:Zt,e)}function x1(){const e=Li(Tn);return iu(e)}function I1(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=u1()),t}const T1="_dd_test_";function au(){try{const e=Se(),t=`${T1}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:vr.LOCAL_STORAGE}:void 0}catch{return}}function R1(e){return{isLockEnabled:!1,persistSession:cu,retrieveSession:A1,expireSession:t=>k1(t,e)}}function cu(e){localStorage.setItem(Tn,Bi(e))}function A1(){const e=localStorage.getItem(Tn);return iu(e)}function k1(e,t){cu(Jt(e,t))}const O1=10,P1=100,lu=[];let bs;function Xt(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(bs||(bs=e),e!==bs){lu.push(e);return}if(s&&n>=P1){uu(t);return}let l,u=c();if(s){if(u.lock){ys(e,t,n);return}if(l=Se(),a(u.session),u=c(),u.lock!==l){ys(e,t,n);return}}let d=e.process(u.session);if(s&&(u=c(),u.lock!==l)){ys(e,t,n);return}if(d&&(gs(d)?o(d):(su(d),s?a(d):i(d))),s&&!(d&&gs(d))){if(u=c(),u.lock!==l){ys(e,t,n);return}i(u.session),d=u.session}(r=e.after)===null||r===void 0||r.call(e,d||u.session),uu(t)}function ys(e,t,n){ge(()=>{Xt(e,t,n+1)},O1)}function uu(e){bs=void 0;const t=lu.shift();t&&Xt(t,e)}const du=Ie;function L1(e){switch(e.sessionPersistence){case vr.COOKIE:return ou(e);case vr.LOCAL_STORAGE:return au();case void 0:{let t=ou(e);return!t&&e.allowFallbackToLocalStorage&&(t=au()),t}default:q.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function N1(e,t,n,r){const s=new X,i=new X,o=new X,a=e.type===vr.COOKIE?S1(t,e.cookieOptions):R1(t),{expireSession:c}=a,l=In(f,du);let u;g();const{throttled:d,cancel:p}=Ft(()=>{Xt({process:b=>{if(ms(b))return;const k=m(b);return y(k),k},after:b=>{ru(b)&&!x()&&P(b),u=b}},a)},du);function h(){Xt({process:b=>x()?m(b):void 0},a)}function f(){Xt({process:b=>gs(b)?Jt(b,t):void 0,after:m},a)}function m(b){return gs(b)&&(b=Jt(b,t)),x()&&(w(b)?C():(o.notify({previousState:u,newState:b}),u=b)),b}function g(){Xt({process:b=>{if(ms(b))return Jt(b,t)},after:b=>{u=b}},a)}function y(b){if(ms(b))return!1;const{trackingType:k,isTracked:T}=r(b[n]);b[n]=k,delete b.isExpired,T&&!b.id&&(b.id=Se(),b.created=String(Ze()))}function x(){return u[n]!==void 0}function w(b){return u.id!==b.id||u[n]!==b[n]}function C(){u=Jt(u,t),i.notify()}function P(b){u=b,s.notify()}function R(b){Xt({process:k=>({...k,...b}),after:m},a)}return{expandOrRenewSession:d,expandSession:h,getSession:()=>u,renewObservable:s,expireObservable:i,sessionStateUpdateObservable:o,restartSession:g,expire:()=>{p(),c(u),m(Jt(u,t))},stop:()=>{ps(l)},updateSessionState:R}}const Ui={GRANTED:"granted",NOT_GRANTED:"not-granted"};function M1(e){const t=new X;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Ui.GRANTED},observable:t}}function Rn(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=An(Object.prototype),s=An(Array.prototype),i=An(Object.getPrototypeOf(e)),o=An(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),s(),i(),o()}}function An(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):G}function $i(e){return ws(e,location.href).href}function D1(e){try{return!!ws(e)}catch{return!1}}function F1(e){const t=ws(e).pathname;return t[0]==="/"?t:`/${t}`}function ws(e,t){const n=B1();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)} ${Rn({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 pu=URL;let vs;function B1(){if(vs===void 0)try{vs=new pu("http://test/path").href==="http://test/path"}catch{vs=!1}return vs?pu:void 0}const fu="datad0g.com",U1="dd0g-gov.com",Qt="datadoghq.com",$1="datadoghq.eu",V1="ddog-gov.com",z1="pci.browser-intake-datadoghq.com",H1=["ddsource","ddtags"];function kn(e,t,n){const r=j1(e,t);return{build(s,i){const o=W1(e,t,n,s,i);return r(o)},tags:n,urlPrefix:r(""),trackType:t}}function j1(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const i=$i(r);return o=>`${i}?ddforward=${encodeURIComponent(`${n}?${o}`)}`}if(typeof r=="function")return i=>r({path:n,parameters:i});const s=hu(t,e);return i=>`https://${s}${n}?${i}`}function hu(e,t){const{site:n=Qt,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===Qt)return z1;if(r&&n===Qt)return`${r}.${Qt}`;if(n===U1)return`http-intake.logs.${n}`;const s=n.split("."),i=s.pop();return`browser-intake-${s.join("-")}.${i}`}function W1({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=${Se()}`];return o&&c.push(`dd-evp-encoding=${o}`),n==="rum"&&c.push(`batch_time=${me()}`),t&&c.reverse(),c.join("&")}const q1=200;function G1(e){const{env:t,service:n,version:r,datacenter:s}=e,i=[];return t&&i.push(_s("env",t)),n&&i.push(_s("service",n)),r&&i.push(_s("version",r)),s&&i.push(_s("datacenter",s)),i}function _s(e,t){const n=q1-e.length-1;(t.length>n||K1(t))&&q.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${Ri} ${cs}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function K1(e){return Y1()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function Y1(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function Z1(e){const t=e.site||Qt,n=G1(e),r=J1(e,n);return{replica:X1(e,n),site:t,...r}}function J1(e,t){return{logsEndpointBuilder:kn(e,"logs",t),rumEndpointBuilder:kn(e,"rum",t),profilingEndpointBuilder:kn(e,"profile",t),sessionReplayEndpointBuilder:kn(e,"replay",t)}}function X1(e,t){if(!e.replica)return;const n={...e,site:Qt,clientToken:e.replica.clientToken},r={logsEndpointBuilder:kn(n,"logs",t),rumEndpointBuilder:kn(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function Q1(e){return H1.every(t=>e.includes(t))}const _r={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Vi={ALL:"all",SAMPLED:"sampled"};function zi(e,t){return e!=null&&typeof e!="string"?(q.error(`${t} must be defined as a string`),!1):!0}function e0(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(q.error(`Site should be a valid Datadog site. ${Ri} ${cs}/getting_started/site/.`),!1):!0}function On(e,t){return e!==void 0&&!Kg(e)?(q.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function t0(e){var t,n,r,s,i,o;if(!e||!e.clientToken){q.error("Client Token is not configured, we will not send any data.");return}if(!(!e0(e.site)||!On(e.sessionSampleRate,"Session")||!On(e.telemetrySampleRate,"Telemetry")||!On(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!On(e.telemetryUsageSampleRate,"Telemetry Usage")||!zi(e.version,"Version")||!zi(e.env,"Env")||!zi(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ds(Ui,e.trackingConsent)){q.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Hl(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:L1(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:Ui.GRANTED,trackAnonymousUser:(o=e.trackAnonymousUser)!==null&&o!==void 0?o:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*gr,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Ie,batchMessagesLimit:50,messageBytesLimit:256*gr,...Z1(e)}}}function n0(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 en;(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"})(en||(en={}));const Hi=new Set;function r0(e){Array.isArray(e)&&s0(e.filter(t=>ds(en,t)))}function s0(e){e.forEach(t=>{Hi.add(t)})}function Ss(e){return Hi.has(e)}function i0(){return Hi}const Sr="?";function Ut(e){const t=[];let n=ji(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
517
|
-
`).forEach(s=>{const i=
|
|
518
|
-
at ${r}${s} @ ${n.url}${i}${o}`}),t}function gu(e){return`${e.name||"Error"}: ${e.message}`}function Fe(e,t,n,{computeHandlingStack:r}={}){let s=e[t];if(typeof s!="function")if(t in e&&t.startsWith("on"))s=G;else return{stop:G};let i=!1;const o=function(){if(i)return s.apply(this,arguments);const a=Array.from(arguments);let c;Yt(n,null,[{target:this,parameters:a,onPostCall:u=>{c=u},handlingStack:r?Cs("instrumented method"):void 0}]);const l=s.apply(this,a);return c&&Yt(c,null,[l]),l};return e[t]=o,{stop:()=>{i=!0,e[t]===o&&(e[t]=s)}}}function Cr(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:G};const s=G;let i=(a,c)=>{ge(()=>{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 w0=220*gr,v0="$",_0=3;function ce(e,t=w0){const n=An(Object.prototype),r=An(Array.prototype),s=[],i=new WeakMap,o=Wi(e,v0,void 0,s,i),a=JSON.stringify(o);let c=a?a.length:0;if(c>t){Gi(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=Wi(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){Gi(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=Wi(l.source[d],l.path,d,s,i);if(p!==void 0&&(c+=JSON.stringify(p).length+u+d.length+_0,u=1),c>t){Gi(t,"truncated",e);break}l.target[d]=p}}return n(),r(),o}function Wi(e,t,n,r,s){const i=E0(e);if(!i||typeof i!="object")return S0(i);const o=qi(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 S0(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 qi(e){try{if(e instanceof Event)return C0(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 C0(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?qi(e.currentTarget):null,target:e.target?qi(e.target):null}}function E0(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function Gi(e,t,n){q.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const bu="No stack, consider using an instance of Error";function yu({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:i,source:o,handling:a}){const c=$t(t),l=x0(e,c,i,t),u=I0(c,e)?Ln(e):bu,d=c?_u(t,o):void 0,p=e?e.name:void 0,h=wu(t),f=vu(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 x0(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${Rn(ce(r))}`}function I0(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function wu(e){return $t(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function vu(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function $t(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function _u(e,t){let n=e;const r=[];for(;$t(n==null?void 0:n.cause)&&r.length<10;){const s=Ut(n.cause);r.push({message:n.cause.message,source:t,type:s==null?void 0:s.name,stack:s&&Ln(s)}),n=n.cause}return r.length?r:void 0}const Nn={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function T0(e){const t=(s,i)=>{const o=yu({stackTrace:s,originalError:i,startClocks:ke(),nonErrorPrefix:"Uncaught",source:Nn.SOURCE,handling:"unhandled"});e.notify(o)},{stop:n}=R0(t),{stop:r}=A0(t);return{stop:()=>{n(),r()}}}function R0(e){return Fe(window,"onerror",({parameters:[t,n,r,s,i]})=>{let o;$t(i)?o=Ut(i):o=g0(t,n,r,s),e(o,i??t)})}function A0(e){return Fe(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=Ut(n);e(r,n)})}function k0(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return s1},enumerable:!1}),t}function O0(e,t,n){const r=e[t];r&&!r.q&&r.version&&q.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=>Hl(s,"onReady callback threw an error:")())}function Su(e,t){t.silentMultipleInit||q.error(`${e} is already initialized.`)}function ne(e,t,n,r,s){return Be(e,t,[n],r,s)}function Be(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=Dt(l,"addEventListener");n.forEach(p=>u.call(t,p,a,c));function d(){const p=Dt(l,"removeEventListener");n.forEach(h=>p.call(t,h,a,c))}return{stop:d}}const Er={intervention:"intervention",cspViolation:"csp_violation"};function P0(e,t){const n=[];t.includes(Er.cspViolation)&&n.push(N0(e));const r=t.filter(s=>s!==Er.cspViolation);return r.length&&n.push(L0(r)),Zl(...n)}function L0(e){return new X(t=>{if(!window.ReportingObserver)return;const n=$((s,i)=>s.forEach(o=>t.notify(M0(o)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function N0(e){return new X(t=>{const{stop:n}=ne(e,document,"securitypolicyviolation",r=>{t.notify(D0(r))});return n})}function M0(e){const{type:t,body:n}=e;return Cu({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:Eu(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function D0(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return Cu({type:e.effectiveDirective,message:`${Er.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:Eu(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Jl(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function Cu(e){return{startClocks:ke(),source:Nn.REPORT,handling:"unhandled",...e}}function Eu(e,t,n,r,s){return n?Ln({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:s??void 0}]}):void 0}function Ki(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function tn(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Es(e,t,n=F0()){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]=Es(s[i],t[i],n);return s}const r=tn(e)==="object"?e:{};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Es(r[s],t[s],n));return r}function Yi(e){return Es(void 0,e)}function at(...e){let t;for(const n of e)n!=null&&(t=Es(t,n));return t}function F0(){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 xu(){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 Iu(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const B0=500;function Tu(){const e=[];return{add:s=>{e.push(s)>B0&&e.splice(0,1)},remove:s=>{Iu(e,s)},drain:s=>{e.forEach(i=>i(s)),e.length=0}}}const nn={log:"log",configuration:"configuration",usage:"usage"},U0=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],$0=[V1];let Ru=Tu(),Mn=e=>{Ru.add(()=>Mn(e))};function V0(e,t){let n;const r=new X,s=new Set,i=!$0.includes(t.site)&&Mt(t.telemetrySampleRate),o={[nn.log]:i,[nn.configuration]:i&&Mt(t.telemetryConfigurationSampleRate),[nn.usage]:i&&Mt(t.telemetryUsageSampleRate)},a=z0();Mn=l=>{const u=Rn(l);if(o[l.type]&&s.size<t.maxTelemetryEventsPerPage&&!s.has(u)){const d=c(e,l,a);r.notify(d),Ki("telemetry",d),s.add(u)}},r1(Zi);function c(l,u,d){return at({type:"telemetry",date:me(),service:l,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:at(u,{runtime_env:d,connectivity:xu(),sdk_setup:"npm"}),experimental_features:Array.from(i0())},n!==void 0?n():{})}return{setContextProvider:l=>{n=l},observable:r,enabled:i}}function z0(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function H0(){Ru.drain()}function j0(e){return e.site===fu}function At(e,t){Pi(as.debug,e,t),Mn({type:nn.log,message:e,status:"debug",...t})}function Zi(e,t){Mn({type:nn.log,status:"error",...q0(e),...t})}function W0(e){Mn({type:nn.configuration,configuration:e})}function Oe(e){Mn({type:nn.usage,usage:e})}function q0(e){if($t(e)){const t=Ut(e);return{error:{kind:t.name,stack:Ln(G0(t))},message:t.message}}return{error:{stack:bu},message:`Uncaught ${Rn(e)}`}}function G0(e){return e.stack=e.stack.filter(t=>!t.url||U0.some(n=>t.url.startsWith(n))),e}const xr=1/0,K0=Me;let Ir=null;const xs=new Set;function Y0(){xs.forEach(e=>e())}function Dn({expireDelay:e,maxEntries:t}){let n=[];const r=[];Ir||(Ir=In(()=>Y0(),K0));const s=()=>{const h=Je()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const f=n.pop();f&&r.push(f.startTime)}};xs.add(s);function i(h,f){const m={value:h,startTime:f,endTime:xr,remove:()=>{Iu(n,m)},close:g=>{m.endTime=g}};return t&&n.length>=t&&n.pop(),n.unshift(m),m}function o(h=xr,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===xr&&f.close(h)}function c(h=xr,f=0){const m=xn(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===xr?"Infinity":f,value:m}))}function u(){return r}function d(){n=[]}function p(){xs.delete(s),xs.size===0&&Ir&&(ps(Ir),Ir=null)}return{add:i,find:o,closeActive:a,findAll:c,reset:d,stop:p,getAllEntries:l,getDeletedEntries:u}}const Z0=Me,J0=Zt;function X0(e,t,n,r){const s=new X,i=new X,o=N1(e.sessionStoreStrategyType,e,t,n),a=Dn({expireDelay:J0});o.renewObservable.subscribe(()=>{a.add(c(),Je()),s.notify()}),o.expireObservable.subscribe(()=>{i.notify(),a.closeActive(Je())}),o.expandOrRenewSession(),a.add(c(),ql().relative),r.observable.subscribe(()=>{r.isGranted()?o.expandOrRenewSession():o.expire()}),Q0(e,()=>{r.isGranted()&&o.expandOrRenewSession()}),eb(e,()=>o.expandSession()),tb(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 Q0(e,t){const{stop:n}=Be(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function eb(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=ne(e,document,"visibilitychange",n);In(n,Z0)}function tb(e,t){const{stop:n}=ne(e,window,"resume",t,{capture:!0})}function nb(e){return e>=500}function rb(e){try{return e.clone()}catch{return}}const sb=80*gr,ib=32,Au=3*Gl,ob=Me,ku=Ie;function Ou(e,t,n,r,s){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?Lu(e,t,n,{onSuccess:()=>Nu(0,t,n,r,s),onFailure:()=>{t.queuedPayloads.enqueue(e),Pu(t,n,r,s)}}):t.queuedPayloads.enqueue(e)}function Pu(e,t,n,r){e.transportStatus===2&&ge(()=>{const s=e.queuedPayloads.first();Lu(s,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=ku,Nu(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(ob,e.currentBackoffTime*2),Pu(e,t,n,r)}})},e.currentBackoffTime)}function Lu(e,t,n,{onSuccess:r,onFailure:s}){t.bandwidthMonitor.add(e),n(e,i=>{t.bandwidthMonitor.remove(e),ab(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 Nu(e,t,n,r,s){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(s({message:`Reached max ${r} events size queued for upload: ${Au/Gl}MiB`,source:Nn.AGENT,startClocks:ke()}),t.queueFullReported=!0);const i=t.queuedPayloads;for(t.queuedPayloads=Mu();i.size()>0;)Ou(i.dequeue(),t,n,r,s)}function ab(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||nb(e.status))}function cb(){return{transportStatus:0,currentBackoffTime:ku,bandwidthMonitor:lb(),queuedPayloads:Mu(),queueFullReported:!1}}function Mu(){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>=Au}}}function lb(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=sb&&this.ongoingRequestCount<ib},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function Du(e,t,n){const r=cb(),s=(i,o)=>pb(e,t,i,o);return{send:i=>{Ou(i,r,s,e.trackType,n)},sendOnExit:i=>{ub(e,t,i)}}}function ub(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){db(s)}Ji(e,n)}let Fu=!1;function db(e){Fu||(Fu=!0,Rt(e))}function pb(e,t,n,r){if(fb()&&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($(()=>Ji(e,n,r)))}else Ji(e,n,r)}function Ji(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 fb(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Fn(){const e=hb();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 Bu(e){const t=Fn();return!!t&&t.getCapabilities().includes(e)}function rn(e){var t;e===void 0&&(e=(t=gt().location)===null||t===void 0?void 0:t.hostname);const n=Fn();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function hb(){return gt().DatadogEventBridge}const Bn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function mb(e){return new X(t=>{const{stop:n}=Be(e,window,["visibilitychange","freeze"],s=>{s.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Bn.HIDDEN}):s.type==="freeze"&&t.notify({reason:Bn.FROZEN})},{capture:!0}),r=ne(e,window,"beforeunload",()=>{t.notify({reason:Bn.UNLOADING})}).stop;return()=>{n(),r()}})}function Uu(e){return eu(Bn).includes(e)}function gb({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:`
|
|
519
|
-
${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=
|
|
520
|
-
`);s={};const h=
|
|
521
|
-
`);g&&f({data:g,bytesCount:
|
|
522
|
-
${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.unsubscribe}}function $u(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 bb({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 X(()=>()=>{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=ge(()=>{u("duration_limit")},n))}function h(){De(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 yb(e,t,n,r,s,i,o=gb){const a=l(e,t),c=n&&l(e,n);function l(u,{endpoint:d,encoder:p}){return o({encoder:p,request:Du(d,u.batchBytesLimit,r),flushController:bb({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 wb(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const s=Kl(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 vb{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 Xi(e,t,n){let r=0,s=!1;return{isLimitReached(){if(r===0&&ge(()=>{r=0},Me),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:Nn.AGENT,startClocks:ke()})}finally{s=!1}}return!0}}}function Qi(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:G}):ne(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function _b(e,t){return new Promise(n=>{Qi(e,t,n)})}let eo;const to=new WeakMap;function Sb(e){return eo||(eo=Cb(e)),eo}function Cb(e){return new X(t=>{const{stop:n}=Fe(XMLHttpRequest.prototype,"open",Eb),{stop:r}=Fe(XMLHttpRequest.prototype,"send",i=>{xb(i,e,t)},{computeHandlingStack:!0}),{stop:s}=Fe(XMLHttpRequest.prototype,"abort",Ib);return()=>{n(),r(),s()}})}function Eb({target:e,parameters:[t,n]}){to.set(e,{state:"open",method:String(t).toUpperCase(),url:$i(String(n))})}function xb({target:e,handlingStack:t},n,r){const s=to.get(e);if(!s)return;const i=s;i.state="start",i.startClocks=ke(),i.isAborted=!1,i.xhr=e,i.handlingStack=t;let o=!1;const{stop:a}=Fe(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),a(),o)return;o=!0;const u=s;u.state="complete",u.duration=_e(i.startClocks.timeStamp,me()),u.status=e.status,r.notify(br(u))},{stop:l}=ne(n,e,"loadend",c);r.notify(i)}function Ib({target:e}){const t=to.get(e);t&&(t.isAborted=!0)}let no;function Vu(){return no||(no=Tb()),no}function Tb(){return new X(e=>{if(!window.fetch)return;const{stop:t}=Fe(window,"fetch",n=>Rb(n,e),{computeHandlingStack:!0});return t})}function Rb({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:$i(String(s)),l=ke(),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=>Ab(r,d,u))}function Ab(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 zu(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback($(e),t);return()=>window.cancelIdleCallback(n)}return Ob(e)}const kb=50;function Ob(e){const t=Ze(),n=ge(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,kb-(Ze()-t))})},0);return()=>De(n)}const Pb=Ie,Lb=30;function Nb(){const e=[];function t(r){let s;if(r.didTimeout){const i=performance.now();s=()=>Lb-(performance.now()-i)}else s=r.timeRemaining.bind(r);for(;s()>0&&e.length;)e.shift()();e.length&&n()}function n(){zu(t,{timeout:Pb})}return{push(r){e.push(r)===1&&n()}}}let ro={};function Mb(e){const t=e.map(n=>(ro[n]||(ro[n]=Db(n)),ro[n]));return Zl(...t)}function Db(e){return new X(t=>{const n=Tt[e];return Tt[e]=(...r)=>{n.apply(console,r);const s=Cs("console error");Yt(()=>{t.notify(Fb(r,e,s))})},()=>{Tt[e]=n}})}function Fb(e,t,n){const r=e.map(i=>Bb(i)).join(" ");let s;if(t===as.error){const i=e.find($t);s={stack:i?Ln(Ut(i)):void 0,fingerprint:wu(i),causes:i?_u(i,"console"):void 0,startClocks:ke(),message:r,source:Nn.CONSOLE,handling:"handled",handlingStack:n,context:vu(i),originalError:i}}return{api:t,message:r,error:s,handlingStack:n}}function Bb(e){return typeof e=="string"?ce(e):$t(e)?gu(Ut(e)):Rn(ce(e),void 0,2)}function Ub(e){const t=tn(e)==="object";return t||q.error("Unsupported context:",e),t}function so(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)&&q.warn(`The property ${s} of ${n} is required; context will not be sent to the intake.`);return r}function Is(e="",{propertiesConfig:t={}}={}){let n={};const r=new X,s={getContext:()=>Yi(n),setContext:i=>{Ub(i)?n=ce(so(i,t,e)):s.clearContext(),r.notify()},setContextProperty:(i,o)=>{n=ce(so({...n,[i]:o},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],so(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return s}const $b="_dd_c",Vb=[];function io(e,t,n,r){const s=zb(n,r);Vb.push(ne(e,window,"storage",({key:l})=>{s===l&&o()})),t.changeObservable.subscribe(a);const i=at(c(),t.getContext());Kt(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 zb(e,t){return`${$b}_${e}_${t}`}const be={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},Pe={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function Hb(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(G),t(void 0,void 0,void 0)}}const jb="datadog-synthetics-public-id",Wb="datadog-synthetics-result-id",qb="datadog-synthetics-injects-rum";function Hu(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Bt(qb))}function Gb(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Bt(jb);return typeof e=="string"?e:void 0}function Kb(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Bt(Wb);return typeof e=="string"?e:void 0}function oo(e){const t=tn(e);return t==="string"||t==="function"||e instanceof RegExp}function ju(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){q.error(s)}return!1})}function Yb(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function Zb(e,t,n){function r(i){return!t.wasInPageStateDuringPeriod("frozen",i.startClocks.relative,i.duration)}function s(i){r(i)&&e.notify(12,Xb(i))}return{addDurationVital:s,startDurationVital:(i,o={})=>Wu(n,i,o),stopDurationVital:(i,o={})=>{qu(s,n,i,o)}}}function Wu({vitalsByName:e,vitalsByReference:t},n,r={}){const s={name:n,startClocks:ke(),context:r.context,description:r.description},i={__dd_vital_reference:!0};return e.set(n,s),t.set(i,s),i}function qu(e,{vitalsByName:t,vitalsByReference:n},r,s={}){const i=typeof r=="string"?t.get(r):n.get(r);i&&(e(Jb(i,i.startClocks,s,ke())),typeof r=="string"?t.delete(r):n.delete(r))}function Jb(e,t,n,r){var s;return{name:e.name,type:"duration",startClocks:t,duration:_e(t.timeStamp,r.timeStamp),context:at(e.context,n.context),description:(s=n.description)!==null&&s!==void 0?s:e.description}}function Xb(e,t){const n={date:e.startClocks.timeStamp,vital:{id:Se(),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 Gu(e,t,n){if(e)for(const r of e){const s=r[t];s&&s(n)}}function Qb(){return Yu(64)}function Ku(){return Yu(63)}function Yu(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 Un(e){return e.toString(16).padStart(16,"0")}let Ts;function ey(e,t){if(t===100)return!0;if(t===0)return!1;if(Ts&&e===Ts.sessionId)return Ts.decision;let n;return window.BigInt?n=ty(BigInt(`0x${e.split("-")[4]}`),t):n=Mt(t),Ts={sessionId:e,decision:n},n}function ty(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),s=e*n%r;return Number(s)<=t/100*Number(r)}function ny(e){const t=e;return tn(t)==="object"&&oo(t.match)&&Array.isArray(t.propagatorTypes)}function ry(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function sy(e,t,n){return{clearTracingIfNeeded:ry,traceFetch:r=>Zu(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=br(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(Di(s))}}),traceXhr:(r,s)=>Zu(e,r,t,n,i=>{Object.keys(i).forEach(o=>{s.setRequestHeader(o,i[o])})})}}function Zu(e,t,n,r,s){const i=n.findTrackedSession();if(!i)return;const o=e.allowedTracingUrls.find(l=>ju([l.match],t.url,!0));if(!o)return;const a=ey(i.id,e.traceSampleRate);(a||e.traceContextInjection===Vi.ALL)&&(t.traceSampled=a,t.traceId=Qb(),t.spanId=Ku(),s(iy(t.traceId,t.spanId,t.traceSampled,o.propagatorTypes,r,e)))}function iy(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${Un(e)}-${Un(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(o,{b3:`${Un(e)}-${Un(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(o,{"X-B3-TraceId":Un(e),"X-B3-SpanId":Un(t),"X-B3-Sampled":n?"1":"0"});break}}}),Ss(en.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 Ju=["tracecontext","datadog"];function oy(e){var t,n,r,s,i,o,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&q.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){q.error("Application ID is not configured, no RUM data will be collected.");return}if(!On(e.sessionReplaySampleRate,"Session Replay")||!On(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){q.error("Excluded Activity Urls should be an array");return}const c=ay(e);if(!c)return;const l=t0(e);if(!l)return;const u=Ss(en.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:hr(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:ds(_r,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:_r.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ds(Vi,e.traceContextInjection)?e.traceContextInjection:Vi.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:u&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...l}}function ay(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){q.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){q.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{oo(n)?t.push({match:n,propagatorTypes:Ju}):ny(n)?t.push(n):q.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function cy(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{oo(n)?Ju.forEach(r=>t.add(r)):tn(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function ly(e){var t;const n=n0(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:cy(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 uy="v1";function dy(e,t){fy(e,n=>{t(py(e,n))})}function py(e,t){return{...e,...t}}function fy(e,t){const n=new XMLHttpRequest;ne(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Xu()}),ne(e,n,"error",function(){Xu()}),n.open("GET",hy(e)),n.send()}function hy(e){return`https://sdk-configuration.${hu("rum",e)}/${uy}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Xu(){q.error("Error fetching the remote configuration.")}function my(e){const t=Qu();return e.storeContextsAcrossPages&&io(e,t,"rum",2),t}function Qu(){return Is("global context")}function gy(e){const t=ed();return e.storeContextsAcrossPages&&io(e,t,"rum",1),t}function ed(){return Is("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function by(e){const t=td();return e.storeContextsAcrossPages&&io(e,t,"rum",4),t}function td(){return Is("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function yy({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,s){const i=Tu(),o=Qu();ao(o,be.globalContext,i);const a=ed();ao(a,be.userContext,i);const c=td();ao(c,be.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=rn();if(C&&(w=wy(w)),d=w,W0(ly(w)),p){Su("DD_RUM",w);return}const P=oy(w);if(P){if(!C&&!P.sessionStoreStrategyType){q.warn("No storage available for session. We will not send any data.");return}P.compressIntakeRequests&&!C&&t&&(u=t(P,"Datadog RUM",G),!u)||(p=P,Vu().subscribe(G),n.tryToInit(P.trackingConsent),m())}}const y=w=>{i.add(C=>C.addDurationVital(w))};return{init(w,C){if(!w){q.error("Missing configuration");return}r0(w.enableExperimentalFeatures),d=w,!(e&&Hu())&&(Gu(w.plugins,"onInit",{initConfiguration:w,publicApi:C}),w.remoteConfigurationId?dy(w,g):g(w))},get initConfiguration(){return d},getInternalContext:G,stopSession:G,addTiming(w,C=me()){i.add(P=>P.addTiming(w,C))},startView(w,C=ke()){const P=R=>{R.startView(w,C)};i.add(P),l||(l={options:w,callback:P},m())},setViewName(w){i.add(C=>C.setViewName(w))},setViewContext(w){i.add(C=>C.setViewContext(w))},setViewContextProperty(w,C){i.add(P=>P.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(P=>P.addFeatureFlagEvaluation(w,C))},startDurationVital(w,C){return Wu(r,w,C)},stopDurationVital(w,C){qu(y,r,w,C)},addDurationVital:y}}function wy(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=Fn())===null||n===void 0?void 0:n.getPrivacyLevel()}}function ao(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(s=>s[t].setContext(r))})}function vy(e,t,n,r={}){const s=M1(),i=Yb();let o=yy(r,s,i,(u,d,p)=>{const h=e(u,t,n,p,d&&r.createDeflateEncoder?f=>r.createDeflateEncoder(u,d,f):wb,s,i);return t.onRumStart(h.lifeCycle,u,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,u,h.session,h.viewHistory),o=_y(o,h),Gu(u.plugins,"onRumStart",{strategy:o}),h});const a=$(u=>{const d=typeof u=="object"?u:{name:u};o.startView(d),Oe({feature:"start-view"})});function c(u,d,p){return $((...h)=>(Oe({feature:p}),o[u][d](...h)))}const l=k0({init:$(u=>{o.init(u,l)}),setTrackingConsent:$(u=>{s.update(u),Oe({feature:"set-tracking-consent",tracking_consent:u})}),setViewName:$(u=>{o.setViewName(u),Oe({feature:"set-view-name"})}),setViewContext:$(u=>{o.setViewContext(u),Oe({feature:"set-view-context"})}),setViewContextProperty:$((u,d)=>{o.setViewContextProperty(u,d),Oe({feature:"set-view-context-property"})}),getViewContext:$(()=>(Oe({feature:"set-view-context-property"}),o.getViewContext())),getInternalContext:$(u=>o.getInternalContext(u)),getInitConfiguration:$(()=>Yi(o.initConfiguration)),addAction:(u,d)=>{const p=Cs("action");Yt(()=>{o.addAction({name:ce(u),context:ce(d),startClocks:ke(),type:"custom",handlingStack:p}),Oe({feature:"add-action"})})},addError:(u,d)=>{const p=Cs("error");Yt(()=>{o.addError({error:u,handlingStack:p,context:ce(d),startClocks:ke()}),Oe({feature:"add-error"})})},addTiming:$((u,d)=>{o.addTiming(ce(u),d)}),setGlobalContext:c(be.globalContext,Pe.setContext,"set-global-context"),getGlobalContext:c(be.globalContext,Pe.getContext,"get-global-context"),setGlobalContextProperty:c(be.globalContext,Pe.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c(be.globalContext,Pe.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c(be.globalContext,Pe.clearContext,"clear-global-context"),setUser:c(be.userContext,Pe.setContext,"set-user"),getUser:c(be.userContext,Pe.getContext,"get-user"),setUserProperty:c(be.userContext,Pe.setContextProperty,"set-user-property"),removeUserProperty:c(be.userContext,Pe.removeContextProperty,"remove-user-property"),clearUser:c(be.userContext,Pe.clearContext,"clear-user"),setAccount:c(be.accountContext,Pe.setContext,"set-account"),getAccount:c(be.accountContext,Pe.getContext,"get-account"),setAccountProperty:c(be.accountContext,Pe.setContextProperty,"set-account-property"),removeAccountProperty:c(be.accountContext,Pe.removeContextProperty,"remove-account-property"),clearAccount:c(be.accountContext,Pe.clearContext,"clear-account"),startView:a,stopSession:$(()=>{o.stopSession(),Oe({feature:"stop-session"})}),addFeatureFlagEvaluation:$((u,d)=>{o.addFeatureFlagEvaluation(ce(u),ce(d)),Oe({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:$(()=>t.getSessionReplayLink()),startSessionReplayRecording:$(u=>{t.start(u),Oe({feature:"start-session-replay-recording",force:u&&u.force})}),stopSessionReplayRecording:$(()=>t.stop()),addDurationVital:$((u,d)=>{Oe({feature:"add-duration-vital"}),o.addDurationVital({name:ce(u),type:"duration",startClocks:Yg(d.startTime),duration:d.duration,context:ce(d&&d.context),description:ce(d&&d.description)})}),startDurationVital:$((u,d)=>(Oe({feature:"start-duration-vital"}),o.startDurationVital(ce(u),{context:ce(d&&d.context),description:ce(d&&d.description)}))),stopDurationVital:$((u,d)=>{Oe({feature:"stop-duration-vital"}),o.stopDurationVital(typeof u=="string"?ce(u):u,{context:ce(d&&d.context),description:ce(d&&d.description)})})});return l}function _y(e,t){return{init:n=>{Su("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function Sy(){const e=nd();return new X(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 nd(){let e;const t=window;if(t.Zone&&(e=Dt(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(G),r=Dt(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function Cy(){const e=new X,{stop:t}=Fe(window,"open",()=>e.notify());return{observable:e,stop:t}}function Ey(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 xy=vb,Iy=Zt;function Ty(e){const t=Dn({expireDelay:Iy});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 rd="initial_document",Ry=[["document",e=>rd===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 Ay(e){const t=e.name;if(!D1(t))return At(`Failed to construct URL for "${e.name}"`),"other";const n=F1(t);for(const[r,s]of Ry)if(s(e.initiatorType,n))return r;return"other"}function sd(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function ky(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function id(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?_e(n,r):t}function Oy(e){if(!ad(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:sn(t,p,h),first_byte:sn(t,d,p)};return 0<r&&r<n&&(f.worker=sn(t,r,n)),n<u&&(f.connect=sn(t,c,u),c<=l&&l<=u&&(f.ssl=sn(t,l,u))),n<a&&(f.dns=sn(t,o,a)),t<i&&(f.redirect=sn(t,s,i)),f}function od(e){return e.duration>=0}function ad(e){const t=sd(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=Py(e)?sd(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function Py(e){return e.redirectEnd>e.startTime}function sn(e,t,n){if(e<=t&&t<=n)return{duration:B(_e(t,n)),start:B(_e(e,t))}}function cd(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function ld(e){return e.deliveryType===""?"other":e.deliveryType}function Ly(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 co(e){return e&&!Q1(e)}const Ny=/data:(.+)?(;base64)?,/g,ud=24e3;function dd(e){return e.length<=ud?!1:e.substring(0,5)==="data:"?(e=e.substring(0,ud),!0):!1}function pd(e){return`${e.match(Ny)[0]}[...]`}let fd=1;function My(e,t,n,r){const s=sy(t,n,r);Dy(e,t,s),Fy(e,s)}function Dy(e,t,n){const r=Sb(t).subscribe(s=>{const i=s;if(co(i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=hd(),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 Fy(e,t){const n=Vu().subscribe(r=>{const s=r;if(co(s.url))switch(s.state){case"start":t.traceFetch(s),s.requestIndex=hd(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":By(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 hd(){const e=fd;return fd+=1,e}function By(e,t){const n=e.response&&rb(e.response);!n||!n.body?t(_e(e.startClocks.timeStamp,me())):Hb(n.body,()=>{t(_e(e.startClocks.timeStamp,me()))},{bytesLimit:Number.POSITIVE_INFINITY})}function md(e){return hr(e)&&e<0?void 0:e}function gd({lifeCycle:e,isChildEvent:t,onChange:n=G}){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 Uy(e,t){const n=Ze();let r=!1;const{stop:s}=Be(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:Je(),processingEnd:Je(),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){Be(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<Ze()-n&&t(a)}}}var Z;(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"})(Z||(Z={}));function bt(e,t){return new X(n=>{if(!window.PerformanceObserver)return;const r=c=>{const l=zy(c);l.length>0&&n.notify(l)};let s,i=!0;const o=new PerformanceObserver($(c=>{i?s=ge(()=>r(c.getEntries())):r(c.getEntries())}));try{o.observe(t)}catch{if([Z.RESOURCE,Z.NAVIGATION,Z.LONG_TASK,Z.PAINT].includes(t.type)){t.buffered&&(s=ge(()=>r(performance.getEntriesByType(t.type))));try{o.observe({entryTypes:[t.type]})}catch{return}}}i=!1,$y(e);let a;return!on(Z.FIRST_INPUT)&&t.type===Z.FIRST_INPUT&&({stop:a}=Uy(e,c=>{r([c])})),()=>{o.disconnect(),a&&a(),De(s)}})}let Tr;function $y(e){return!Tr&&Vy()&&"addEventListener"in performance&&(Tr=ne(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Tr==null||Tr.stop()}}function Vy(){return window.performance!==void 0&&"getEntries"in performance}function on(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function zy(e){return e.filter(t=>!Hy(t))}function Hy(e){return e.entryType===Z.RESOURCE&&(!co(e.name)||!od(e))}const bd=100,jy=100;function lo(e,t,n,r,s,i){const o=qy(e,t,n,r);return Wy(o,s,i)}function Wy(e,t,n){let r,s=!1;const i=ge($(()=>l({hadActivity:!1})),bd),o=n!==void 0?ge($(()=>l({hadActivity:!0,end:me()})),n):void 0,a=e.subscribe(({isBusy:u})=>{De(i),De(r);const d=me();u||(r=ge($(()=>l({hadActivity:!0,end:d})),jy))}),c=()=>{s=!0,De(i),De(r),De(o),a.unsubscribe()};function l(u){s||(c(),t(u))}return{stop:c}}function qy(e,t,n,r){return new X(s=>{const i=[];let o,a=0;return i.push(t.subscribe(c),n.subscribe(c),bt(r,{type:Z.RESOURCE}).subscribe(l=>{l.some(u=>!uo(r,u.name))&&c()}),e.subscribe(7,l=>{uo(r,l.url)||(o===void 0&&(o=l.requestIndex),a+=1,c())}),e.subscribe(8,l=>{uo(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 uo(e,t){return ju(e.excludedActivityUrls,t)}function yd(e){return e.nodeType===Node.TEXT_NODE}function Gy(e){return e.nodeType===Node.COMMENT_NODE}function $n(e){return e.nodeType===Node.ELEMENT_NODE}function Rs(e){return $n(e)&&!!e.shadowRoot}function po(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&$n(t.host)}function Ky(e){return e.childNodes.length>0||Rs(e)}function wd(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;Rs(e)&&t(e.shadowRoot)}function As(e){return po(e)?e.host:e.parentNode}const D={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:_r.ALLOW,MASK:_r.MASK,MASK_USER_INPUT:_r.MASK_USER_INPUT},fo="data-dd-privacy",Yy="hidden",Zy="dd-privacy-",Vt="***",vd="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Jy={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Xy="x";function yt(e,t,n){if(n&&n.has(e))return n.get(e);const r=As(e),s=r?yt(r,t,n):t,i=Sd(e),o=_d(i,s);return n&&n.set(e,o),o}function _d(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 Sd(e){if($n(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(Vn(D.HIDDEN)))return D.HIDDEN;if(e.matches(Vn(D.MASK)))return D.MASK;if(e.matches(Vn(D.MASK_USER_INPUT)))return D.MASK_USER_INPUT;if(e.matches(Vn(D.ALLOW)))return D.ALLOW;if(e2(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 yd(e)?Cd(e.parentNode):Cd(e);default:return!1}}function Cd(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!!Jy[t.tagName]}const Qy=e=>e.replace(/\S/g,Xy);function Ed(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=Vt;else if(o===D.HIDDEN)i=Vt;else if(ks(e,o))if(s==="DATALIST"||s==="SELECT"||s==="OPTGROUP"){if(!i.trim())return}else s==="OPTION"?i=Vt:i=Qy(i);return i}function e2(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 Vn(e){return`[${fo}="${e}"], .${Zy}${e}`}const ho="data-dd-action-name",t2="Masked Element";function n2(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const s=xd(e,ho)||n&&xd(e,n);return s?{name:s,nameSource:"custom_attribute"}:r===D.MASK?{name:t2,nameSource:"mask_placeholder"}:Id(e,n,r2,t)||Id(e,n,s2,t)||{name:"",nameSource:"blank"}}function xd(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return Rd(Td(r.trim()))}const r2=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Os(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 Os(e,t,n)},e=>Rr(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(s=>o2(e,s)).filter(s=>!!s).map(s=>Ad(s,t,n)).join(" "),nameSource:"text_content"}},e=>Rr(e,"alt"),e=>Rr(e,"name"),e=>Rr(e,"title"),e=>Rr(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Os(e.options[0],t)}],s2=[(e,t,n)=>Os(e,t,n)],i2=10;function Id(e,t,n,r){let s=e,i=0;for(;i<=i2&&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:Rd(Td(u)),nameSource:l}}}if(s.nodeName==="FORM")break;s=s.parentElement,i+=1}}function Td(e){return e.replace(/\s+/g," ")}function Rd(e){return e.length>100?`${Jl(e,100)} [...]`:e}function o2(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Rr(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Os(e,t,n){return{name:Ad(e,t,n)||"",nameSource:"text_content"}}function Ad(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(`[${ho}]`),t&&s(`[${t}]`),n&&s(`${Vn(D.HIDDEN)}, ${Vn(D.MASK)}`),r}return e.textContent}}const kd=[ho,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],a2=[Pd,l2],c2=[Pd,u2,d2];function Ar(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const s=Ld(r,a2,f2,t,n);if(s)return s;n=Ld(r,c2,h2,t,n)||Ps(p2(r),n),r=r.parentElement}return n}function Od(e){return/[0-9]/.test(e)}function l2(e){if(e.id&&!Od(e.id))return`#${CSS.escape(e.id)}`}function u2(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!Od(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function d2(e){return CSS.escape(e.tagName)}function Pd(e,t){if(t){const r=n(t);if(r)return r}for(const r of kd){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 p2(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 Ld(e,t,n,r,s){for(const i of t){const o=i(e,r);if(o&&n(e,o,s))return Ps(o,s)}}function f2(e,t,n){return e.ownerDocument.querySelectorAll(Ps(t,n)).length===1}function h2(e,t,n){let r;if(n===void 0)r=o=>o.matches(t);else{const o=Ps(`${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 Ps(e,t){return t?`${e}>${t}`:e}const Nd=Ie,m2=100;function g2(e,t){const n=[];let r=0,s;i(e);function i(c){c.stopObservable.subscribe(o),n.push(c),De(s),s=ge(a,Nd)}function o(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){De(s),r===0&&(r=1,o())}return{tryAppend:c=>r!==0?!1:n.length>0&&!b2(n[n.length-1].event,c.event)?(a(),!1):(i(c),!0),stop:()=>{a()}}}function b2(e,t){return e.target===t.target&&y2(e,t)<=m2&&e.timeStamp-t.timeStamp<=Nd}function y2(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function w2(e,{onPointerDown:t,onPointerUp:n}){let r,s={selection:!1,input:!1,scroll:!1},i;const o=[ne(e,window,"pointerdown",a=>{Dd(a)&&(r=Md(),s={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),ne(e,window,"selectionchange",()=>{(!r||!Md())&&(s.selection=!0)},{capture:!0}),ne(e,window,"scroll",()=>{s.scroll=!0},{capture:!0,passive:!0}),ne(e,window,"pointerup",a=>{if(Dd(a)&&i){const c=s;n(i,a,()=>c),i=void 0}},{capture:!0}),ne(e,window,"input",()=>{s.input=!0},{capture:!0})];return{stop:()=>{o.forEach(a=>a.stop())}}}function Md(){const e=window.getSelection();return!e||e.isCollapsed}function Dd(e){return e.target instanceof Element&&e.isPrimary!==!1}const Fd=3;function v2(e,t){if(_2(e))return t.addFrustration("rage_click"),e.some(Bd)&&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"),Bd(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function _2(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(Fd-1);t+=1)if(e[t+Fd-1].event.timeStamp-e[t].event.timeStamp<=Ie)return!0;return!1}const S2='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 Bd(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(S2)}const Ud=10*Ie,kr=new Map;function C2(e){const t=kr.get(e);return kr.delete(e),t}function $d(e,t){kr.set(e,t),kr.forEach((n,r)=>{_e(r,Je())>Ud&&kr.delete(r)})}const E2=5*Me;function x2(e,t,n,r){const s=Dn({expireDelay:E2}),i=new X;let o;e.subscribe(10,()=>{s.reset()}),e.subscribe(5,u),e.subscribe(11,d=>{d.reason===Bn.UNLOADING&&u()});const{stop:a}=w2(r,{onPointerDown:d=>I2(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:p},h,f)=>{T2(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=g2(d,h=>{A2(h,p)})}}function u(){o&&o.stop()}}function I2(e,t,n,r,s){const i=e.enablePrivacyForActionName?yt(r.target,e.defaultPrivacyLevel):D.ALLOW;if(i===D.HIDDEN)return;const o=R2(r,i,e);let a=!1;return lo(t,n,s,e,c=>{a=c.hadActivity},bd),{clickActionBase:o,hadActivityOnPointerDown:()=>a}}function T2(e,t,n,r,s,i,o,a,c,l,u){var d;const p=Vd(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&&$d(c.timeStamp,h);const{stop:f}=lo(t,n,r,e,y=>{y.hadActivity&&y.end<p.startClocks.timeStamp?p.discard():y.hadActivity?p.stop(y.end):u()?p.stop(p.startClocks.timeStamp):p.stop()},Ud),m=t.subscribe(5,({endClocks:y})=>{p.stop(y.timeStamp)}),g=i.subscribe(()=>{p.stop()});p.stopObservable.subscribe(()=>{m.unsubscribe(),f(),g.unsubscribe()})}function R2(e,t,n){const r=e.target.getBoundingClientRect(),s=Ar(e.target,n.actionNameAttribute);s&&$d(e.timeStamp,s);const i=n2(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 Vd(e,t,n,r,s){const i=Se(),o=ke(),a=t.add(i,o.relative),c=gd({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 X;function h(f){l===0&&(u=f,l=1,u?a.close(Ai(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:()=>Vd(e,t,n,r,s),validate:f=>{if(h(),l!==1)return;const{resourceCount:m,errorCount:g,longTaskCount:y}=c.eventCounts,x={duration:u&&_e(o.timeStamp,u),startClocks:o,id:i,frustrationTypes:d,counts:{resourceCount:m,errorCount:g,longTaskCount:y},events:f??[s],event:s,...r};e.notify(0,x),l=2},discard:()=>{h(),l=2}}}function A2(e,t){const{isRage:n}=v2(e,t);n?(e.forEach(r=>r.discard()),t.stop(me()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function k2(e,t,n,r,s){e.subscribe(0,a=>e.notify(12,zd(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:G},o=G;return s.trackUserInteractions&&({actionContexts:i,stop:o}=x2(e,n,r,s)),{addAction:a=>{e.notify(12,zd(a))},actionContexts:i,stop:o}}function zd(e){const t=Ls(e)?{action:{id:e.id,loading_time:md(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:Se(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Ls(e)?e.duration:void 0,s=Ls(e)?void 0:e.context,i=Ls(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:s,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:i}}function Ls(e){return e.type!=="custom"}function O2(e){const t=Mb([as.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function P2(e,t){const n=P0(e,[Er.cspViolation,Er.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function L2(e,t){const n=new X;return O2(n),T0(n),P2(t,n),n.subscribe(r=>e.notify(14,{error:r})),N2(e)}function N2(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=at(t.context,n),e.notify(12,{customerContext:n,...M2(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:s,context:i})=>{const o=$t(t)?Ut(t):void 0,a=yu({stackTrace:o,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:"Provided",source:Nn.CUSTOM,handling:"handled"});e.notify(14,{customerContext:i,error:a})}}}function M2(e){const t={date:e.startClocks.timeStamp,error:{id:Se(),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 Hd=new WeakSet;function D2(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=>!Hd.has(r)).filter(r=>od(r)&&ad(r)).filter(r=>F2(r,e.startClocks.relative,jd({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Hd.add(n[0]),n[0].toJSON()}function jd(e){return xn(e.startTime,e.duration)}function F2(e,t,n){return e.startTime>=t-1&&jd(e)<=xn(n,1)}const B2=2*Me;function U2(e){const t=$2(e)||V2(e);if(!(!t||t.traceTime<=Ze()-B2))return t.traceId}function $2(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return Wd(t&&t.content,n&&n.content)}function V2(e){const t=z2(e);if(t)return Wd(yr(t,"trace-id"),yr(t,"trace-time"))}function Wd(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function z2(e){for(let t=0;t<e.childNodes.length;t+=1){const n=qd(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=qd(n);if(r)return r;if(!yd(n))break}}function qd(e){if(e&&Gy(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Gd(){if(on(Z.NAVIGATION)){const n=performance.getEntriesByType(Z.NAVIGATION)[0];if(n)return n}const e=H2(),t={entryType:Z.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 H2(){const e={},t=performance.timing;for(const n in t)if(hr(t[n])){const r=n,s=t[r];e[r]=s===0?0:Ai(s)}return e}function j2(e,t,n=Gd){Qi(e,"interactive",()=>{const r=n(),s=Object.assign(r.toJSON(),{entryType:Z.RESOURCE,initiatorType:rd,duration:r.responseEnd,traceId:U2(document),toJSON:()=>({...s,toJSON:void 0})});t(s)})}function W2(e,t,n,r=Nb(),s=j2){e.subscribe(8,a=>{o(()=>q2(a,t,n))});const i=bt(t,{type:Z.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)ky(c)||o(()=>Kd(c,t))});s(t,a=>{o(()=>Kd(a,t))});function o(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{i.unsubscribe()}}}function q2(e,t,n){const r=D2(e),s=r?us(r.startTime):e.startClocks,i=G2(e,t);if(!t.trackResources&&!i)return;const o=e.type==="xhr"?"xhr":"fetch",a=r?Yd(r):void 0,c=r?id(r):Y2(n,s,e.duration),l=at({date:s.timeStamp,resource:{id:Se(),type:o,duration:B(c),method:e.method,status_code:e.status,protocol:r&&cd(r),url:dd(e.url)?pd(e.url):e.url,delivery_type:r&&ld(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 Kd(e,t){const n=us(e.startTime),r=K2(e,t);if(!t.trackResources&&!r)return;const s=Ay(e),i=Yd(e),o=id(e),a=at({date:n.timeStamp,resource:{id:Se(),type:s,duration:B(o),url:e.name,status_code:Z2(e.responseStatus),protocol:cd(e),delivery_type:ld(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,i);return{startTime:n.relative,duration:o,rawRumEvent:a,domainContext:{performanceEntry:e}}}function Yd(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...Ly(e),...Oy(e)}}}function G2(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 K2(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Ku().toString(),rule_psr:t.rulePsr}}}function Y2(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function Z2(e){return e===0?void 0:e}function J2(e,t,n){const{stop:r,eventCounts:s}=gd({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:n});return{stop:r,eventCounts:s}}const X2=10*Me;function Q2(e,t,n){return{stop:bt(e,{type:Z.PAINT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.name==="first-contentful-paint"&&o.startTime<t.timeStamp&&o.startTime<X2);i&&n(i.startTime)}).unsubscribe}}function ew(e,t,n){const r=bt(e,{type:Z.FIRST_INPUT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.startTime<t.timeStamp);if(i){const o=_e(i.startTime,i.processingStart);let a;i.target&&$n(i.target)&&(a=Ar(i.target,e.actionNameAttribute)),n({delay:o>=0?o:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function tw(e,t,n=Gd){return sw(e,()=>{const r=n();rw(r)||t(nw(r))})}function nw(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Je()?e.responseStart:void 0}}function rw(e){return e.loadEventEnd<=0}function sw(e,t){let n;const{stop:r}=Qi(e,"complete",()=>{n=ge(()=>t())});return{stop:()=>{r(),De(n)}}}const iw=10*Me;function ow(e,t,n,r){let s=1/0;const{stop:i}=Be(e,n,["pointerdown","keydown"],c=>{s=c.timeStamp},{capture:!0,once:!0});let o=0;const a=bt(e,{type:Z.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const l=d1(c,u=>u.entryType===Z.LARGEST_CONTENTFUL_PAINT&&u.startTime<s&&u.startTime<t.timeStamp&&u.startTime<iw&&u.size>o);if(l){let u;l.element&&(u=Ar(l.element,e.actionNameAttribute)),r({value:l.startTime,targetSelector:u,resourceUrl:aw(l)}),o=l.size}});return{stop:()=>{i(),a.unsubscribe()}}}function aw(e){return e.url===""?void 0:e.url}function Zd(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:G};if(on(Z.VISIBILITY_STATE)){const s=performance.getEntriesByType(Z.VISIBILITY_STATE).find(i=>i.name==="hidden");if(s)return{timeStamp:s.startTime,stop:G}}let n=1/0;const{stop:r}=Be(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 cw(e,t,n){const r={},{stop:s}=tw(e,u=>{t(u.loadEvent),r.navigationTimings=u,n()}),i=Zd(e),{stop:o}=Q2(e,i,u=>{r.firstContentfulPaint=u,n()}),{stop:a}=ow(e,i,window,u=>{r.largestContentfulPaint=u,n()}),{stop:c}=ew(e,i,u=>{r.firstInput=u,n()});function l(){s(),o(),a(),c(),i.stop()}return{stop:l,initialViewMetrics:r}}function lw(e,t,n){if(!hw())return{stop:G};let r=0,s;n({value:0});const i=fw(),o=bt(e,{type:Z.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=uw(l.sources);s={target:p!=null&&p.node?new WeakRef(p.node):void 0,time:_e(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:ls(r,4),targetSelector:p&&Ar(p,e.actionNameAttribute),time:s==null?void 0:s.time,previousRect:s!=null&&s.previousRect?Jd(s.previousRect):void 0,currentRect:s!=null&&s.currentRect?Jd(s.currentRect):void 0,devicePixelRatio:s==null?void 0:s.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function uw(e){return e.find(t=>!!t.node&&$n(t.node))}function Jd({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const dw=5*Ie,pw=Ie;function fw(){let e=0,t,n,r=0;return{update:s=>{const i=t===void 0||s.startTime-n>=pw||s.startTime-t>=dw;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 hw(){return on(Z.LAYOUT_SHIFT)&&"WeakRef"in window}let Ns,Xd=0,mo=1/0,go=0;function mw(){"interactionCount"in performance||Ns||(Ns=new window.PerformanceObserver($(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(mo=Math.min(mo,n.interactionId),go=Math.max(go,n.interactionId),Xd=(go-mo)/7+1)})})),Ns.observe({type:"event",buffered:!0,durationThreshold:0}))}const Qd=()=>Ns?Xd:window.performance.interactionCount||0,ep=10,gw=1*Me;function bw(e,t,n){if(!vw())return{getInteractionToNextPaint:()=>{},setViewEnd:G,stop:G};const{getViewInteractionCount:r,stopViewInteractionCount:s}=ww(n);let i=1/0;const o=yw(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=_e(t,f.startTime),c=C2(f.startTime),!c&&f.target&&$n(f.target)&&(c=Ar(f.target,e.actionNameAttribute)))}const d=bt(e,{type:Z.FIRST_INPUT,buffered:!0}).subscribe(u),p=bt(e,{type:Z.EVENT,durationThreshold:40,buffered:!0}).subscribe(u);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,gw),targetSelector:c,time:l};if(r())return{value:0}},setViewEnd:h=>{i=h,s()},stop:()=>{p.unsubscribe(),d.unsubscribe()}}}function yw(e){const t=[];function n(){t.sort((r,s)=>s.duration-r.duration).splice(ep)}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<ep||r.duration>i.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function ww(e){mw();const t=e==="initial_load"?0:Qd();let n={stopped:!1};function r(){return Qd()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function vw(){return on(Z.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function _w(e,t,n,r,s,i,o){let a=s==="initial_load",c=!0;const l=[],u=Zd(r);function d(){if(!c&&!a&&l.length>0){const h=Math.max(...l);h<u.timeStamp&&o(h)}}const{stop:p}=lo(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&l.push(_e(i.timeStamp,h.end)),d())});return{stop:()=>{p(),u.stop()},setLoadEvent:h=>{a&&(a=!1,l.push(h),d())}}}function tp(){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 bo(){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 yo;function np(e){return yo||(yo=Sw(e)),yo}function Sw(e){return new X(t=>{const{throttled:n}=Ft(()=>{t.notify(Ms())},200);return ne(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 Cw=Ie;function Ew(e,t,n,r=Iw(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=Je();o=_e(t.relative,p),d=!0}d&&n({maxDepth:Math.min(s,i),maxDepthScrollTop:l,maxScrollHeight:i,maxScrollHeightTime:o})});return{stop:()=>a.unsubscribe()}}function xw(){const e=bo(),{height:t}=Ms(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function Iw(e,t=Cw){return new X(n=>{function r(){n.notify(xw())}if(window.ResizeObserver){const s=Ft(r,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver($(s.throttled));i&&o.observe(i);const a=ne(e,window,"scroll",s.throttled,{passive:!0});return()=>{s.cancel(),o.disconnect(),a.stop()}}})}function Tw(e,t,n,r,s,i,o){const a={},{stop:c,setLoadEvent:l}=_w(e,t,n,r,i,o,m=>{a.loadingTime=m,s()}),{stop:u}=Ew(r,o,m=>{a.scroll=m}),{stop:d}=lw(r,o.relative,m=>{a.cumulativeLayoutShift=m,s()}),{stop:p,getInteractionToNextPaint:h,setViewEnd:f}=bw(r,o.relative,i);return{stop:()=>{c(),d(),u()},stopINPTracking:p,setLoadEvent:l,setViewEnd:f,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const Rw=3e3,Aw=5*Me,kw=5*Me;function Ow(e,t,n,r,s,i,o,a){const c=new Set;let l=d("initial_load",ql(),a);p();let u;o&&(u=h(i));function d(f,m,g){const y=Pw(t,n,r,s,e,f,m,g);return c.add(y),y.stopObservable.subscribe(()=>{c.delete(y)}),y}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})=>{Nw(m,g)&&(l.end(),l=d("route_change"))})}return{addTiming:(f,m=me())=>{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 Pw(e,t,n,r,s,i,o=ke(),a){const c=Se(),l=new X,u={};let d=0,p;const h=br(s),f=Is();let m=!0,g=a==null?void 0:a.name;const y=(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:y,version:x,context:w};e.notify(1,C),e.notify(2,C);const{throttled:P,cancel:R}=Ft(oe,Rw,{leading:!1}),{setLoadEvent:b,setViewEnd:k,stop:T,stopINPTracking:O,getCommonViewMetrics:A}=Tw(e,t,n,r,re,i,o),{stop:L,initialViewMetrics:N}=i==="initial_load"?cw(r,b,re):{stop:G,initialViewMetrics:{}},{stop:M,eventCounts:se}=J2(e,c,re),we=In(oe,Aw),Ye=e.subscribe(11,ie=>{ie.reason===Bn.UNLOADING&&oe()});oe(),f.changeObservable.subscribe(re);function ot(){e.notify(3,{id:c,name:g,context:f.getContext(),startClocks:o})}function re(){ot(),P()}function oe(){R(),ot(),d+=1;const ie=p===void 0?me():p.timeStamp;e.notify(4,{customTimings:u,documentVersion:d,id:c,name:g,service:y,version:x,context:f.getContext(),loadingType:i,location:h,startClocks:o,commonViewMetrics:A(),initialViewMetrics:N,duration:_e(o.timeStamp,ie),isActive:p===void 0,sessionIsActive:m,eventCounts:se})}return{get name(){return g},service:y,version:x,contextManager:f,stopObservable:l,end(ie={}){var Le,Re;p||(p=(Le=ie.endClocks)!==null&&Le!==void 0?Le:ke(),m=(Re=ie.sessionIsActive)!==null&&Re!==void 0?Re:!0,e.notify(5,{endClocks:p}),e.notify(6,{endClocks:p}),ps(we),k(p.relative),T(),Ye.unsubscribe(),oe(),ge(()=>{this.stop()},kw))},stop(){L(),M(),O(),l.notify()},addTiming(ie,Le){if(p)return;const Re=Qg(Le)?Le:_e(o.timeStamp,Le);u[Lw(ie)]=Re,re()},setViewName(ie){g=ie,oe()}}}function Lw(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&q.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Nw(e,t){return e.pathname!==t.pathname||!Mw(t.hash)&&rp(t.hash)!==rp(e.hash)}function Mw(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function rp(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Dw(e,t,n,r,s,i,o,a,c,l){return e.subscribe(4,u=>e.notify(12,Fw(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}}}),Ow(r,e,s,i,n,o,!n.trackViewsManually,l)}function Fw(e,t,n){var r,s,i,o,a,c,l,u,d,p,h,f,m,g,y,x,w,C;const P=n.getReplayStats(e.id),R=(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:P,cls:R?{device_pixel_ratio:R}: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:(y=e.commonViewMetrics.interactionToNextPaint)===null||y===void 0?void 0:y.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:md(B(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Bw(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:P?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return Kt(e.customTimings)||(b.view.custom_timings=n1(e.customTimings,B)),{rawRumEvent:b,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function Bw({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 Uw="rum";function $w(e,t,n){const r=X0(e,Uw,s=>zw(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||!sp(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 Vw(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Bu("records")?1:0};return{findTrackedSession:()=>e,expire:G,expireObservable:new X,setForcedReplay:G}}function zw(e,t){let n;return Hw(t)?n=t:Mt(e.sessionSampleRate)?Mt(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:sp(n)}}function Hw(e){return e==="0"||e==="1"||e==="2"}function sp(e){return e==="2"||e==="1"}function jw(e,t,n,r,s,i,o){const a=e.replica,c=yb(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,j0(e))),c}function Ww(e){const t=Fn();e.subscribe(13,n=>{t.send("rum",n)})}const qw=Zt;function Gw(e,t,n,r){const s=Dn({expireDelay:qw});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=Je();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 Kw(e,t){let n=br(t);return new X(r=>{const{stop:s}=Yw(e,o),{stop:i}=Zw(e,o);function o(){if(n.href===t.href)return;const a=br(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{s(),i()}})}function Yw(e,t){const{stop:n}=Fe(ip("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:r}=Fe(ip("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:s}=ne(e,window,"popstate",t);return{stop:()=>{n(),r(),s()}}}function Zw(e,t){return ne(e,window,"hashchange",t)}function ip(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const Jw=Zt;function Xw(e,t,n){const r=Dn({expireDelay:Jw});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||Kt(a)))return{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(s,i)=>{const o=r.find();o&&(o[s]=i)}}}const Qw=10*Ie;let zn,wo;function e5(e,t,n,r){t.enabled&&Mt(e.customerDataTelemetrySampleRate)&&(cp(),wo=!1,n.subscribe(13,()=>{wo=!0}),r.subscribe(({bytesCount:i,messagesCount:o})=>{wo&&(zn.batchCount+=1,ap(zn.batchBytesCount,i),ap(zn.batchMessagesCount,o))}),In(t5,Qw))}function t5(){zn.batchCount!==0&&(At("Customer data measures",zn),cp())}function op(){return{min:1/0,max:0,sum:0}}function ap(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function cp(){zn={batchCount:0,batchBytesCount:op(),batchMessagesCount:op()}}const n5=4e3,r5=500,s5=Zt;function i5(e,t,n=r5){const r=Dn({expireDelay:s5,maxEntries:n5});let s;o(lp(),Je());const{stop:i}=Be(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{o(a5(c),c.timeStamp)},{capture:!0});function o(c,l=Je()){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:o5(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 o5(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:s})=>({state:r,start:B(_e(t,s))}))}function a5(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":lp()}function lp(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function c5(e){let t;const n=requestAnimationFrame($(()=>{t=Ms()})),r=np(e).subscribe(s=>{t=s}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const l5=Ie;function u5(e){return new X(t=>d5(e,n=>t.notify(n)))}function d5(e,t){const n=yr(document.cookie,e),r=In(()=>{const s=yr(document.cookie,e);s!==n&&t(s)},l5);return()=>ps(r)}const up="datadog-ci-visibility-test-execution-id";function p5(e,t=u5(up)){var n;let r=Bt(up)||((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 f5(e,t){const n=bt(t,{type:Z.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const s of r){const i=us(s.startTime),o={date:i.timeStamp,long_task:{id:Se(),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 h5(e,t){const n=bt(t,{type:Z.LONG_TASK,buffered:!0}).subscribe(r=>{for(const s of r){if(s.entryType!==Z.LONG_TASK||!t.trackLongTasks)break;const i=us(s.startTime),o={date:i.timeStamp,long_task:{id:Se(),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 m5(){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 g5(e){e.register(0,({eventType:t})=>{const n=Gb(),r=Kb();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Hu()}}})}function b5(e,t,n){const r=Yi(e),s=n(r);return Di(t).forEach(([i,o])=>vo(e,r,i.split(/\.|(?=\[\])/),o)),s}function vo(e,t,n,r){const[s,...i]=n;if(s==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((o,a)=>vo(o,t[a],i,r));return}if(!(!dp(e)||!dp(t))){if(i.length>0)return vo(e[s],t[s],i,r);y5(e,s,t[s],r)}}function y5(e,t,n,r){const s=tn(n);s===r?e[t]=ce(n):r==="object"&&(s==="undefined"||s==="null")&&(e[t]={})}function dp(e){return tn(e)==="object"}const Hn={"view.name":"string","view.url":"string","view.referrer":"string"},jn={context:"object"},_o={service:"string",version:"string"};let pp;function w5(e,t,n,r,s,i,o,a,c){pp={view:{"view.performance.lcp.resource_url":"string",...jn,...Hn},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...jn,...Hn,..._o},resource:{"resource.url":"string",...Ss(en.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...jn,...Hn,..._o},action:{"action.target.name":"string",...jn,...Hn,..._o},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...jn,...Hn},vital:{...jn,...Hn}};const l={error:Xi("error",e.eventRateLimiterThreshold,c),action:Xi("action",e.eventRateLimiterThreshold,c),vital:Xi("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),y=r.findTrackedSession(u);if(y&&m&&!g&&Ss(en.MISSING_URL_CONTEXT_TELEMETRY)&&At("Missing URL entry",{debug:{eventType:p.type,startTime:u,urlEntries:i.getAllEntries(),urlDeletedEntries:i.getDeletedEntries(),viewEntries:s.getAllEntries(),viewDeletedEntries:s.getDeletedEntries()}}),y&&m&&g){const x=a(),w={_dd:{format_version:2,drift:Jg(),configuration:{session_sample_rate:ls(e.sessionSampleRate,3),session_replay_sample_rate:ls(e.sessionReplaySampleRate,3)},browser_sdk_version:rn()?"6.6.3":void 0},application:{id:e.applicationId},date:me(),source:"browser",session:{id:y.id,type:"user"},display:o.get(),connectivity:xu(),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=y.sessionReplay===1),y.anonymousId&&!x.user.anonymous_id&&e.trackAnonymousUser&&(x.user.anonymous_id=y.anonymousId),Kt(x.user)||(C.usr=x.user),!Kt(x.account)&&x.account.id&&(C.account=x.account),v5(C,e.beforeSend,h,l)&&(Kt(C.context)&&delete C.context,t.notify(13,C))}})}function v5(e,t,n,r){var s;if(t){const o=b5(e,pp[e.type],a=>t(a,n));if(o===!1&&e.type!=="view")return!1;o===!1&&q.warn("Can't dismiss view events using beforeSend!")}return!((s=r[e.type])===null||s===void 0?void 0:s.isLimitReached())}function _5(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function S5(e,t,n,r,s,i,o){const a=[],c=new xy,l=m5();c.subscribe(13,de=>Ki("rum",de));const u=C5(e);u.setContextProvider(()=>{var de,er;return{application:{id:e.applicationId},session:{id:(de=f.findTrackedSession())===null||de===void 0?void 0:de.id},view:{id:(er=x.findView())===null||er===void 0?void 0:er.id},action:{id:A.findActionId()}}});const d=de=>{c.notify(14,{error:de}),At("Error reported to customer",{"error.message":de.message})},p=mb(e),h=p.subscribe(de=>{c.notify(11,de)});a.push(()=>h.unsubscribe());const f=rn()?Vw():$w(e,c,i);if(rn())Ww(c);else{const de=jw(e,c,u.observable,d,p,f.expireObservable,s);a.push(()=>de.stop()),e5(e,u,c,de.flushObservable)}const m=Sy(),g=Kw(e,location),y=i5(l,e),x=Ty(c),w=Gw(c,l,g,location),C=Xw(c,l,e),{observable:P,stop:R}=Cy();a.push(R);const b=my(e),k=gy(e),T=by(e),O=()=>_5(b,k,T,t),{actionContexts:A,addAction:L,stop:N}=E5(c,l,e,f,y,m,P,w,x,O,d);a.push(N),H0();const{addTiming:M,startView:se,setViewName:we,setViewContext:Ye,setViewContextProperty:ot,getViewContext:re,stop:oe}=Dw(c,l,e,location,m,P,g,t,x,r);a.push(oe);const{stop:ie}=W2(c,e,y);if(a.push(ie),e.trackLongTasks)if(on(Z.LONG_ANIMATION_FRAME)){const{stop:de}=f5(c,e);a.push(de)}else h5(c,e);const{addError:Le}=L2(c,e);My(c,e,f,O);const Re=Zb(c,y,o),Kc=Ey(e.applicationId,f,x,A,w);return a.push(()=>n.stop()),{addAction:L,addError:Le,addTiming:M,addFeatureFlagEvaluation:C.addFeatureFlagEvaluation,startView:se,setViewContext:Ye,setViewContextProperty:ot,getViewContext:re,setViewName:we,lifeCycle:c,viewHistory:x,session:f,stopSession:()=>f.expire(),getInternalContext:Kc.get,startDurationVital:Re.startDurationVital,stopDurationVital:Re.stopDurationVital,addDurationVital:Re.addDurationVital,globalContext:b,userContext:k,accountContext:T,stop:()=>{a.forEach(de=>de())}}}function C5(e){const t=V0("browser-rum-sdk",e);if(rn()){const n=Fn();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function E5(e,t,n,r,s,i,o,a,c,l,u){const d=k2(e,t,i,o,n),p=c5(n),h=p5(t);return g5(t),w5(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 x5(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=I5(e),a=`/rum/replay/sessions/${s}`;return`${o}${a}?${i.join("&")}`}function I5(e){const t=e.site,n=e.subdomain||T5(e);return`https://${n?`${n}.`:""}${t}`}function T5(e){switch(e.site){case Qt:case $1:return"app";case fu:return"dd";default:return}}const R5=1e3;let Xe;function A5(e){return Ds(e).segments_count}function k5(e){Ds(e).segments_count+=1}function O5(e){Ds(e).records_count+=1}function P5(e,t){Ds(e).segments_total_raw_size+=t}function L5(e){return Xe==null?void 0:Xe.get(e)}function Ds(e){Xe||(Xe=new Map);let t;return Xe.has(e)?t=Xe.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Xe.set(e,t),Xe.size>R5&&N5()),t}function N5(){if(!Xe)return;const e=Xe.keys().next().value;e&&Xe.delete(e)}function fp(e,t,n){let r=0,s=[],i,o=0;const a=[],{stop:c}=ne(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(),At("Worker responses received out of order."))});function l(){const d=s.length===0?new Uint8Array(0):t1(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 So({configuredUrl:e,error:t,source:n,scriptType:r}){if(q.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&M5(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.",q.error(`${s} See documentation at ${cs}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&Zi(t)}function M5(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const D5=30*Ie;function hp(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 le={status:0};function mp(e,t,n,r=hp){switch(le.status===0&&F5(e,t,r),le.status){case 1:return le.initializationFailureCallbacks.push(n),le.worker;case 3:return le.worker}}function gp(){return le.status}function F5(e,t,n=hp){try{const r=n(e),{stop:s}=ne(e,r,"error",a=>{Co(e,t,a)}),{stop:i}=ne(e,r,"message",({data:a})=>{a.type==="errored"?Co(e,t,a.error,a.streamId):a.type==="initialized"&&U5(a.version)});r.postMessage({action:"init"}),ge(()=>B5(t),D5),le={status:1,worker:r,stop:()=>{s(),i()},initializationFailureCallbacks:[]}}catch(r){Co(e,t,r)}}function B5(e){le.status===1&&(q.error(`${e} failed to start: a timeout occurred while initializing the Worker`),le.initializationFailureCallbacks.forEach(t=>t()),le={status:2})}function U5(e){le.status===1&&(le={status:3,worker:le.worker,stop:le.stop,version:e})}function Co(e,t,n,r){le.status===1||le.status===0?(So({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),le.status===1&&le.initializationFailureCallbacks.forEach(s=>s()),le={status:2}):Zi(n,{worker_version:le.status===3&&le.version,stream_id:r})}function bp(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function $5(e,t,n,r){const s=t.findTrackedSession(),i=V5(s,r),o=n.findView();return x5(e,{viewContext:o,errorType:i,session:s})}function V5(e,t){if(!bp())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 z5(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(),_b(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(H5(p,d)){o=1;return}j5(o)||(o=2,c().catch(Rt),W5(p,d)&&n.setForcedReplay())}function u(){o===3&&(a==null||a()),o=0}return{start:l,stop:u,getSessionReplayLink(){return $5(e,n,r,o!==0)},isRecording:()=>o===3}}function H5(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function j5(e){return e===2||e===3}function W5(e,t){return t&&t.force&&e.sessionReplay===0}function q5(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:G},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function G5(e,t){if(rn()&&!Bu("records")||!bp())return{start:G,stop:G,getReplayStats:()=>{},onRumStart:G,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=q5();return{start:i=>n.start(i),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:s,isRecording:()=>gp()===3&&n.isRecording(),getReplayStats:i=>gp()===3?L5(i):void 0};function s(i,o,a,c,l){let u;function d(){return u||(l??(l=mp(o,"Datadog Session Replay",()=>{n.stop()},t)),l&&(u=fp(o,l,1))),u}n=z5(o,i,a,c,e,d),r(o)&&n.start()}}async function K5(e=Y5){try{return await e()}catch(t){So({error:t,source:"Recorder",scriptType:"module"})}}async function Y5(){return(await Promise.resolve().then(()=>z_)).startRecording}function Z5(){return gt().Profiler!==void 0}async function J5(e=X5){try{return await e()}catch(t){So({error:t,source:"Profiler",scriptType:"module"})}}async function X5(){return(await Promise.resolve().then(()=>nS)).createRumProfiler}function Q5(){let e;function t(n,r,s,i){!Z5()||!Mt(r.profilingSampleRate)||J5().then(o=>{if(!o){At("[DD_RUM] Failed to lazy load the RUM Profiler");return}e=o(r,n,s),e.start(i.findView())}).catch(Rt)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(Rt)}}}const ev=G5(K5),tv=Q5(),je=vy(S5,ev,tv,{startDeflateWorker:mp,createDeflateEncoder:fp});O0(gt(),"DD_RUM",je);const Qn=class Qn{init(){if(Qn.isInitialized){console.info("Tracker [DD]: already initialized");return}je.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:fe.getRuntimeConfig().MODE,version:fe.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),je.startView({name:"ap_cl_view_mounted"}),je.startSessionReplayRecording(),Qn.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){je==null||je.addAction(t,n||{})}trackError(t,n){je==null||je.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof je.stopSessionReplayRecording=="function"&&je.stopSessionReplayRecording(),je.addAction("ap_cl_view_unmounted",{reason:"component_destroyed"}),Qn.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")}};_(Qn,"isInitialized",!1);let Eo=Qn,Wn=[];class Ce{static init(t){if(!t){console.info("Tracking disabled");return}Wn=[new Eo],Wn.forEach(n=>n.init())}static trackEvent(t,n){Wn.forEach(r=>r.track(t,n))}static trackError(t,n){Wn.forEach(r=>r.trackError(t,n))}static destroy(){Wn.forEach(t=>t.destroy()),Wn=[]}}const ye=class ye{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(ye.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}ye.token=t,Ce.init((n==null?void 0:n.tracking)??!0),V.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),H.init({language:(n==null?void 0:n.language)??"en"}),fe.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),ut.init({appName:"ap-cl",baseURL:fe.getRuntimeConfig().API_BASE_URL,timeout:5e3}),Ce.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),ye.isInitialized=!0}static registerComponent(t){ye.components.add(t)}static unregisterComponent(t){ye.components.delete(t)}static getToken(){if(!ye.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return ye.token}static destroy(){ye.isInitialized&&(ye.components.forEach(t=>t.destroy()),ye.components.clear(),ye.isInitialized=!1,Ce.destroy(),ye.token="")}static isLibInitialized(){return ye.isInitialized}};_(ye,"isInitialized",!1),_(ye,"token"),_(ye,"components",new Set);let ct=ye;function yp(e,t){return function(){return e.apply(t,arguments)}}const{toString:nv}=Object.prototype,{getPrototypeOf:xo}=Object,{iterator:Fs,toStringTag:wp}=Symbol,Bs=(e=>t=>{const n=nv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lt=e=>(e=e.toLowerCase(),t=>Bs(t)===e),Us=e=>t=>typeof t===e,{isArray:qn}=Array,Or=Us("undefined");function rv(e){return e!==null&&!Or(e)&&e.constructor!==null&&!Or(e.constructor)&&Ue(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vp=lt("ArrayBuffer");function sv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vp(e.buffer),t}const iv=Us("string"),Ue=Us("function"),_p=Us("number"),$s=e=>e!==null&&typeof e=="object",ov=e=>e===!0||e===!1,Vs=e=>{if(Bs(e)!=="object")return!1;const t=xo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wp in e)&&!(Fs in e)},av=lt("Date"),cv=lt("File"),lv=lt("Blob"),uv=lt("FileList"),dv=e=>$s(e)&&Ue(e.pipe),pv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ue(e.append)&&((t=Bs(e))==="formdata"||t==="object"&&Ue(e.toString)&&e.toString()==="[object FormData]"))},fv=lt("URLSearchParams"),[hv,mv,gv,bv]=["ReadableStream","Request","Response","Headers"].map(lt),yv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),qn(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{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 Sp(e,t){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 an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cp=e=>!Or(e)&&e!==an;function Io(){const{caseless:e}=Cp(this)&&this||{},t={},n=(r,s)=>{const i=e&&Sp(t,s)||s;Vs(t[i])&&Vs(r)?t[i]=Io(t[i],r):Vs(r)?t[i]=Io({},r):qn(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Pr(arguments[r],n);return t}const wv=(e,t,n,{allOwnKeys:r}={})=>(Pr(t,(s,i)=>{n&&Ue(s)?e[i]=yp(s,n):e[i]=s},{allOwnKeys:r}),e),vv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_v=(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)},Sv=(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&&xo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Cv=(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},Ev=e=>{if(!e)return null;if(qn(e))return e;let t=e.length;if(!_p(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&xo(Uint8Array)),Iv=(e,t)=>{const r=(e&&e[Fs]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Tv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rv=lt("HTMLFormElement"),Av=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ep=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kv=lt("RegExp"),xp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Pr(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Ov=e=>{xp(e,(t,n)=>{if(Ue(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ue(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+"'")})}})},Pv=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return qn(e)?r(e):r(String(e).split(t)),n},Lv=()=>{},Nv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Mv(e){return!!(e&&Ue(e.append)&&e[wp]==="FormData"&&e[Fs])}const Dv=e=>{const t=new Array(10),n=(r,s)=>{if($s(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=qn(r)?[]:{};return Pr(r,(o,a)=>{const c=n(o,s+1);!Or(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return n(e,0)},Fv=lt("AsyncFunction"),Bv=e=>e&&($s(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),Ip=((e,t)=>e?setImmediate:t?((n,r)=>(an.addEventListener("message",({source:s,data:i})=>{s===an&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),an.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ue(an.postMessage)),Uv=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||Ip,S={isArray:qn,isArrayBuffer:vp,isBuffer:rv,isFormData:pv,isArrayBufferView:sv,isString:iv,isNumber:_p,isBoolean:ov,isObject:$s,isPlainObject:Vs,isReadableStream:hv,isRequest:mv,isResponse:gv,isHeaders:bv,isUndefined:Or,isDate:av,isFile:cv,isBlob:lv,isRegExp:kv,isFunction:Ue,isStream:dv,isURLSearchParams:fv,isTypedArray:xv,isFileList:uv,forEach:Pr,merge:Io,extend:wv,trim:yv,stripBOM:vv,inherits:_v,toFlatObject:Sv,kindOf:Bs,kindOfTest:lt,endsWith:Cv,toArray:Ev,forEachEntry:Iv,matchAll:Tv,isHTMLForm:Rv,hasOwnProperty:Ep,hasOwnProp:Ep,reduceDescriptors:xp,freezeMethods:Ov,toObjectSet:Pv,toCamelCase:Av,noop:Lv,toFiniteNumber:Nv,findKey:Sp,global:an,isContextDefined:Cp,isSpecCompliantForm:Mv,toJSONObject:Dv,isAsyncFn:Fv,isThenable:Bv,setImmediate:Ip,asap:Uv,isIterable:e=>e!=null&&Ue(e[Fs])};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)}S.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:S.toJSONObject(this.config),code:this.code,status:this.status}}});const Tp=U.prototype,Rp={};["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=>{Rp[e]={value:e}}),Object.defineProperties(U,Rp),Object.defineProperty(Tp,"isAxiosError",{value:!0}),U.from=(e,t,n,r,s,i)=>{const o=Object.create(Tp);return S.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),U.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const $v=null;function To(e){return S.isPlainObject(e)||S.isArray(e)}function Ap(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function kp(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ap(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function Vv(e){return S.isArray(e)&&!e.some(To)}const zv=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function zs(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!S.isUndefined(g[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(t);if(!S.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(S.isDate(f))return f.toISOString();if(!c&&S.isBlob(f))throw new U("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(f)||S.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,g){let y=f;if(f&&!g&&typeof f=="object"){if(S.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(S.isArray(f)&&Vv(f)||(S.isFileList(f)||S.endsWith(m,"[]"))&&(y=S.toArray(f)))return m=Ap(m),y.forEach(function(w,C){!(S.isUndefined(w)||w===null)&&t.append(o===!0?kp([m],C,i):o===null?m:m+"[]",l(w))}),!1}return To(f)?!0:(t.append(kp(g,m,i),l(f)),!1)}const d=[],p=Object.assign(zv,{defaultVisitor:u,convertValue:l,isVisitable:To});function h(f,m){if(!S.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),S.forEach(f,function(y,x){(!(S.isUndefined(y)||y===null)&&s.call(t,y,S.isString(x)?x.trim():x,m,p))===!0&&h(y,m?m.concat(x):[x])}),d.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Op(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ro(e,t){this._pairs=[],e&&zs(e,this,t)}const Pp=Ro.prototype;Pp.append=function(t,n){this._pairs.push([t,n])},Pp.toString=function(t){const n=t?function(r){return t.call(this,r,Op)}:Op;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lp(e,t,n){if(!t)return e;const r=n&&n.encode||Hv;S.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=S.isURLSearchParams(t)?t.toString():new Ro(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Np{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){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Mp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ro,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ao=typeof window<"u"&&typeof document<"u",ko=typeof navigator=="object"&&navigator||void 0,Wv=Ao&&(!ko||["ReactNative","NativeScript","NS"].indexOf(ko.product)<0),qv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Gv=Ao&&window.location.href||"http://localhost",Te={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ao,hasStandardBrowserEnv:Wv,hasStandardBrowserWebWorkerEnv:qv,navigator:ko,origin:Gv},Symbol.toStringTag,{value:"Module"})),...jv};function Kv(e,t){return zs(e,new Te.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Te.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Yv(e){return S.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Zv(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 Dp(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&&S.isArray(s)?s.length:o,c?(S.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!S.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&S.isArray(s[o])&&(s[o]=Zv(s[o])),!a)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,s)=>{t(Yv(r),s,n,0)}),n}return null}function Jv(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Lr={transitional:Mp,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=S.isObject(t);if(i&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return s?JSON.stringify(Dp(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.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 Kv(t,this.formSerializer).toString();if((a=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return zs(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Jv(t)):t}],transformResponse:[function(t){const n=this.transitional||Lr.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}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:Te.classes.FormData,Blob:Te.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch"],e=>{Lr.headers[e]={}});const Xv=S.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"]),Qv=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
523
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&
|
|
524
|
-
`)}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[Fp]=this[Fp]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Nr(o);r[a]||(r3(s,o),r[a]=!0)}return S.isArray(t)?t.forEach(i):i(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),S.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),S.freezeMethods($e);function Po(e,t){const n=this||Lr,r=t||n,s=$e.from(r.headers);let i=r.data;return S.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Bp(e){return!!(e&&e.__CANCEL__)}function Gn(e,t,n){U.call(this,e??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(Gn,U,{__CANCEL__:!0});function Up(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 s3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function i3(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 o3(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.apply(null,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 js=(e,t,n=3)=>{let r=0;const s=i3(50,250);return o3(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)},$p=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Vp=e=>(...t)=>S.asap(()=>e(...t)),a3=Te.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Te.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Te.origin),Te.navigator&&/(msie|trident)/i.test(Te.navigator.userAgent)):()=>!0,c3=Te.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];S.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),S.isString(r)&&o.push("path="+r),S.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 l3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function u3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zp(e,t,n){let r=!l3(t);return e&&(r||n==!1)?u3(e,t):t}const Hp=e=>e instanceof $e?{...e}:e;function cn(e,t){t=t||{};const n={};function r(l,u,d,p){return S.isPlainObject(l)&&S.isPlainObject(u)?S.merge.call({caseless:p},l,u):S.isPlainObject(u)?S.merge({},u):S.isArray(u)?u.slice():u}function s(l,u,d,p){if(S.isUndefined(u)){if(!S.isUndefined(l))return r(void 0,l,d,p)}else return r(l,u,d,p)}function i(l,u){if(!S.isUndefined(u))return r(void 0,u)}function o(l,u){if(S.isUndefined(u)){if(!S.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(Hp(l),Hp(u),d,!0)};return S.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||s,p=d(e[u],t[u],u);S.isUndefined(p)&&d!==a||(n[u]=p)}),n}const jp=e=>{const t=cn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=$e.from(o),t.url=Lp(zp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(S.isFormData(n)){if(Te.hasStandardBrowserEnv||Te.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Te.hasStandardBrowserEnv&&(r&&S.isFunction(r)&&(r=r(t)),r||r!==!1&&a3(t.url))){const l=s&&i&&c3.read(i);l&&o.set(s,l)}return t},d3=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=jp(e);let i=s.data;const o=$e.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 y(){if(!g)return;const w=$e.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};Up(function(b){n(b),m()},function(b){r(b),m()},P),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(r(new U("Request aborted",U.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new U("Network Error",U.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||Mp;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new U(C,P.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&S.forEach(o.toJSON(),function(C,P){g.setRequestHeader(P,C)}),S.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),a&&a!=="json"&&(g.responseType=s.responseType),l&&([p,f]=js(l,!0),g.addEventListener("progress",p)),c&&g.upload&&([d,h]=js(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",h)),(s.cancelToken||s.signal)&&(u=w=>{g&&(r(!w||w.type?new Gn(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=s3(s.url);if(x&&Te.protocols.indexOf(x)===-1){r(new U("Unsupported protocol "+x+":",U.ERR_BAD_REQUEST,e));return}g.send(i||null)})},p3=(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 Gn(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=()=>S.asap(a),c}},f3=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},h3=async function*(e,t){for await(const n of m3(e))yield*f3(n,t)},m3=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()}},Wp=(e,t,n,r)=>{const s=h3(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})},Ws=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",qp=Ws&&typeof ReadableStream=="function",g3=Ws&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},b3=qp&&Gp(()=>{let e=!1;const t=new Request(Te.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Kp=64*1024,Lo=qp&&Gp(()=>S.isReadableStream(new Response("").body)),qs={stream:Lo&&(e=>e.body)};Ws&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!qs[t]&&(qs[t]=S.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new U(`Response type '${t}' is not supported`,U.ERR_NOT_SUPPORT,r)})})})(new Response);const y3=async e=>{if(e==null)return 0;if(S.isBlob(e))return e.size;if(S.isSpecCompliantForm(e))return(await new Request(Te.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(S.isArrayBufferView(e)||S.isArrayBuffer(e))return e.byteLength;if(S.isURLSearchParams(e)&&(e=e+""),S.isString(e))return(await g3(e)).byteLength},w3=async(e,t)=>{const n=S.toFiniteNumber(e.getContentLength());return n??y3(t)},No={http:$v,xhr:d3,fetch:Ws&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=jp(e);l=l?(l+"").toLowerCase():"text";let h=p3([s,i&&i.toAbortSignal()],o),f;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(c&&b3&&n!=="get"&&n!=="head"&&(g=await w3(u,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(S.isFormData(r)&&(R=P.headers.get("content-type"))&&u.setContentType(R),P.body){const[b,k]=$p(g,js(Vp(c)));r=Wp(P.body,Kp,b,k)}}S.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:y?d:void 0});let x=await fetch(f);const w=Lo&&(l==="stream"||l==="response");if(Lo&&(a||w&&m)){const P={};["status","statusText","headers"].forEach(T=>{P[T]=x[T]});const R=S.toFiniteNumber(x.headers.get("content-length")),[b,k]=a&&$p(R,js(Vp(a),!0))||[];x=new Response(Wp(x.body,Kp,b,()=>{k&&k(),m&&m()}),P)}l=l||"text";let C=await qs[S.findKey(qs,l)||"text"](x,e);return!w&&m&&m(),await new Promise((P,R)=>{Up(P,R,{data:C,headers:$e.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:f})})}catch(y){throw m&&m(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,e,f),{cause:y.cause||y}):U.from(y,y&&y.code,e,f)}})};S.forEach(No,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yp=e=>`- ${e}`,v3=e=>S.isFunction(e)||e===null||e===!1,Zp={getAdapter:e=>{e=S.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!v3(n)&&(r=No[(o=String(n)).toLowerCase()],r===void 0))throw new U(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
525
|
-
`+
|
|
526
|
-
`):" "+
|
|
527
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Ks.assertOptions(r,{silentJSONParsing:wt.transitional(wt.boolean),forcedJSONParsing:wt.transitional(wt.boolean),clarifyTimeoutError:wt.transitional(wt.boolean)},!1),s!=null&&(S.isFunction(s)?n.paramsSerializer={serialize:s}:Ks.assertOptions(s,{encode:wt.function,serialize:wt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ks.assertOptions(n,{baseUrl:wt.spelling("baseURL"),withXsrfToken:wt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&S.merge(i.common,i[n.method]);i&&S.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=$e.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=[Jp.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,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=0;d<p;){const f=a[d++],m=a[d++];try{h=f(h)}catch(g){m.call(this,g);break}}try{u=Jp.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=cn(this.defaults,t);const n=zp(t.baseURL,t.url,t.allowAbsoluteUrls);return Lp(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){ln.prototype[t]=function(n,r){return this.request(cn(r||{},{method:t,url:n,data:(r||{}).data}))}}),S.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(cn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ln.prototype[t]=n(),ln.prototype[t+"Form"]=n(!0)});let S3=class Hh{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 Gn(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 Hh(function(s){t=s}),cancel:t}}};function C3(e){return function(n){return e.apply(null,n)}}function E3(e){return S.isObject(e)&&e.isAxiosError===!0}const Do={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(Do).forEach(([e,t])=>{Do[t]=e});function ef(e){const t=new ln(e),n=yp(ln.prototype.request,t);return S.extend(n,ln.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ef(cn(e,s))},n}const ue=ef(Lr);ue.Axios=ln,ue.CanceledError=Gn,ue.CancelToken=S3,ue.isCancel=Bp,ue.VERSION=Xp,ue.toFormData=zs,ue.AxiosError=U,ue.Cancel=ue.CanceledError,ue.all=function(t){return Promise.all(t)},ue.spread=C3,ue.isAxiosError=E3,ue.mergeConfig=cn,ue.AxiosHeaders=$e,ue.formToJSON=e=>Dp(S.isHTMLForm(e)?new FormData(e):e),ue.getAdapter=Zp.getAdapter,ue.HttpStatusCode=Do,ue.default=ue;const{Axios:wS,AxiosError:vS,CanceledError:_S,isCancel:SS,CancelToken:CS,VERSION:ES,all:xS,Cancel:IS,isAxiosError:TS,spread:RS,toFormData:AS,AxiosHeaders:kS,HttpStatusCode:OS,formToJSON:PS,getAdapter:LS,mergeConfig:NS}=ue,Mr=(e,t)=>{const n=fe.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},Q=class Q{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};_(Q,"axiosInstance"),_(Q,"config"),_(Q,"init",t=>{Q.config=t,Q.axiosInstance=ue.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":H.getCurrent(),...t.headers}}),Q.setupInterceptors()}),_(Q,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Mr(t,r),o={params:{useQueryParams:s,...n}};return await Q.getAxiosInstance().get(i,o)}),_(Q,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Mr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await Q.getAxiosInstance().post(i,n,o)}),_(Q,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Mr(t,r),o={params:{useQueryParams:s}};return await Q.getAxiosInstance().put(i,n,o)}),_(Q,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Mr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await Q.getAxiosInstance().patch(i,n,o)}),_(Q,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Mr(t,r),o={params:{useQueryParams:s,...n}};return await Q.getAxiosInstance().delete(i,o)}),_(Q,"setupInterceptors",()=>{Q.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:Q.getEncodeParams()}:t.params=r,t.data&&(t.data=Xc(t.data,"camelCase-to-snake_case")),t}),Q.axiosInstance.interceptors.response.use(t=>Q.handleResponse(t),t=>Q.handleError(t))}),_(Q,"handleResponse",t=>{const n=t.status===202,r=Xc(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),_(Q,"handleError",t=>{var r,s,i,o,a,c,l,u;const n={error:((s=(r=t.response)==null?void 0:r.data)==null?void 0:s.error)||"UNKNOWN_ERROR",internalTerm:(o=(i=t.response)==null?void 0:i.data)==null?void 0:o.internalTerm,message:((c=(a=t.response)==null?void 0:a.data)==null?void 0:c.message)||H.translate("generic_error"),description:(u=(l=t.response)==null?void 0:l.data)==null?void 0:u.description};return Promise.reject(n)}),_(Q,"getEncodeParams",()=>{const t={app_name:Q.config.appName,app_id:ct.getToken(),environment:fe.getEnvironment(),platform:_l(),version:fe.getRuntimeConfig().VERSION};return Jc(t)});let ut=Q;const un={createPayment:"/v1/web/payments",paymentDetails:"/v1/web/payments/:paymentExternalId/detail",identifyUser:"/v1/web/payments/:paymentExternalId/identify-user",paymentStatus:"/v1/web/payments/:paymentExternalId/status",paymentMethodCreation:"/v1/web/payments/:paymentExternalId/pay",paymentCardPay:"/v1/web/payments/:paymentExternalId/card/pay",pciToken:"v1/web/pci/token"};class Ys{}_(Ys,"postPaymentCardPay",async t=>{try{return await ut.POST({url:cr(un.paymentCardPay,{paymentExternalId:t.paymentExternalId}),data:t})}catch(n){return Ce.trackError(n),Promise.reject(n)}}),_(Ys,"getPciToken",async t=>{try{return await ut.POST({url:un.pciToken,data:t})}catch(n){return Ce.trackError(n),Promise.reject(n)}});var E=qe;function Fo(){var e=qe;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(Fo=function(){return t})()}(function(){for(var e=qe,t=Uo();;)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 Bo=$o;function Uo(){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(Uo=function(){return e})()}function $o(e,t){const n=Fo();return($o=function(r,s){return n[r-=160]})(e,t)}(function(){var e=qe;const t=$o,n=Fo();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)]())}})(),Bo(165),Bo(177),Bo(166);var Qe,zt,We,tf,et,vt,nf,rf,Vo,zo,sf,Zs;function Ho(){var e=qe,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(Ho=function(){return t})()}function Js(e,t){var n=Ho();return(Js=function(r,s){return n[r-=191]})(e,t)}function jo(e,t){var n=Wo();return(jo=function(r,s){return n[r-=203]})(e,t)}function Wo(){var e=qe,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Wo=function(){return t})()}function qo(e,t){var n=Go();return(qo=function(r,s){return n[r-=166]})(e,t)}function Go(){var e=qe,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Go=function(){return t})()}function of(e,t){var n=Ko();return(of=function(r,s){return n[r-=472]})(e,t)}function Ko(){var e=qe,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(Ko=function(){return t})()}(function(){for(var e=qe,t=Js,n=Ho();;)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())}})(),(zt=Qe||(Qe={}))[(We=Js)(210)]=We(210),zt[We(194)]=We(194),zt[We(211)]=We(211),zt[E(773)]=We(206),zt[We(207)]=We(207),zt[We(197)]=We(197),zt[We(205)]=E(143),zt.UNHANDLED=We(213),vt=Js,(et=tf||(tf={}))[et.OK=200]="OK",et[et[vt(199)]=400]=vt(199),et[et[vt(202)]=404]=vt(202),et[et[vt(208)]=500]=E(378),et[et[vt(201)]=408]=vt(201),et[et[vt(195)]=401]=vt(195),function(){for(var e=E,t=jo,n=Wo();;)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)]())}}(),Vo=jo,(rf=nf||(nf={}))[E(577)]=Vo(205),rf[Vo(213)]=E(205),function(){for(var e=E,t=qo,n=Go();;)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())}}(),(sf=zo||(zo={}))[(Zs=qo)(166)]=Zs(173),sf[Zs(169)]=Zs(177),function(){for(var e=E,t=of,n=Ko();;)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 Kn=Qs;(function(){var e=E;const t=Qs,n=Yo();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 Dr={isRequired:e=>e+Kn(475),isUndefined:e=>e+Kn(492),isInvalid:e=>e+Kn(490),unableToFind:e=>Kn(466)+e+".",notLoaded:e=>Kn(473)+e+"."};class Xs extends Error{constructor(t,n,r=!1){var s=E;const i=Kn;let o=n;switch(t){case Qe[i(491)]:o=Dr[i(470)](n);break;case Qe[i(479)]:o=Dr.isInvalid(n);break;case Qe[i(486)]:o=Dr[i(476)](n);break;case Qe[s(563)]:o=Dr[i(495)](n);break;case Qe[i(481)]:o=Dr[i(493)](n);break;case Qe[s(454)]:o=i(478)+n;break;case Qe[i(471)]:o=i(496)+n;break;case Qe[i(477)]:default:o=i(474)+n}var a,c,l;super(o),a=this,l=void 0,(c=i(482))in a?Object[Qs(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 Qs(e,t){const n=Yo();return(Qs=function(r,s){return n[r-=466]})(e,t)}function Yo(){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(Yo=function(){return t})()}function af(e,t){var n=Zo();return(af=function(r,s){return n[r-=363]})(e,t)}function Zo(){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(Zo=function(){return t})()}(function(){for(var e=E,t=af,n=Zo();;)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 Fr=Xo;function Jo(){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(Jo=function(){return t})()}function Xo(e,t){const n=Jo();return(Xo=function(r,s){return n[r-=127]})(e,t)}(function(){var e=E;const t=Xo,n=Jo();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 x3{static[Fr(135)](t){const n=Fr,r=new URLSearchParams(t),s={};return r[n(136)]((i,o)=>{var a=qe;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[Fr(135)](t)}static[Fr(131)](t){const n=Fr,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 ei=Qo;function Qo(e,t){const n=ea();return(Qo=function(r,s){return n[r-=358]})(e,t)}(function(){var e=E;const t=Qo,n=ea();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 Yn={endpoints:{tokenizer:E(427),reveal:ei(365)},domians:{cdn:{production:ei(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:ei(359),sandbox:ei(360)}}};function ea(){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(ea=function(){return t})()}const I3=ta;function ta(e,t){const n=na();return(ta=function(r,s){return n[r-=466]})(e,t)}(function(){var e=E;const t=ta,n=na();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 T3={environment:zo[I3(468)],version:E(611)};function na(){var e=E;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(na=function(){return t})()}function ra(){var e=E;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(ra=function(){return t})()}function cf(e,t){const n=ra();return(cf=function(r,s){return n[r-=155]})(e,t)}(function(){var e=E;const t=cf,n=ra();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 sa=T3;const dn=()=>sa,R3=ia;function ia(e,t){const n=oa();return(ia=function(r,s){return n[r-=379]})(e,t)}(function(){var e=E;const t=ia,n=oa();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 lf=(e,t)=>e[R3(380)](new RegExp(t+"$"),"");function oa(){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(oa=function(){return t})()}const Br=ca;function aa(){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(aa=function(){return t})()}function ca(e,t){const n=aa();return(ca=function(r,s){return n[r-=110]})(e,t)}(function(){var e=E;const t=ca,n=aa();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 ti{static get[Br(113)](){const t=Br;return lf(Yn[t(121)][t(123)][dn()[t(126)]],"/")}static get[Br(116)](){const t=Br;return lf(Yn[t(121)][t(122)][dn()[t(126)]],"/")}static[E(241)](t,n,r){var s=E;const i=Br,o=x3[s(406)](r??{}),a=dn(),c=o?n[s(636)]("?")?"&":"?":"";return ti[i(113)]+"/"+t+"/"+a[i(115)]+"/"+n+c+o}}var la=da;function ua(){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(ua=function(){return t})()}function da(e,t){var n=ua();return(da=function(r,s){return n[r-=115]})(e,t)}(function(){for(var e=E,t=da,n=ua();;)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)]())}})(),la(146),la(164),la(166);var ni=pa;function pa(e,t){var n=fa();return(pa=function(r,s){return n[r-=291]})(e,t)}(function(){for(var e=E,t=pa,n=fa();;)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),ni(294),E(779),ni(305),ni(296),ni(315);function fa(){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(fa=function(){return t})()}function ha(){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(ha=function(){return t})()}function ma(e,t){const n=ha();return(ma=function(r,s){return n[r-=254]})(e,t)}(function(){var e=E;const t=ma,n=ha();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 uf=function(e){var t=E;const n=ma,r=document[t(414)]||document[n(259)];if(!r)throw new Xs(Qe[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=E;const t=ga,n=ba();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 ri=function(e,t){const n=ga,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,uf(r)};function ga(e,t){const n=ba();return(ga=function(r,s){return n[r-=125]})(e,t)}function ba(){var e=E;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(ba=function(){return t})()}function ya(){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(ya=function(){return t})()}function pn(e,t){var n=ya();return(pn=function(r,s){return n[r-=379]})(e,t)}(function(){for(var e=E,t=pn,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=E,t=pn;function n(s){var i=qe,o=pn,a=this;this[i(203)]=function(c){var l,u=i,d=pn;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=pn,(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=pn;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 tt=wa;function wa(e,t){var n=va();return(wa=function(r,s){return n[r-=110]})(e,t)}function va(){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(va=function(){return t})()}(function(){for(var e=E,t=wa,n=va();;)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),tt(121),E(700),E(600),tt(113),tt(126),tt(116),tt(118),tt(110),tt(111),tt(120),tt(128),tt(125),tt(127),tt(130);var _a=Sa;function Sa(e,t){var n=Ca();return(Sa=function(r,s){return n[r-=258]})(e,t)}function Ca(){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(Ca=function(){return t})()}function Ea(){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(Ea=function(){return t})()}function df(e,t){var n=Ea();return(df=function(r,s){return n[r-=123]})(e,t)}function pf(e,t){var n=xa();return(pf=function(r,s){return n[r-=435]})(e,t)}function xa(){var e=E,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(xa=function(){return t})()}function Ia(){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(Ia=function(){return t})()}function ff(e,t){var n=Ia();return(ff=function(r,s){return n[r-=147]})(e,t)}function hf(e,t){var n=Ta();return(hf=function(r,s){return n[r-=398]})(e,t)}function Ta(){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(Ta=function(){return t})()}function Ra(){var e=E,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(Ra=function(){return t})()}function mf(e,t){var n=Ra();return(mf=function(r,s){return n[r-=484]})(e,t)}function Aa(e,t){var n=ka();return(Aa=function(r,s){return n[r-=236]})(e,t)}function ka(){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(ka=function(){return t})()}(function(){for(var e=E,t=Sa,n=Ca();;)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[_a(275)],String[_a(272)],Object[_a(273)],function(){for(var e=E,t=df,n=Ea();;)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=pf,n=xa();;)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=ff,n=Ia();;)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=hf,n=Ta();;)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=mf,n=Ra();;)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=Aa,n=ka();;)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 A3=Oa;function Oa(e,t){var n=Pa();return(Oa=function(r,s){return n[r-=373]})(e,t)}function Pa(){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(Pa=function(){return t})()}function La(){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(La=function(){return t})()}function gf(e,t){var n=La();return(gf=function(r,s){return n[r-=484]})(e,t)}function bf(e,t){var n=Na();return(bf=function(r,s){return n[r-=106]})(e,t)}function Na(){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(Na=function(){return t})()}(function(){for(var e=E,t=Oa,n=Pa();;)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)]())}})(),A3(387),function(){for(var e=E,t=gf,n=La();;)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=bf,n=Na();;)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 yf=Da;function Ma(){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(Ma=function(){return t})()}(function(){for(var e=E,t=Da,n=Ma();;)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 Da(e,t){var n=Ma();return(Da=function(r,s){return n[r-=236]})(e,t)}function wf(e,t){var n=Fa();return(wf=function(r,s){return n[r-=142]})(e,t)}function Fa(){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(Fa=function(){return t})()}function Ba(){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(Ba=function(){return t})()}function vf(e,t){var n=Ba();return(vf=function(r,s){return n[r-=250]})(e,t)}Object[Aa(245)](null),yf(246),E(408),yf(244),function(){for(var e=E,t=wf,n=Fa();;)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=vf,n=Ba();;)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 J=Va;function Ua(){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(Ua=function(){return t})()}function _f(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=Va,n=Ua();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 $a{static[J(241)](t,n=!1){const r=J;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[E(429)](t,n=!1){var r=E;const s=J;return n?this[s(244)](t)[s(233)](/ /g," "):t[r(429)]()}static[E(741)](t){const n=J;return this[n(249)](n(241))(t)}static[J(234)](t){const n=J;return this[n(249)](n(220))(t)}static[J(225)](t){var n=E;const r=J;return this[r(239)](t)[n(527)]((s,i)=>i===0?s[n(429)]():this[r(222)](s[r(220)]()))[r(253)]("")}static[J(229)](t){var n=E;const r=J;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[J(243)](t){const n=J;return this[n(239)](t)[n(253)]("-")}static[E(761)](t){const n=J;return this[E(410)](t)[n(253)]("_")}static[J(245)](t){return this[J(244)](t).replace(/ /g,".")}static[J(221)](t){const n=J;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=J;return this[n(244)](t)[n(233)](/ /g,"-")}static[J(237)](t){return this[J(239)](t)}static[J(239)](t){const n=J;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=J;return this[r(239)](t)[n(527)](s=>s[r(220)]())[r(253)](" ")}static[J(222)](t){const n=J;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=J;return this[E(410)](t)[n(250)](r=>this[n(222)](r))[n(253)](" ")}}function Va(e,t){const n=Ua();return(Va=function(r,s){return n[r-=220]})(e,t)}_f($a,E(748),(e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:s=J(223)}={splitChar:" ",joinChar:" ",to:J(223)})=>{const i=J,o=e!==void 0?e[i(226)]():"";return o?t?$a[i(235)](o):o[i(251)](n).map(a=>{var c=qe;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):""}),_f($a,J(249),e=>t=>{var n=E;const r=J;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 k3=za;function za(e,t){const n=Ha();return(za=function(r,s){return n[r-=328]})(e,t)}function qe(e,t){var n=Uo();return(qe=function(r,s){return n[r-=141]})(e,t)}function Ha(){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(Ha=function(){return t})()}(function(){var e=E;const t=za,n=Ha();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),k3(332);function ja(){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(ja=function(){return t})()}function Sf(e,t){const n=ja();return(Sf=function(r,s){return n[r-=199]})(e,t)}function Cf(e,t){const n=Wa();return(Cf=function(r,s){return n[r-=310]})(e,t)}function Wa(){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(Wa=function(){return t})()}function Ef(e,t){const n=qa();return(Ef=function(r,s){return n[r-=245]})(e,t)}function qa(){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(qa=function(){return t})()}function Ga(){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(Ga=function(){return t})()}function xf(e,t){const n=Ga();return(xf=function(r,s){return n[r-=199]})(e,t)}function Ka(){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(Ka=function(){return t})()}function If(e,t){const n=Ka();return(If=function(r,s){return n[r-=482]})(e,t)}function Ya(e,t){const n=Za();return(Ya=function(r,s){return n[r-=252]})(e,t)}function Za(){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(Za=function(){return t})()}(function(){var e=E;const t=Sf,n=ja();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=Cf,n=Wa();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=Ef,n=qa();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=xf,n=Ga();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=If,n=Ka();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=Ya,n=Za();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=Ja,n=Xa();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 Ja(e,t){const n=Xa();return(Ja=function(r,s){return n[r-=382]})(e,t)}function Xa(){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(Xa=function(){return t})()}function Qa(e,t){const n=ec();return(Qa=function(r,s){return n[r-=188]})(e,t)}function ec(){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(ec=function(){return t})()}(function(){var e=E;const t=Qa,n=ec();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 si=tc;function tc(e,t){const n=nc();return(tc=function(r,s){return n[r-=135]})(e,t)}(function(){var e=E;const t=tc,n=nc();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 O3={environment:e=>typeof e===si(146)&&/^(sandbox|production)$/[E(690)](e),version:e=>e===si(144)||typeof e===si(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[si(135)](e)},P3=e=>{var t;((n,r)=>{var s=E;const i=Qa;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 Xs(Qe[i(201)],a,!0));if(o[i(198)]){const[a]=o;throw a}}})(O3,e),(t=e)&&(sa=Object.assign({},sa,t))};function nc(){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(nc=function(){return t})()}function rc(){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(rc=function(){return t})()}(function(){var e=E;const t=sc,n=rc();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 sc(e,t){const n=rc();return(sc=function(r,s){return n[r-=266]})(e,t)}function ic(){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(ic=function(){return t})()}function Tf(e,t){const n=ic();return(Tf=function(r,s){return n[r-=169]})(e,t)}function Rf(e,t){var n=oc();return(Rf=function(r,s){return n[r-=337]})(e,t)}function oc(){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(oc=function(){return t})()}function ac(){var e=E,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return(ac=function(){return t})()}function Af(e,t){var n=ac();return(Af=function(r,s){return n[r-=171]})(e,t)}function cc(){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(cc=function(){return e})()}var ii,Ht,nt,kf,Ge,jt,Of,Pf,oi,Lf,lc,ai;function ci(e,t){var n=cc();return(ci=function(r,s){return n[r-=335]})(e,t)}function uc(e,t){var n=dc();return(uc=function(r,s){return n[r-=341]})(e,t)}function dc(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(dc=function(){return e})()}function pc(e,t){var n=fc();return(pc=function(r,s){return n[r-=235]})(e,t)}function fc(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(fc=function(){return e})()}function hc(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(hc=function(){return e})()}function Nf(e,t){var n=hc();return(Nf=function(r,s){return n[r-=366]})(e,t)}function li(e,t){const n=mc();return(li=function(r,s){return n[r-=152]})(e,t)}(function(){var e=E;const t=Tf,n=ic();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=Rf,n=oc();;)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=Af,n=ac();;)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=ci,t=cc();;)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())}}(),(Ht=ii||(ii={}))[(nt=ci)(354)]="REQUIRED",Ht[nt(341)]=nt(341),Ht[nt(337)]="UNABLE_TO_FIND",Ht.NOT_LOADED=nt(338),Ht[nt(342)]=nt(342),Ht.HTTP=nt(344),Ht[nt(348)]=nt(348),Ht[nt(343)]=nt(343),Ge=kf||(kf={}),jt=ci,Ge[Ge.OK=200]="OK",Ge[Ge[jt(355)]=400]=jt(355),Ge[Ge[jt(335)]=404]=jt(335),Ge[Ge.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",Ge[Ge[jt(353)]=408]=jt(353),Ge[Ge.UNAUTHORIZED=401]=jt(345),function(){for(var e=uc,t=dc();;)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())}}(),(Pf=Of||(Of={}))[(oi=uc)(349)]=oi(342),Pf[oi(352)]=oi(341),function(){for(var e=pc,t=fc();;)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())}}(),lc=Lf||(Lf={}),ai=pc,lc.PRODUCTION=ai(240),lc[ai(235)]=ai(247),function(){for(var e=Nf,t=hc();;)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=li,t=mc();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 L3=()=>new Promise((e,t)=>{const n=li;if(((r=ti[E(172)])=>{const s=sc;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=li,i=document.createElement(s(161));return i.src=ti.getFullCdn(s(156),s(163)),uf(i),i})();return r.onload=()=>{const s=n;window[s(153)]?e(window.APTokenizer):t(new Xs(ii[s(167)],s(160),!0))},void(r[n(162)]=()=>t(new Xs(ii[n(169)],"SCRIPT",!0)))}});function mc(){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(mc=function(){return e})()}var gc=kt;function Mf(e,t,n,r,s,i,o){var a=kt;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=kt,t=bc();;)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=Ja;ri(t(385),Yn[t(395)][t(390)][dn()[t(387)]]),ri(t(385),Yn[t(395)][t(396)][dn()[t(387)]])})(),(()=>{var t=E;const n=Ya;ri(n(263),Yn[n(255)][n(259)][dn()[n(264)]]),ri(n(263),Yn[n(255)][t(363)][dn()[n(264)]])})())});const N3=(Df=function*(e){P3(e);const t={initRevealer:(n=e)=>{var r,s=kt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(307)](n)},initCollector:(n=e)=>{var r,s=kt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(289)](n)}};return new Promise((n,r)=>{var s=kt;typeof window!==s(299)?window[s(291)]?n(t):L3()[s(303)](()=>{n(t)})[s(296)](i=>{r(i)}):r(s(290))})},Ff=function(){var e=this,t=arguments;return new Promise(function(n,r){var s=Df[kt(309)](e,t);function i(a){Mf(s,n,r,i,o,"next",a)}function o(a){Mf(s,n,r,i,o,"throw",a)}i(void 0)})},function(e){return Ff[kt(309)](this,arguments)});var Df,Ff;function kt(e,t){var n=bc();return(kt=function(r,s){return n[r-=289]})(e,t)}function bc(){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(bc=function(){return e})()}const M3="v1.1.3";class D3{constructor(t,n){_(this,"collector");_(this,"form");_(this,"fields");_(this,"callback");this.fields=t,this.callback=n}async init(t){try{const n=await N3({environment:fe.getEnvironment(),version:M3});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 Ys.getPciToken({userId:t});return this.form.accessToken=s,await new Promise((i,o)=>{this.form.submit(a=>{const c={paymentData:{cardNumberTkn:a.card_number.value,cvcTkn:a.card_cvc.value},visualData:{expirationDate:a.card_exp.value,firstSixDigits:a.card_number.details.bin.substring(0,6),holderName:a.card_holder.value,lastFourDigits:a.card_number.details.lastFour,type:a.card_number.details.brand||"unknown"}};n(c),i()},()=>{r(),o(new Error("generic_error"))})})}catch{return r(),Promise.reject(new Error("generic_error"))}}unmount(){var t;(t=this.form)==null||t.tearDown()}}var Bf=(e=>(e.CREATING="CREATING",e.PENDING="PENDING",e.APPROVED="APPROVED",e.EXPIRED="EXPIRED",e.FAILED="FAILED",e))(Bf||{});const ui={fontSize:"16px",lineHeight:"24px"},F3=(e,{error:t=!1,disabled:n=!1})=>W`
|
|
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
|
+
`).forEach(s=>{const i=R0(s)||O0(s)||N0(s)||F0(s);i&&(!i.func&&i.line&&(i.func=kr),t.push(i))}),{message:Pa(e,"message"),name:Pa(e,"name"),stack:t}}const ed="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Dn="(?::(\\d+))",A0=new RegExp(`^\\s*at (.*?) ?\\(${ed}${Dn}?${Dn}?\\)?\\s*$`,"i"),k0=new RegExp(`\\((\\S*)${Dn}${Dn}\\)`);function R0(e){const t=A0.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,s=k0.exec(t[2]);return r&&s&&(t[2]=s[1],t[3]=s[2],t[4]=s[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||kr,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const P0=new RegExp(`^\\s*at ?${ed}${Dn}?${Dn}??\\s*$`,"i");function O0(e){const t=P0.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:kr,line:t[2]?+t[2]:void 0,url:t[1]}}const L0=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function N0(e){const t=L0.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||kr,line:+t[3],url:t[2]}}const M0=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,D0=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function F0(e){const t=M0.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=D0.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]||kr,line:t[4]?+t[4]:void 0,url:t[3]}}function Pa(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function B0(e,t,n,r){const s=[{url:t,column:r,line:n}],{name:i,message:o}=$0(e);return{name:i,message:o,stack:s}}const U0=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function $0(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=U0.exec(e)),{name:t,message:n}}function Vs(e){const n=new Error(e);n.name="HandlingStack";let r;return nn(()=>{const s=jt(n);s.stack=s.stack.slice(2),r=Fn(s)}),r}function Fn(e){let t=td(e);return e.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,s=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",i=n.line?`:${n.line}`:"",o=n.line&&n.column?`:${n.column}`:"";t+=`
|
|
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
|
+
`);g&&f({data:g,bytesCount:Lu(g)})}else p&&e.write(e.isEmpty?p:`
|
|
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
|
+
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&v4[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Cf=Symbol("internals");function zr(e){return e&&String(e).trim().toLowerCase()}function oi(e){return e===!1||e==null?e:y.isArray(e)?e.map(oi):String(e)}function _4(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 C4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function bc(e,t,n,r,s){if(y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!y.isString(t)){if(y.isString(r))return t.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(t)}}function E4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function x4(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let He=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,c,l){const u=zr(c);if(!u)throw new Error("header name must be a non-empty string");const d=y.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||c]=oi(a))}const o=(a,c)=>y.forEach(a,(l,u)=>i(l,u,c));if(y.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(y.isString(t)&&(t=t.trim())&&!C4(t))o(S4(t),n);else if(y.isObject(t)&&y.isIterable(t)){let a={},c,l;for(const u of t){if(!y.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[l=u[0]]=(c=a[l])?y.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=zr(t),t){const r=y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return _4(s);if(y.isFunction(n))return n.call(this,s,r);if(y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zr(t),t){const r=y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||bc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=zr(o),o){const a=y.findKey(r,o);a&&(!n||bc(r,r[a],a,n))&&(delete r[a],s=!0)}}return y.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||bc(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return y.forEach(this,(s,i)=>{const o=y.findKey(r,i);if(o){n[o]=oi(s),delete n[i];return}const a=t?E4(i):String(i).trim();a!==i&&delete n[i],n[a]=oi(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&y.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(`
|
|
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
|
+
`+o.map(Ff).join(`
|
|
550
|
+
`):" "+Ff(o[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:wc};function vc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xn(null,e)}function Uf(e){return vc(e),e.headers=He.from(e.headers),e.data=yc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bf.getAdapter(e.adapter||Vr.adapter,e)(e).then(function(r){return vc(e),r.data=yc.call(e,e.transformResponse,r),r.headers=He.from(r.headers),r},function(r){return Ef(r)||(vc(e),r&&r.response&&(r.response.data=yc.call(e,e.transformResponse,r.response),r.response.headers=He.from(r.response.headers))),Promise.reject(r)})}const $f="1.12.2",li={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{li[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vf={};li.transitional=function(t,n,r){function s(i,o){return"[Axios v"+$f+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new U(s(o," has been removed"+(n?" in "+n:"")),U.ERR_DEPRECATED);return n&&!Vf[o]&&(Vf[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}},li.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function z4(e,t,n){if(typeof e!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],c=a===void 0||o(a,i,e);if(c!==!0)throw new U("option "+i+" must be "+c,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+i,U.ERR_BAD_OPTION)}}const ui={assertOptions:z4,validators:li},vt=ui.validators;let gn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vf,response:new vf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
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`
|
|
528
552
|
display: flex;
|
|
529
553
|
flex-direction: column;
|
|
530
554
|
gap: 12px;
|
|
@@ -535,7 +559,7 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
535
559
|
justify-content: center;
|
|
536
560
|
align-items: center;
|
|
537
561
|
width: 100%;
|
|
538
|
-
gap:
|
|
562
|
+
gap: 16px;
|
|
539
563
|
min-height: 250px;
|
|
540
564
|
}
|
|
541
565
|
|
|
@@ -553,6 +577,11 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
553
577
|
width: 100%;
|
|
554
578
|
}
|
|
555
579
|
|
|
580
|
+
.center-row {
|
|
581
|
+
display: flex;
|
|
582
|
+
justify-content: center;
|
|
583
|
+
}
|
|
584
|
+
|
|
556
585
|
& iframe {
|
|
557
586
|
width: 100%;
|
|
558
587
|
height: 100%;
|
|
@@ -569,10 +598,10 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
569
598
|
|
|
570
599
|
caret-color: ${e.textColor};
|
|
571
600
|
|
|
572
|
-
color: ${
|
|
573
|
-
border-radius: ${
|
|
574
|
-
background-color: ${
|
|
575
|
-
border: ${
|
|
601
|
+
color: ${X().textColor};
|
|
602
|
+
border-radius: ${X().borderRadius}px;
|
|
603
|
+
background-color: ${X().backgroundColor};
|
|
604
|
+
border: ${X().borderWidth}px solid ${X().borderColor};
|
|
576
605
|
|
|
577
606
|
:hover {
|
|
578
607
|
background-color: ${t||n?void 0:e.input.focus.backgroundColor};
|
|
@@ -582,22 +611,9 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
582
611
|
border-radius: ${t||n?void 0:e.input.focus.borderRadius}px;
|
|
583
612
|
}
|
|
584
613
|
}
|
|
585
|
-
|
|
586
|
-
& .ap-form-input-focused {
|
|
587
|
-
border-radius: ${j(!1,!1,!0).borderRadius}px;
|
|
588
|
-
background-color: ${j(!1,!1,!0).backgroundColor};
|
|
589
|
-
border: ${j(!1,!1,!0).borderWidth}px solid
|
|
590
|
-
${j(!1,!1,!0).borderColor};
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
& .ap-form-input-invalid {
|
|
594
|
-
border-radius: ${j(!0).borderRadius}px;
|
|
595
|
-
background-color: ${j(!0).backgroundColor};
|
|
596
|
-
border: ${j(!0).borderWidth}px solid ${j(!0).borderColor};
|
|
597
|
-
}
|
|
598
|
-
`,B3=()=>W`
|
|
614
|
+
`,Z4=()=>j`
|
|
599
615
|
width: 100%;
|
|
600
|
-
`;class
|
|
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`
|
|
601
617
|
background-color: ${e.backgroundColor};
|
|
602
618
|
|
|
603
619
|
display: flex;
|
|
@@ -618,21 +634,14 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
618
634
|
gap: 8px;
|
|
619
635
|
min-height: 250px;
|
|
620
636
|
}
|
|
621
|
-
`;class z3 extends te{constructor(n){super({tag:"div",styles:s=>V3(s)});_(this,"loadingWrapper");_(this,"componentProps");_(this,"methodCode");if(this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="EC",!n.config.userId){const s="AstroPay Payments Library: Missing config for CARD payment";console.error(s),this.element.innerHTML="";const i=new z({text:s,size:V.getStyles().messages.error.textSize,color:V.getStyles().messages.error.textColor}).element;this.element.append(i);return}ct.registerComponent(this),fe.setCardConfig(n.config),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:V.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),Ce.trackEvent("ap_cl_astropay_card_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,order:a}=this.componentProps,c={country:o,currency:i,amount:s,order:a,methodCode:this.methodCode},l=await Ke.postCreatePayment(c,"astropay_payment");this.renderAstroPayCardMethod(l)}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()}}renderAstroPayCardMethod(n){var s,i,o;this.element.innerHTML="";const r=(s=n.paymentMethods)==null?void 0:s.find(a=>a.enabled&&a.code===this.methodCode);if(r){const a=new Uf({paymentExternalId:n.paymentExternalId,paymentMethod:r,...this.componentProps}).element;this.element.append(a)}else(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i),this.showErrorMessage(H.translate("generic_error"))}showErrorMessage(n){this.element.innerHTML="";const r=new z({text:n,size:V.getStyles().messages.error.textSize,color:V.getStyles().messages.error.textColor}).element;this.element.append(r)}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}const H3=e=>W`
|
|
622
|
-
display: flex;
|
|
623
|
-
align-items: center;
|
|
624
|
-
gap: 10px;
|
|
625
|
-
width: 100%;
|
|
626
637
|
|
|
627
|
-
.
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
border-top-style: ${e.divider.variant};
|
|
633
|
-
margin: 0;
|
|
638
|
+
.payment-success-content {
|
|
639
|
+
display: flex;
|
|
640
|
+
flex-direction: column;
|
|
641
|
+
align-items: center;
|
|
642
|
+
gap: 8px;
|
|
634
643
|
}
|
|
635
|
-
`;class
|
|
644
|
+
`;class ev extends se{constructor(n){super({tag:"div",styles:s=>Q4(s)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode=st.DEBIT_CARD,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_card_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,order:a}=this.componentProps,c={country:o,currency:i,amount:s,order:a,methodCode:this.methodCode},l=await Ie.postCreatePayment(c,"card_payment");this.renderAstroPayCardMethod(l)}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()}}renderAstroPayCardMethod(n){var s,i,o;this.element.innerHTML="";const r=(s=n.paymentMethods)==null?void 0:s.find(a=>a.enabled&&Kf.includes(a.code));if(r){const a=new Gf({...this.componentProps,paymentExternalId:n.paymentExternalId,paymentMethod:r,onSuccess:c=>this.showSuccessContent(c)}).element;this.element.append(a)}else(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i),this.showErrorMessage(V.translate("generic_error"))}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)}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)}}class tv extends se{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 nv=()=>j`
|
|
636
645
|
.accordion-header {
|
|
637
646
|
display: flex;
|
|
638
647
|
justify-content: flex-start;
|
|
@@ -672,7 +681,7 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
672
681
|
height: auto;
|
|
673
682
|
padding: 12px 0;
|
|
674
683
|
}
|
|
675
|
-
`;class
|
|
684
|
+
`;class rv extends se{constructor({icon:n,title:r,content:s,isOpen:i=!1,auxImage:o,onClick:a,onClose:c}){super({tag:"div",styles:()=>nv()});S(this,"isOpen");S(this,"content");S(this,"onClick");S(this,"onClose");S(this,"accordionContent",null);S(this,"arrowWrapper");this.isOpen=i,this.content=s,this.onClick=a,this.onClose=c;const l=document.createElement("div");l.classList.add("accordion-header"),l.addEventListener("click",this.handleClick.bind(this));const u=new qe({name:n,size:16,color:z.getStyles().textPrimaryColor}).element,d=new H({variant:"div",size:16,weight:500,text:r}).element;l.append(u,d);const p=document.createElement("div");if(p.classList.add("actions-wrapper"),o&&o.length){const f=document.createElement("div");f.classList.add("aux-icons-wrapper"),o.forEach(m=>{const g=new qe({name:m,size:24}).element;f.append(g)}),p.append(f)}this.arrowWrapper=document.createElement("span"),this.arrowWrapper.classList.add("arrow-wrapper");const h=new qe({name:"arrow_down_line",size:24,color:z.getStyles().textPrimaryColor}).element;this.arrowWrapper.append(h),p.append(this.arrowWrapper),l.append(p),this.element.append(l),this.isOpen&&(this.renderContent(),this.arrowWrapper.classList.add("rotated"))}handleClick(){this.onClick()}toggleContent(){this.isOpen||(this.renderContent(),this.arrowWrapper.classList.add("rotated")),this.isOpen=!0}destroyContent(){var n,r;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 tv({content:this.content}),this.element.append(this.accordionContent.element))}}class sv extends se{constructor({items:n,onChangeContent:r}){super({tag:"div"});S(this,"openIndex",null);S(this,"accordionItems",[]);S(this,"onChangeContent");this.accordionItems=n.map((s,i)=>{const o=new rv({icon:s.icon,title:s.title,content:s.content,isOpen:this.openIndex===i,auxImage:s.auxImage,onClick:()=>this.handleItemClick(i),onClose:s.onClose});if(this.element.appendChild(o.element),i!==n.length-1){const a=new ki({}).element;a.style.padding="4px 0",this.element.appendChild(a)}return o}),this.onChangeContent=r}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 it=({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}},iv=e=>{switch(e){case"end":return"flex-end";case"center":return"center";case"space-between":return"space-between";case"start":default:return"flex-start"}},ov=({variant:e="default",isFullWidth:t,align:n})=>j`
|
|
676
685
|
box-sizing: border-box;
|
|
677
686
|
display: flex;
|
|
678
687
|
align-items: center;
|
|
@@ -680,31 +689,31 @@ ${p}`),e.finish(m=>{f($u(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
680
689
|
flex-wrap: wrap;
|
|
681
690
|
|
|
682
691
|
width: ${t?"100%":"fit-content"};
|
|
683
|
-
padding: ${typeof
|
|
692
|
+
padding: ${typeof it({variant:e}).padding=="number"?`${it({variant:e}).padding}px`:it({variant:e}).padding};
|
|
684
693
|
|
|
685
|
-
background-color: ${
|
|
686
|
-
border-radius: ${
|
|
694
|
+
background-color: ${it({variant:e}).backgroundColor};
|
|
695
|
+
border-radius: ${it({variant:e}).borderRadius}px;
|
|
687
696
|
|
|
688
|
-
border: ${
|
|
689
|
-
${
|
|
697
|
+
border: ${it({variant:e}).borderWidth}px
|
|
698
|
+
${it({variant:e}).borderStyle} ${it({variant:e}).borderColor};
|
|
690
699
|
|
|
691
|
-
justify-content: ${
|
|
700
|
+
justify-content: ${iv(n)};
|
|
692
701
|
|
|
693
702
|
.badge-content {
|
|
694
703
|
display: flex;
|
|
695
704
|
align-items: center;
|
|
696
705
|
gap: 4px;
|
|
697
706
|
flex-wrap: nowrap;
|
|
698
|
-
color: ${
|
|
707
|
+
color: ${it({variant:e}).textColor};
|
|
699
708
|
}
|
|
700
|
-
`;class
|
|
701
|
-
]))+`;
|
|
702
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),r.put(i,13)}},
|
|
703
|
-
Suggested mode is: `+t.toString(C));switch(w===t.KANJI&&!a.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new n(
|
|
709
|
+
`;class Cc extends se{constructor({items:t,variant:n="default",isFullWidth:r=!1,align:s="center"}){super({tag:"div",styles:()=>ov({variant:n,isFullWidth:r,align:s})}),t.forEach(({title:i,icon:o,iconLeft:a,iconRight:c})=>{const l=document.createElement("div");if(l.classList.add("badge-content"),o||a){const d=new qe({name:o||a,size:12,color:it({variant:n}).textColor}).element;l.append(d)}const u=new H({text:i,weight:500,color:it({variant:n}).textColor,align:"center"}).element;if(l.append(u),c){const d=new qe({name:c,size:12,color:it({variant:n}).textColor}).element;l.append(d)}this.element.append(l)})}}function av(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={},Ec,Yf;function cv(){return Yf||(Yf=1,Ec=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ec}var xc={},Kt={},Zf;function bn(){if(Zf)return Kt;Zf=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 Kt.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},Kt.getSymbolTotalCodewords=function(r){return t[r]},Kt.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Kt.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Kt.isKanjiModeEnabled=function(){return typeof e<"u"},Kt.toSJIS=function(r){return e(r)},Kt}var Ic={},Jf;function Tc(){return Jf||(Jf=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,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}})(Ic)),Ic}var Ac,Xf;function lv(){if(Xf)return Ac;Xf=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++}},Ac=e,Ac}var kc,Qf;function uv(){if(Qf)return kc;Qf=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,s){const i=t*this.size+n;this.data[i]=r,s&&(this.reservedBit[i]=!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]},kc=e,kc}var Rc={},eh;function dv(){return eh||(eh=1,(function(e){const t=bn().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,i=t(r),o=i===145?26:Math.ceil((i-13)/(2*s-2))*2,a=[i-7];for(let c=1;c<s-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},e.getPositions=function(r){const s=[],i=e.getRowColCoords(r),o=i.length;for(let a=0;a<o;a++)for(let c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||s.push([i[a],i[c]]);return s}})(Rc)),Rc}var Pc={},th;function pv(){if(th)return Pc;th=1;const e=bn().getSymbolSize,t=7;return Pc.getPositions=function(r){const s=e(r);return[[0,0],[s-t,0],[0,s-t]]},Pc}var Oc={},nh;function fv(){return nh||(nh=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(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const i=s.size;let o=0,a=0,c=0,l=null,u=null;for(let d=0;d<i;d++){a=c=0,l=u=null;for(let p=0;p<i;p++){let h=s.get(d,p);h===l?a++:(a>=5&&(o+=t.N1+(a-5)),l=h,a=1),h=s.get(p,d),h===u?c++:(c>=5&&(o+=t.N1+(c-5)),u=h,c=1)}a>=5&&(o+=t.N1+(a-5)),c>=5&&(o+=t.N1+(c-5))}return o},e.getPenaltyN2=function(s){const i=s.size;let o=0;for(let a=0;a<i-1;a++)for(let c=0;c<i-1;c++){const l=s.get(a,c)+s.get(a,c+1)+s.get(a+1,c)+s.get(a+1,c+1);(l===4||l===0)&&o++}return o*t.N2},e.getPenaltyN3=function(s){const i=s.size;let o=0,a=0,c=0;for(let l=0;l<i;l++){a=c=0;for(let u=0;u<i;u++)a=a<<1&2047|s.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|s.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*t.N3},e.getPenaltyN4=function(s){let i=0;const o=s.data.length;for(let c=0;c<o;c++)i+=s.data[c];return Math.abs(Math.ceil(i*100/o/5)-10)*t.N4};function n(r,s,i){switch(r){case e.Patterns.PATTERN000:return(s+i)%2===0;case e.Patterns.PATTERN001:return s%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(s+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return s*i%2+s*i%3===0;case e.Patterns.PATTERN110:return(s*i%2+s*i%3)%2===0;case e.Patterns.PATTERN111:return(s*i%3+(s+i)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(s,i){const o=i.size;for(let a=0;a<o;a++)for(let c=0;c<o;c++)i.isReserved(c,a)||i.xor(c,a,n(s,c,a))},e.getBestMask=function(s,i){const o=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let l=0;l<o;l++){i(l),e.applyMask(l,s);const u=e.getPenaltyN1(s)+e.getPenaltyN2(s)+e.getPenaltyN3(s)+e.getPenaltyN4(s);e.applyMask(l,s),u<c&&(c=u,a=l)}return a}})(Oc)),Oc}var fi={},rh;function sh(){if(rh)return fi;rh=1;const e=Tc(),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 fi.getBlocksCount=function(s,i){switch(i){case e.L:return t[(s-1)*4+0];case e.M:return t[(s-1)*4+1];case e.Q:return t[(s-1)*4+2];case e.H:return t[(s-1)*4+3];default:return}},fi.getTotalCodewordsCount=function(s,i){switch(i){case e.L:return n[(s-1)*4+0];case e.M:return n[(s-1)*4+1];case e.Q:return n[(s-1)*4+2];case e.H:return n[(s-1)*4+3];default:return}},fi}var Lc={},jr={},ih;function hv(){if(ih)return jr;ih=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let s=0;s<255;s++)e[s]=r,t[r]=s,r<<=1,r&256&&(r^=285);for(let s=255;s<512;s++)e[s]=e[s-255]})(),jr.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},jr.exp=function(r){return e[r]},jr.mul=function(r,s){return r===0||s===0?0:e[t[r]+t[s]]},jr}var oh;function mv(){return oh||(oh=1,(function(e){const t=hv();e.mul=function(r,s){const i=new Uint8Array(r.length+s.length-1);for(let o=0;o<r.length;o++)for(let a=0;a<s.length;a++)i[o+a]^=t.mul(r[o],s[a]);return i},e.mod=function(r,s){let i=new Uint8Array(r);for(;i.length-s.length>=0;){const o=i[0];for(let c=0;c<s.length;c++)i[c]^=t.mul(s[c],o);let a=0;for(;a<i.length&&i[a]===0;)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let i=0;i<r;i++)s=e.mul(s,new Uint8Array([1,t.exp(i)]));return s}})(Lc)),Lc}var Nc,ah;function gv(){if(ah)return Nc;ah=1;const e=mv();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 s=new Uint8Array(r.length+this.degree);s.set(r);const i=e.mod(s,this.genPoly),o=this.degree-i.length;if(o>0){const a=new Uint8Array(this.degree);return a.set(i,o),a}return i},Nc=t,Nc}var Mc={},Dc={},Fc={},ch;function lh(){return ch||(ch=1,Fc.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Fc}var St={},uh;function dh(){if(uh)return St;uh=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
|
|
710
|
+
]))+`;St.KANJI=new RegExp(n,"g"),St.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),St.BYTE=new RegExp(r,"g"),St.NUMERIC=new RegExp(e,"g"),St.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),i=new RegExp("^"+e+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return St.testKanji=function(c){return s.test(c)},St.testNumeric=function(c){return i.test(c)},St.testAlphanumeric=function(c){return o.test(c)},St}var ph;function yn(){return ph||(ph=1,(function(e){const t=lh(),n=dh();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(i,o){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?i.ccBits[0]:o<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return n.testNumeric(i)?e.NUMERIC:n.testAlphanumeric(i)?e.ALPHANUMERIC:n.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.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: "+s)}}e.from=function(i,o){if(e.isValid(i))return i;try{return r(i)}catch{return o}}})(Dc)),Dc}var fh;function bv(){return fh||(fh=1,(function(e){const t=bn(),n=sh(),r=Tc(),s=yn(),i=lh(),o=7973,a=t.getBCHDigit(o);function c(p,h,f){for(let m=1;m<=40;m++)if(h<=e.getCapacity(m,f,p))return m}function l(p,h){return s.getCharCountIndicator(p,h)+4}function u(p,h){let f=0;return p.forEach(function(m){const g=l(m.mode,h);f+=g+m.getBitsLength()}),f}function d(p,h){for(let f=1;f<=40;f++)if(u(p,f)<=e.getCapacity(f,h,s.MIXED))return f}e.from=function(h,f){return i.isValid(h)?parseInt(h,10):f},e.getCapacity=function(h,f,m){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const g=t.getSymbolTotalCodewords(h),_=n.getTotalCodewordsCount(h,f),x=(g-_)*8;if(m===s.MIXED)return x;const w=x-l(m,h);switch(m){case s.NUMERIC:return Math.floor(w/10*3);case s.ALPHANUMERIC:return Math.floor(w/11*2);case s.KANJI:return Math.floor(w/13);case s.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(h,f){let m;const g=r.from(f,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,g);if(h.length===0)return 1;m=h[0]}else m=h;return c(m.mode,m.getLength(),g)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");let f=h<<12;for(;t.getBCHDigit(f)-a>=0;)f^=o<<t.getBCHDigit(f)-a;return h<<12|f}})(Mc)),Mc}var Bc={},hh;function yv(){if(hh)return Bc;hh=1;const e=bn(),t=1335,n=21522,r=e.getBCHDigit(t);return Bc.getEncodedBits=function(i,o){const a=i.bit<<3|o;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},Bc}var Uc={},$c,mh;function wv(){if(mh)return $c;mh=1;const e=yn();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 s,i,o;for(s=0;s+3<=this.data.length;s+=3)i=this.data.substr(s,3),o=parseInt(i,10),r.put(o,10);const a=this.data.length-s;a>0&&(i=this.data.substr(s),o=parseInt(i,10),r.put(o,a*3+1))},$c=t,$c}var Vc,gh;function vv(){if(gh)return Vc;gh=1;const e=yn(),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(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let i;for(i=0;i+2<=this.data.length;i+=2){let o=t.indexOf(this.data[i])*45;o+=t.indexOf(this.data[i+1]),s.put(o,11)}this.data.length%2&&s.put(t.indexOf(this.data[i]),6)},Vc=n,Vc}var zc,bh;function Sv(){if(bh)return zc;bh=1;const e=yn();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,s=this.data.length;r<s;r++)n.put(this.data[r],8)},zc=t,zc}var Hc,yh;function _v(){if(yh)return Hc;yh=1;const e=yn(),t=bn();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(s){return s*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 s;for(s=0;s<this.data.length;s++){let i=t.toSJIS(this.data[s]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
|
|
711
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),r.put(i,13)}},Hc=n,Hc}var jc={exports:{}},wh;function Cv(){return wh||(wh=1,(function(e){var t={single_source_shortest_paths:function(n,r,s){var i={},o={};o[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,l,u,d,p,h,f,m,g;!a.empty();){c=a.pop(),l=c.value,d=c.cost,p=n[l]||{};for(u in p)p.hasOwnProperty(u)&&(h=p[u],f=d+h,m=o[u],g=typeof o[u]>"u",(g||m>f)&&(o[u]=f,a.push(u,f),i[u]=l))}if(typeof s<"u"&&typeof o[s]>"u"){var _=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(_)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],i=r;i;)s.push(i),n[i],i=n[i];return s.reverse(),s},find_path:function(n,r,s){var i=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(i,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(s[i]=r[i]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(jc)),jc.exports}var vh;function Ev(){return vh||(vh=1,(function(e){const t=yn(),n=wv(),r=vv(),s=Sv(),i=_v(),o=dh(),a=bn(),c=Cv();function l(_){return unescape(encodeURIComponent(_)).length}function u(_,x,w){const C=[];let N;for(;(N=_.exec(w))!==null;)C.push({data:N[0],index:N.index,mode:x,length:N[0].length});return C}function d(_){const x=u(o.NUMERIC,t.NUMERIC,_),w=u(o.ALPHANUMERIC,t.ALPHANUMERIC,_);let C,N;return a.isKanjiModeEnabled()?(C=u(o.BYTE,t.BYTE,_),N=u(o.KANJI,t.KANJI,_)):(C=u(o.BYTE_KANJI,t.BYTE,_),N=[]),x.concat(w,C,N).sort(function(b,P){return b.index-P.index}).map(function(b){return{data:b.data,mode:b.mode,length:b.length}})}function p(_,x){switch(x){case t.NUMERIC:return n.getBitsLength(_);case t.ALPHANUMERIC:return r.getBitsLength(_);case t.KANJI:return i.getBitsLength(_);case t.BYTE:return s.getBitsLength(_)}}function h(_){return _.reduce(function(x,w){const C=x.length-1>=0?x[x.length-1]:null;return C&&C.mode===w.mode?(x[x.length-1].data+=w.data,x):(x.push(w),x)},[])}function f(_){const x=[];for(let w=0;w<_.length;w++){const C=_[w];switch(C.mode){case t.NUMERIC:x.push([C,{data:C.data,mode:t.ALPHANUMERIC,length:C.length},{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.ALPHANUMERIC:x.push([C,{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.KANJI:x.push([C,{data:C.data,mode:t.BYTE,length:l(C.data)}]);break;case t.BYTE:x.push([{data:C.data,mode:t.BYTE,length:l(C.data)}])}}return x}function m(_,x){const w={},C={start:{}};let N=["start"];for(let A=0;A<_.length;A++){const b=_[A],P=[];for(let T=0;T<b.length;T++){const R=b[T],k=""+A+T;P.push(k),w[k]={node:R,lastCount:0},C[k]={};for(let O=0;O<N.length;O++){const L=N[O];w[L]&&w[L].node.mode===R.mode?(C[L][k]=p(w[L].lastCount+R.length,R.mode)-p(w[L].lastCount,R.mode),w[L].lastCount+=R.length):(w[L]&&(w[L].lastCount=R.length),C[L][k]=p(R.length,R.mode)+4+t.getCharCountIndicator(R.mode,x))}}N=P}for(let A=0;A<N.length;A++)C[N[A]].end=0;return{map:C,table:w}}function g(_,x){let w;const C=t.getBestModeForData(_);if(w=t.from(x,C),w!==t.BYTE&&w.bit<C.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(w)+`.
|
|
712
|
+
Suggested mode is: `+t.toString(C));switch(w===t.KANJI&&!a.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new n(_);case t.ALPHANUMERIC:return new r(_);case t.KANJI:return new i(_);case t.BYTE:return new s(_)}}e.fromArray=function(x){return x.reduce(function(w,C){return typeof C=="string"?w.push(g(C,null)):C.data&&w.push(g(C.data,C.mode)),w},[])},e.fromString=function(x,w){const C=d(x,a.isKanjiModeEnabled()),N=f(C),A=m(N,w),b=c.find_path(A.map,"start","end"),P=[];for(let T=1;T<b.length-1;T++)P.push(A.table[b[T]].node);return e.fromArray(h(P))},e.rawSplit=function(x){return e.fromArray(d(x,a.isKanjiModeEnabled()))}})(Uc)),Uc}var Sh;function xv(){if(Sh)return xc;Sh=1;const e=bn(),t=Tc(),n=lv(),r=uv(),s=dv(),i=pv(),o=fv(),a=sh(),c=gv(),l=bv(),u=yv(),d=yn(),p=Ev();function h(A,b){const P=A.size,T=i.getPositions(b);for(let R=0;R<T.length;R++){const k=T[R][0],O=T[R][1];for(let L=-1;L<=7;L++)if(!(k+L<=-1||P<=k+L))for(let M=-1;M<=7;M++)O+M<=-1||P<=O+M||(L>=0&&L<=6&&(M===0||M===6)||M>=0&&M<=6&&(L===0||L===6)||L>=2&&L<=4&&M>=2&&M<=4?A.set(k+L,O+M,!0,!0):A.set(k+L,O+M,!1,!0))}}function f(A){const b=A.size;for(let P=8;P<b-8;P++){const T=P%2===0;A.set(P,6,T,!0),A.set(6,P,T,!0)}}function m(A,b){const P=s.getPositions(b);for(let T=0;T<P.length;T++){const R=P[T][0],k=P[T][1];for(let O=-2;O<=2;O++)for(let L=-2;L<=2;L++)O===-2||O===2||L===-2||L===2||O===0&&L===0?A.set(R+O,k+L,!0,!0):A.set(R+O,k+L,!1,!0)}}function g(A,b){const P=A.size,T=l.getEncodedBits(b);let R,k,O;for(let L=0;L<18;L++)R=Math.floor(L/3),k=L%3+P-8-3,O=(T>>L&1)===1,A.set(R,k,O,!0),A.set(k,R,O,!0)}function _(A,b,P){const T=A.size,R=u.getEncodedBits(b,P);let k,O;for(k=0;k<15;k++)O=(R>>k&1)===1,k<6?A.set(k,8,O,!0):k<8?A.set(k+1,8,O,!0):A.set(T-15+k,8,O,!0),k<8?A.set(8,T-k-1,O,!0):k<9?A.set(8,15-k-1+1,O,!0):A.set(8,15-k-1,O,!0);A.set(T-8,8,1,!0)}function x(A,b){const P=A.size;let T=-1,R=P-1,k=7,O=0;for(let L=P-1;L>0;L-=2)for(L===6&&L--;;){for(let M=0;M<2;M++)if(!A.isReserved(R,L-M)){let ie=!1;O<b.length&&(ie=(b[O]>>>k&1)===1),A.set(R,L-M,ie),k--,k===-1&&(O++,k=7)}if(R+=T,R<0||P<=R){R-=T,T=-T;break}}}function w(A,b,P){const T=new n;P.forEach(function(M){T.put(M.mode.bit,4),T.put(M.getLength(),d.getCharCountIndicator(M.mode,A)),M.write(T)});const R=e.getSymbolTotalCodewords(A),k=a.getTotalCodewordsCount(A,b),O=(R-k)*8;for(T.getLengthInBits()+4<=O&&T.put(0,4);T.getLengthInBits()%8!==0;)T.putBit(0);const L=(O-T.getLengthInBits())/8;for(let M=0;M<L;M++)T.put(M%2?17:236,8);return C(T,A,b)}function C(A,b,P){const T=e.getSymbolTotalCodewords(b),R=a.getTotalCodewordsCount(b,P),k=T-R,O=a.getBlocksCount(b,P),L=T%O,M=O-L,ie=Math.floor(T/O),ee=Math.floor(k/O),Pe=ee+1,he=ie-ee,re=new c(he);let ae=0;const G=new Array(O),ue=new Array(O);let ge=0;const Zt=new Uint8Array(A.buffer);for(let sr=0;sr<O;sr++){const Qc=sr<M?ee:Pe;G[sr]=Zt.slice(ae,ae+Qc),ue[sr]=re.encode(G[sr]),ae+=Qc,ge=Math.max(ge,Qc)}const ce=new Uint8Array(T);let rr=0,Ot,Lt;for(Ot=0;Ot<ge;Ot++)for(Lt=0;Lt<O;Lt++)Ot<G[Lt].length&&(ce[rr++]=G[Lt][Ot]);for(Ot=0;Ot<he;Ot++)for(Lt=0;Lt<O;Lt++)ce[rr++]=ue[Lt][Ot];return ce}function N(A,b,P,T){let R;if(Array.isArray(A))R=p.fromArray(A);else if(typeof A=="string"){let ie=b;if(!ie){const ee=p.rawSplit(A);ie=l.getBestVersionForData(ee,P)}R=p.fromString(A,ie||40)}else throw new Error("Invalid data");const k=l.getBestVersionForData(R,P);if(!k)throw new Error("The amount of data is too big to be stored in a QR Code");if(!b)b=k;else if(b<k)throw new Error(`
|
|
704
713
|
The chosen QR Code version cannot contain this amount of data.
|
|
705
|
-
Minimum version required to store current data is: `+
|
|
706
|
-
`);const
|
|
707
|
-
`;return typeof a=="function"&&a(null,g),g},
|
|
714
|
+
Minimum version required to store current data is: `+k+`.
|
|
715
|
+
`);const O=w(b,P,R),L=e.getSymbolSize(b),M=new r(L);return h(M,b),f(M),m(M,b),_(M,P,0),b>=7&&g(M,b),x(M,O),isNaN(T)&&(T=o.getBestMask(M,_.bind(null,M,P))),o.applyMask(T,M),_(M,P,T),{modules:M,version:b,errorCorrectionLevel:P,maskPattern:T,segments:R}}return xc.create=function(b,P){if(typeof b>"u"||b==="")throw new Error("No input text");let T=t.M,R,k;return typeof P<"u"&&(T=t.from(P.errorCorrectionLevel,t.M),R=l.from(P.version),k=o.from(P.maskPattern),P.toSJISFunc&&e.setToSJISFunction(P.toSJISFunc)),N(b,R,T,k)},xc}var Wc={},qc={},_h;function Ch(){return _h||(_h=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(i){return[i,i]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,o=r.scale||4;return{width:i,scale:i?4:o,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const i=e.getScale(r,s);return Math.floor((r+s.margin*2)*i)},e.qrToImageData=function(r,s,i){const o=s.modules.size,a=s.modules.data,c=e.getScale(o,i),l=Math.floor((o+i.margin*2)*c),u=i.margin*c,d=[i.color.light,i.color.dark];for(let p=0;p<l;p++)for(let h=0;h<l;h++){let f=(p*l+h)*4,m=i.color.light;if(p>=u&&h>=u&&p<l-u&&h<l-u){const g=Math.floor((p-u)/c),_=Math.floor((h-u)/c);m=d[a[g*o+_]?1:0]}r[f++]=m.r,r[f++]=m.g,r[f++]=m.b,r[f]=m.a}}})(qc)),qc}var Eh;function Iv(){return Eh||(Eh=1,(function(e){const t=Ch();function n(s,i,o){s.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=o,i.width=o,i.style.height=o+"px",i.style.width=o+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,o,a){let c=a,l=o;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=r()),c=t.getOptions(c);const u=t.getImageWidth(i.modules.size,c),d=l.getContext("2d"),p=d.createImageData(u,u);return t.qrToImageData(p.data,i,c),n(d,l,u),d.putImageData(p,0,0),l},e.renderToDataURL=function(i,o,a){let c=a;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=e.render(i,o,c),u=c.type||"image/png",d=c.rendererOpts||{};return l.toDataURL(u,d.quality)}})(Wc)),Wc}var Gc={},xh;function Tv(){if(xh)return Gc;xh=1;const e=Ch();function t(s,i){const o=s.a/255,a=i+'="'+s.hex+'"';return o<1?a+" "+i+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function n(s,i,o){let a=s+i;return typeof o<"u"&&(a+=" "+o),a}function r(s,i,o){let a="",c=0,l=!1,u=0;for(let d=0;d<s.length;d++){const p=Math.floor(d%i),h=Math.floor(d/i);!p&&!l&&(l=!0),s[d]?(u++,d>0&&p>0&&s[d-1]||(a+=l?n("M",p+o,.5+h+o):n("m",c,0),c=0,l=!1),p+1<i&&s[d+1]||(a+=n("h",u),u=0)):c++}return a}return Gc.render=function(i,o,a){const c=e.getOptions(o),l=i.modules.size,u=i.modules.data,d=l+c.margin*2,p=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(u,l,c.margin)+'"/>',f='viewBox="0 0 '+d+" "+d+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+f+' shape-rendering="crispEdges">'+p+h+`</svg>
|
|
716
|
+
`;return typeof a=="function"&&a(null,g),g},Gc}var Ih;function Av(){if(Ih)return er;Ih=1;const e=cv(),t=xv(),n=Iv(),r=Tv();function s(i,o,a,c,l){const u=[].slice.call(arguments,1),d=u.length,p=typeof u[d-1]=="function";if(!p&&!e())throw new Error("Callback required as last argument");if(p){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=c=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=c,c=void 0):(l=c,c=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=c=void 0):d===2&&!o.getContext&&(c=a,a=o,o=void 0),new Promise(function(h,f){try{const m=t.create(a,c);h(i(m,o,c))}catch(m){f(m)}})}try{const h=t.create(a,c);l(null,i(h,o,c))}catch(h){l(h)}}return er.create=t.create,er.toCanvas=s.bind(null,n.render),er.toDataURL=s.bind(null,n.renderToDataURL),er.toString=s.bind(null,function(i,o,a){return r.render(i,a)}),er}var kv=Av();const Rv=av(kv),Pv=e=>j`
|
|
708
717
|
display: flex;
|
|
709
718
|
justify-content: center;
|
|
710
719
|
align-items: center;
|
|
@@ -714,7 +723,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
714
723
|
|
|
715
724
|
border: ${e.qrCode.borderWidth}px ${e.qrCode.borderStyle} ${e.qrCode.borderColor};
|
|
716
725
|
border-radius: ${e.qrCode.borderRadius}px;
|
|
717
|
-
`;class
|
|
726
|
+
`;class Th extends se{constructor({value:t,width:n=130,altText:r="QR Code"}){super({tag:"div",styles:s=>Pv(s)}),Rv.toDataURL(t,{width:n,margin:0}).then(s=>{const i=document.createElement("img");i.src=s,i.alt=r,i.width=n,this.element.append(i)}).catch(s=>{console.error("Failed to generate QR code:",s)})}}const Ov=e=>`${Le.getRuntimeConfig().RESOURCES_BUCKET}/img/flags/${e}.webp`,Lv=()=>j`
|
|
718
727
|
display: flex;
|
|
719
728
|
flex-direction: column;
|
|
720
729
|
gap: 12px;
|
|
@@ -726,7 +735,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
726
735
|
|
|
727
736
|
width: 100%;
|
|
728
737
|
}
|
|
729
|
-
`;class
|
|
738
|
+
`;class Nv extends se{constructor({availableCountries:n,onSubmit:r}){super({tag:"form",styles:()=>Lv()});S(this,"inputDialCode");S(this,"inputPhoneNumber");S(this,"btnContinue");S(this,"inputsWrapper");S(this,"onSubmit");this.onSubmit=r;const s=n.map(i=>({name:i.name,value:i.callingCode,icon:Ov(i.iso)}));this.inputsWrapper=document.createElement("div"),this.inputsWrapper.classList.add("inputs-wrapper"),this.inputDialCode=new zl({name:"country",options:s,emptyMessage:V.translate("enter_country_code"),maxWidth:"180px",showValue:!0}),this.inputPhoneNumber=new jl({name:"phone",placeholder:V.translate("enter_your_phone"),type:"tel"}),this.inputsWrapper.append(this.inputDialCode.element,this.inputPhoneNumber.element),this.btnContinue=new Dt({text:V.translate("continue"),iconRight:"arrow_right_line",isFullWidth:!0,size:"large",isDisabled:!0,isApTheme:!0,onClick:i=>{i.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(),s=r&&r.toString().length>=5,i=!!n;this.btnContinue.setDisabled(!s||!i)}handleSubmit(){const n=new FormData(this.element),r=n.get("country"),s=n.get("phone"),i=`${r}${s}`;xe.trackEvent("ap_cl_identify_user_init",{phoneNumber:i}),this.btnContinue.setLoading(!1),this.onSubmit({phoneNumber:i})}setLoading(n){this.btnContinue.setLoading(n)}setDisable(n){this.btnContinue.setDisabled(n)}}class Mv{static generate(t,n={}){return Pg(Le.getRuntimeConfig().CHECKOUT_URL,t,n).toString()}}const Dv=()=>j`
|
|
730
739
|
display: flex;
|
|
731
740
|
flex-direction: column;
|
|
732
741
|
gap: 10px;
|
|
@@ -761,7 +770,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
761
770
|
opacity: 1;
|
|
762
771
|
}
|
|
763
772
|
}
|
|
764
|
-
`;class
|
|
773
|
+
`;class Ah extends se{constructor(n){super({tag:"div",styles:()=>Dv()});S(this,"componentProps");S(this,"btnAstroPay",null);S(this,"formCountryPhone");S(this,"pushFeedbackWrapper");S(this,"pollingService",null);S(this,"updatedInitialState");S(this,"renderAPComponent",()=>{if(this.updatedInitialState){if(this.element.innerHTML="",this.btnAstroPay=new Dt({text:"AstroPay",onClick:this.handleAstroPayClick.bind(this),isFullWidth:!0,iconRight:"arrow_right_line",isApTheme:!0}),this.element.append(this.btnAstroPay.element),this.componentProps.benefits){const n=new Cc({items:this.componentProps.benefits.batch,variant:"highlight",isFullWidth:!0,align:"center"}).element;this.element.append(n)}this.updatedInitialState=!1}});this.componentProps=n,this.updatedInitialState=!0,this.renderAPComponent()}handleAstroPayClick(){var n,r;if((r=(n=this.componentProps).onClickCallback)==null||r.call(n),this.updatedInitialState=!0,kg()){this.handleMobileFlow();return}if(this.componentProps.user.hasAccount){this.handleAccountFlow();return}this.renderPhoneInput()}async fetchIdentifyUser(n,r){var s,i,o;try{const a={phoneNumber:am(n)};if((await Ie.postIdentifyUser(this.componentProps.paymentExternalId,a)).user.hasAccount){(s=this.formCountryPhone)==null||s.setDisable(!0),this.handleAccountFlow();return}r==null||r()}catch(a){const c=a;(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i);const l=new H({text:c.message,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.append(l)}}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 Nv({availableCountries:((n=this.componentProps)==null?void 0:n.countries)??[],onSubmit:r=>{this.handlePhoneNumberSubmit(r)}}),this.element.append(this.formCountryPhone.element)}generateRedirectUrl(){return Mv.generate(`checkout-payment/${this.componentProps.paymentExternalId}`,{data:tl(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 Cc({items:[{title:V.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 s=new H({text:V.translate("didnt_receive"),size:16,weight:600}).element,i=new H({text:V.translate("scan_qr_copy_link"),size:14,weight:400}).element;r.append(s,i);const o=new Th({width:100,value:this.generateRedirectUrl(),altText:V.translate("qr_code")}).element,a=new Dt({text:V.translate("copy_payment_link"),variant:"copy-to-clipboard",size:"small",iconRight:"copy_2_line",onClick:()=>{hi(this.generateRedirectUrl())}}).element;this.pushFeedbackWrapper.append(n,r,o,a),this.element.append(this.pushFeedbackWrapper)}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)}}initializePollingService(n){this.pollingService=new _c(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}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)))}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 s=new It({size:12,color:z.getStyles().textPrimaryColor}).element,i=new H({text:n,size:12}).element;r.append(s,i)}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)}showErrorMessage(n){if(!this.pushFeedbackWrapper)return;const r=new H({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()}}const Fv=e=>j`
|
|
765
774
|
background-color: ${e.backgroundColor};
|
|
766
775
|
|
|
767
776
|
display: flex;
|
|
@@ -788,14 +797,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
788
797
|
align-items: center;
|
|
789
798
|
gap: 8px;
|
|
790
799
|
}
|
|
791
|
-
|
|
792
|
-
.loading-success-callback {
|
|
793
|
-
display: flex;
|
|
794
|
-
align-items: center;
|
|
795
|
-
justify-content: center;
|
|
796
|
-
gap: 8px;
|
|
797
|
-
}
|
|
798
|
-
`,I4=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},T4=e=>W`
|
|
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`
|
|
799
801
|
display: flex;
|
|
800
802
|
flex-wrap: nowrap;
|
|
801
803
|
align-items: center;
|
|
@@ -810,7 +812,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
810
812
|
|
|
811
813
|
min-width: min-content;
|
|
812
814
|
white-space: nowrap;
|
|
813
|
-
`;class
|
|
815
|
+
`;class $v extends se{constructor(n){super({tag:"div",styles:r=>Uv(r)});S(this,"compProps");S(this,"intervalId",null);S(this,"isTimeOver",!1);this.compProps={timeoutText:V.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=Bv(this.compProps.time);if(this.element.innerHTML="",this.compProps.iconLeft){const r=new qe({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,s=this.isTimeOver?"":n,i=new H({variant:"div",text:r,size:14,weight:400,lineHeight:21,color:z.getStyles().timer.textColor,align:"center"}).element,o=new H({variant:"div",text:s,size:14,weight:600,lineHeight:21,color:z.getStyles().timer.textColor,align:"center"}).element;if(o.style.fontFamily="monospace",this.element.append(i,o),this.compProps.iconRight){const a=new qe({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 Vv=e=>j`
|
|
814
816
|
display: flex;
|
|
815
817
|
flex-direction: column;
|
|
816
818
|
gap: 10px;
|
|
@@ -846,7 +848,7 @@ Minimum version required to store current data is: `+A+`.
|
|
|
846
848
|
align-items: center;
|
|
847
849
|
gap: 8px;
|
|
848
850
|
}
|
|
849
|
-
`;class
|
|
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`
|
|
850
852
|
background-color: ${e.backgroundColor};
|
|
851
853
|
|
|
852
854
|
display: flex;
|
|
@@ -873,12 +875,5 @@ Minimum version required to store current data is: `+A+`.
|
|
|
873
875
|
align-items: center;
|
|
874
876
|
gap: 8px;
|
|
875
877
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
display: flex;
|
|
879
|
-
align-items: center;
|
|
880
|
-
justify-content: center;
|
|
881
|
-
gap: 8px;
|
|
882
|
-
}
|
|
883
|
-
`;class F4 extends te{constructor(n){super({tag:"div",styles:s=>D4(s)});_(this,"loadingWrapper");_(this,"componentProps");_(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:V.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),Ce.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 Ke.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 z({text:i.message,size:V.getStyles().messages.error.textSize,color:V.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 Sh({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),Ce.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const s=document.createElement("div");s.classList.add("loading-success-callback");const i=new It({size:12,color:V.getStyles().textPrimaryColor}).element,o=new z({text:H.translate("almost_done"),size:12}).element;s.append(i,o),this.element.append(s),setTimeout(()=>{this.componentProps.onSuccess()},5e3)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}jh();const Hc=new WeakMap;function St(e){return Hc.has(e)}function B4(e){let t=e;for(;t;){if(!St(t)&&!po(t))return!1;t=As(t)}return!0}function Ve(e){return Hc.get(e)}function U4(e,t){Hc.set(e,t)}function jc(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:Vt}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const $4=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,V4=/^[A-Za-z]+:|^\/\//,z4=/^data:.*,/i;function H4(e,t){return e.replace($4,(n,r,s,i,o,a)=>{const c=s||o||a;if(!t||!c||V4.test(c)||z4.test(c))return n;const l=r||i||"";return`url(${l}${j4(c,t)}${l})`})}function j4(e,t){try{return ws(e,t).href}catch{return e}}const W4=/[^a-z1-6-_]/;function Eh(e){const t=e.toLowerCase().trim();return W4.test(t)?"div":t}function xh(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},gn={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},st={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},Ih={Play:0,Pause:1};function Th(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 Rh(e,t,n,r){if(t===D.HIDDEN)return null;const s=e.getAttribute(n);if(t===D.MASK&&n!==fo&&!kd.includes(n)&&n!==r.actionNameAttribute){const i=e.tagName;switch(n){case"title":case"alt":case"placeholder":return Vt}if(i==="IMG"&&(n==="src"||n==="srcset")){const o=e;if(o.naturalWidth>0)return xh(o.naturalWidth,o.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?xh(a,c):vd}if(i==="SOURCE"&&(n==="src"||n==="srcset"))return vd;if(i==="A"&&n==="href"||s&&n.startsWith("data-")||i==="IFRAME"&&n==="srcdoc")return Vt}return!s||typeof s!="string"?s:dd(s)?pd(s):s}function q4(e,t,n){if(t===D.HIDDEN)return{};const r={},s=Eh(e.tagName),i=e.ownerDocument;for(let u=0;u<e.attributes.length;u+=1){const p=e.attributes.item(u).name,h=Rh(e,t,p,n.configuration);h!==null&&(r[p]=h)}if(e.value&&(s==="textarea"||s==="select"||s==="option"||s==="input")){const u=jc(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=Wc(u);d&&u&&(r._cssText=d)}if(s==="style"&&e.sheet){const u=Wc(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 Wc(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,a1()?G4:Ah).join("");return H4(n,e.href)}function G4(e){if(Y4(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return Ah(e)}function Ah(e){return K4(e)&&Wc(e.styleSheet)||e.cssText}function K4(e){return"styleSheet"in e}function Y4(e){return"selectorText"in e}function qc(e,t){const n=X4(e,t);if(!n)return null;const r=Ve(e)||J4(),s=n;return s.id=r,U4(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),s}let Z4=1;function J4(){return Z4++}function Gc(e,t){const n=[];return wd(e,r=>{const s=qc(r,t);s&&n.push(s)}),n}function X4(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return Q4(e,t);case e.DOCUMENT_FRAGMENT_NODE:return e_(e,t);case e.DOCUMENT_TYPE_NODE:return t_(e);case e.ELEMENT_NODE:return n_(e,t);case e.TEXT_NODE:return s_(e,t);case e.CDATA_SECTION_NODE:return i_()}}function Q4(e,t){return{type:gn.Document,childNodes:Gc(e,t),adoptedStyleSheets:Th(e.adoptedStyleSheets)}}function e_(e,t){const n=po(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:gn.DocumentFragment,childNodes:Gc(e,t),isShadowRoot:n,adoptedStyleSheets:n?Th(e.adoptedStyleSheets):void 0}}function t_(e){return{type:gn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function n_(e,t){const n=Eh(e.tagName),r=r_(e)||void 0,s=_d(Sd(e),t.parentNodePrivacyLevel);if(s===D.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:gn.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[fo]:Yy},childNodes:[],isSVG:r}}if(s===D.IGNORE)return;const i=q4(e,s,t);let o=[];if(Ky(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===s&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:s,ignoreWhiteSpace:n==="head"},o=Gc(e,a)}return{type:gn.Element,tagName:n,attributes:i,childNodes:o,isSVG:r}}function r_(e){return e.tagName==="svg"||e instanceof SVGElement}function s_(e,t){const n=Ed(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:gn.Text,textContent:n}}function i_(){return{type:gn.CDATA,textContent:""}}function o_(e,t,n){return qc(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function kh(e){return!!e.changedTouches}function Vr(e){return e.composed===!0&&Rs(e.target)?e.composedPath()[0]:e.target}const Oh=25;function a_(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>Oh||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>Oh}const c_=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)a_(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},Ph=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:me()}}const l_=50;function u_(e,t){const{throttled:n,cancel:r}=Ft(i=>{const o=Vr(i);if(St(o)){const a=Lh(i);if(!a)return;const c={id:Ve(o),timeOffset:0,x:a.x,y:a.y};t(pt(kh(i)?st.TouchMove:st.MouseMove,{positions:[c]}))}},l_,{trailing:!1}),{stop:s}=Be(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{s(),r()}}}function Lh(e){let{clientX:t,clientY:n}=kh(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:s}=c_(t,n);t=r,n=s}if(!Number.isFinite(t)||!Number.isFinite(n)){e.isTrusted&&At("mouse/touch event without x/y");return}return{x:t,y:n}}const Nh={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 d_(e,t,n){const r=s=>{const i=Vr(s);if(yt(i,e.defaultPrivacyLevel)===D.HIDDEN||!St(i))return;const o=Ve(i),a=Nh[s.type];let c;if(a!==dt.Blur&&a!==dt.Focus){const u=Lh(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(st.MouseInteraction,c)};t(l)};return Be(e,document,Object.keys(Nh),r,{capture:!0,passive:!0})}const p_=100;function Mh(e,t,n,r=document){const{throttled:s,cancel:i}=Ft(a=>{const c=Vr(a);if(!c||yt(c,e.defaultPrivacyLevel)===D.HIDDEN||!St(c))return;const l=Ve(c),u=c===document?{scrollTop:bo(),scrollLeft:tp()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,u),t(pt(st.Scroll,{id:l,x:u.scrollLeft,y:u.scrollTop}))},p_),{stop:o}=ne(e,r,"scroll",s,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}const f_=200;function h_(e,t){const n=np(e).subscribe(r=>{t(pt(st.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function m_(e,t){const n=window.visualViewport;if(!n)return{stop:G};const{throttled:r,cancel:s}=Ft(()=>{t({data:Ph(n),type:Ct.VisualViewport,timestamp:me()})},f_,{trailing:!1}),{stop:i}=Be(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{i(),s()}}}function g_(e,t){return Be(e,document,["play","pause"],n=>{const r=Vr(n);!r||yt(r,e.defaultPrivacyLevel)===D.HIDDEN||!St(r)||t(pt(st.MediaInteraction,{id:Ve(r),type:n.type==="play"?Ih.Play:Ih.Pause}))},{capture:!0,passive:!0})}function b_(e){function t(s,i){s&&St(s.ownerNode)&&i(Ve(s.ownerNode))}const n=[Fe(CSSStyleSheet.prototype,"insertRule",({target:s,parameters:[i,o]})=>{t(s,a=>e(pt(st.StyleSheetRule,{id:a,adds:[{rule:i,index:o}]})))}),Fe(CSSStyleSheet.prototype,"deleteRule",({target:s,parameters:[i]})=>{t(s,o=>e(pt(st.StyleSheetRule,{id:o,removes:[{index:i}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(s){n.push(Fe(s.prototype,"insertRule",({target:i,parameters:[o,a]})=>{t(i.parentStyleSheet,c=>{const l=Dh(i);l&&(l.push(a||0),e(pt(st.StyleSheetRule,{id:c,adds:[{rule:o,index:l}]})))})}),Fe(s.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i.parentStyleSheet,a=>{const c=Dh(i);c&&(c.push(o),e(pt(st.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(s=>s.stop())}}}function Dh(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 y_(e,t){return Be(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:Ct.Focus,timestamp:me()})})}function w_(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 v_(e,t){const n=e.subscribe(5,()=>{t({timestamp:me(),type:Ct.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function Fh(e,t,n=document){const r=e.defaultPrivacyLevel,s=new WeakMap,i=n!==document,{stop:o}=Be(e,n,i?["change"]:["input","change"],u=>{const d=Vr(u);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(i)a=G;else{const u=[Cr(HTMLInputElement.prototype,"value",c),Cr(HTMLInputElement.prototype,"checked",c),Cr(HTMLSelectElement.prototype,"value",c),Cr(HTMLTextAreaElement.prototype,"value",c),Cr(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{u.forEach(d=>d.stop())}}return{stop:()=>{a(),o()}};function c(u){const d=yt(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=jc(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(!St(u))return;const p=s.get(u);(!p||p.text!==d.text||p.isChecked!==d.isChecked)&&(s.set(u,d),t(pt(st.Input,{id:Ve(u),...d})))}}const __=100,S_=16;function C_(e){let t=G,n=[];function r(){t(),e(n),n=[]}const{throttled:s,cancel:i}=Ft(r,S_,{leading:!1});return{addMutations:o=>{n.length===0&&(t=zu(s,{timeout:__})),n.push(...o)},flush:r,stop:()=>{t(),i()}}}function Bh(e,t,n,r){const s=nd();if(!s)return{stop:G,flush:G};const i=C_(a=>{E_(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 E_(e,t,n,r){const s=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(p=>{Uh(p,r.removeShadowRoot)})});const i=e.filter(d=>d.target.isConnected&&B4(d.target)&&yt(d.target,n.defaultPrivacyLevel,s)!==D.HIDDEN),{adds:o,removes:a,hasBeenSerialized:c}=x_(i.filter(d=>d.type==="childList"),n,r,s),l=I_(i.filter(d=>d.type==="characterData"&&!c(d.target)),n,s),u=T_(i.filter(d=>d.type==="attributes"&&!c(d.target)),n,s);!l.length&&!u.length&&!a.length&&!o.length||t(pt(st.Mutation,{adds:o,removes:a,texts:l,attributes:u}))}function x_(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);R_(o);const a=new Set,c=[];for(const p of o){if(u(p))continue;const h=yt(p.parentNode,t.defaultPrivacyLevel,r);if(h===D.HIDDEN||h===D.IGNORE)continue;const f=qc(p,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!f)continue;const m=As(p);c.push({nextId:d(p),parentId:Ve(m),node:f})}const l=[];return i.forEach((p,h)=>{St(h)&&l.push({parentId:Ve(p),id:Ve(h)})}),{adds:c,removes:l,hasBeenSerialized:u};function u(p){return St(p)&&a.has(Ve(p))}function d(p){let h=p.nextSibling;for(;h;){if(St(h))return Ve(h);h=h.nextSibling}return null}}function I_(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=yt(As(a.target),t.defaultPrivacyLevel,n);l===D.HIDDEN||l===D.IGNORE||s.push({id:Ve(a.target),value:(r=Ed(a.target,!1,l))!==null&&r!==void 0?r:null})}return s}function T_(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=yt(a.target,t.defaultPrivacyLevel,n),u=Rh(a.target,l,a.attributeName,t);let d;if(a.attributeName==="value"){const h=jc(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:Ve(a.target),attributes:{}},r.push(p),o.set(a.target,p)),p.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 Uh(e,t){Rs(e)&&t(e.shadowRoot),wd(e,n=>Uh(n,t))}function A_(){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 k_=(e,t,n)=>{const r=new Map,s={addShadowRoot:i=>{if(r.has(i))return;const o=Bh(t,e,s,i),a=Fh(e,t,i),c=Mh(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 O_(e,t,n,r,s,i){const o=(c=me(),l={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:u,height:d}=Ms(),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:o_(document,r,l),initialOffset:{left:tp(),top:bo()}},type:Ct.FullSnapshot,timestamp:c}];return window.visualViewport&&p.push({data:Ph(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 P_(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function L_(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const s=p=>{t(p),Ki("record",{record:p});const h=e.viewHistory.findView();O5(h.id)},i=A_(),o=k_(n,s,i),{stop:a}=O_(i,o,r,n,c,p=>p.forEach(h=>s(h)));function c(){o.flush(),u.flush()}const l=P_(),u=Bh(s,n,o,document),d=[u,u_(n,s),d_(n,s,l),Mh(n,s,i,document),h_(n,s),Fh(n,s),g_(n,s),b_(s),y_(n,s),m_(n,s),w_(r,s,l),v_(r,p=>{c(),s(p)})];return{stop:()=>{o.stop(),d.forEach(p=>p.stop()),a()},flushMutations:c,shadowRootsController:o}}function N_(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 M_({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:A5(s),source:"browser",...e};k5(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)}
|
|
884
|
-
`),n.finish(l=>{P5(i.view.id,l.rawBytesCount),c(i,l)})}return{addRecord:o,flush:a}}const D_=5*Ie;let $h=6e4;function F_(e,t,n,r,s,i){return B_(e,()=>U_(t.applicationId,n,r),s,i)}function B_(e,t,n,r){let s={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:i}=e.subscribe(2,()=>{a("view_change")}),{unsubscribe:o}=e.subscribe(11,c=>{a(c.reason)});function a(c){s.status===1&&(s.segment.flush((l,u)=>{const d=N_(u.output,l,u.rawBytesCount);Uu(c)?n.sendOnExit(d):n.send(d)}),De(s.expirationTimeoutId)),c!=="stop"?s={status:0,nextSegmentCreationReason:c}:s={status:2}}return{addRecord:c=>{if(s.status!==2){if(s.status===0){const l=t();if(!l)return;s={status:1,segment:M_({encoder:r,context:l,creationReason:s.nextSegmentCreationReason}),expirationTimeoutId:ge(()=>{a("segment_duration_limit")},D_)}}s.segment.addRecord(c,l=>{l>$h&&a("segment_bytes_limit")})}},stop:()=>{a("stop"),i(),o()}}}function U_(e,t,n){const r=t.findTrackedSession(),s=n.findView();if(!(!r||!s))return{application:{id:e},session:{id:r.id},view:{id:s.id}}}function $_(e){const t=Fn();return{addRecord:n=>{const r=e.findView();t.send("record",n,r.id)}}}function V_(e,t,n,r,s,i){const o=[],a=d=>{e.notify(14,{error:d}),At("Error reported to customer",{"error.message":d.message})},c=i||Du(t.sessionReplayEndpointBuilder,$h,a);let l;if(rn())({addRecord:l}=$_(r));else{const d=F_(e,t,n,r,c,s);l=d.addRecord,o.push(d.stop)}const{stop:u}=L_({emit:l,configuration:t,lifeCycle:e,viewHistory:r});return o.push(u),{stop:()=>{o.forEach(d=>d())}}}const z_=Object.freeze(Object.defineProperty({__proto__:null,startRecording:V_},Symbol.toStringTag,{value:"Module"}));function H_(e){let t=0;for(const n of e)n.stackId!==void 0&&t++;return t}const zr=new Map;let Xn=!1;function j_(){Xn=performance.now()}function W_(){Xn=!1,zr.clear()}function q_(e,t){zr.set(t,e)}function Vh(e){if(!(Xn===!1||e.startTime<Xn))return zr.get(e.startTime)}function G_(e){if(!(Xn===!1||e<Xn))for(const t of zr.keys())t<e&&zr.delete(t)}function K_({rawRumEvent:e,startTime:t}){if(e.type!=="long_task")return;const n=e.long_task.id;q_(n,t)}const Y_=(e,t,n,r)=>{const s=Z_(e,t,n,r),i=X_(e,s),o=t.build("fetch",i);return At("Sending profile to public profiling intake",{profilingIntakeURL:o,applicationId:n,sessionId:r}),fetch(o,{body:i.data,method:"POST"})};function Z_(e,t,n,r){const s=t.tags,i=Q_(e,n,r),o=J_(s),a=new Date(e.timeOrigin+e.startTime),c=new Date(e.timeOrigin+e.endTime);return{...i,attachments:["wall-time.json"],start:a.toISOString(),end:c.toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:o.join(",")}}function J_(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function X_(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 Q_(e,t,n){const r={application:{id:t}};n&&(r.session={id:n});const s=Array.from(new Set(e.views.map(o=>o.viewId)));s.length&&(r.view={id:s});const i=e.longTasks.map(o=>Vh(o)).filter(o=>o!==void 0);return i.length&&(r.long_task={id:i}),r}const eS={sendProfile:Y_},zh={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function tS(e,t,n,r=zh){const s=on(Z.LONG_ANIMATION_FRAME);let i;const o=[];let a={state:"stopped"};function c(T){a.state!=="running"&&(i=T?{startTime:T.startClocks.relative,viewId:T.id,viewName:T.name}:void 0,o.push(ne(e,window,"visibilitychange",w).stop,ne(e,window,"beforeunload",C).stop),d())}async function l(){await h("stopped"),W_(),o.forEach(T=>T())}function u(T){if(T.state==="running")return{cleanupTasks:T.cleanupTasks,observer:T.observer};const O=[];let A;if(e.trackLongTasks){A=new PerformanceObserver(y),A.observe({entryTypes:[P()]});const N=t.subscribe(12,M=>{K_(M)});j_(),O.push(()=>A==null?void 0:A.disconnect()),O.push(N.unsubscribe)}const L=t.subscribe(2,N=>{f({viewId:N.id,viewName:N.name,startTime:N.startClocks.relative})});return O.push(L.unsubscribe),{cleanupTasks:O,observer:A}}function d(){const T=gt().Profiler;if(!T)throw new Error("RUM Profiler is not supported in this browser.");p(a).catch(Rt);const{cleanupTasks:O,observer:A}=u(a);let L;try{L=new T({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(N){q.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",N);return}a={state:"running",startTime:performance.now(),profiler:L,timeoutId:ge(d,r.collectIntervalMs),longTasks:[],views:[],cleanupTasks:O,observer:A},f(i),L.addEventListener("samplebufferfull",g)}async function p(T){var O,A;if(T.state!=="running")return;x((A=(O=T.observer)===null||O===void 0?void 0:O.takeRecords())!==null&&A!==void 0?A:[]),De(T.timeoutId),T.profiler.removeEventListener("samplebufferfull",g);const{startTime:L,longTasks:N,views:M}=T,se=performance.now();await T.profiler.stop().then(we=>{const Ye=performance.now(),ot=N.length>0,re=Ye-L<r.minProfileDurationMs,oe=H_(we.samples)<r.minNumberOfSamples;!ot&&(re||oe)||(m(Object.assign(we,{startTime:L,endTime:Ye,timeOrigin:performance.timeOrigin,longTasks:N,views:M,sampleInterval:r.sampleIntervalMs})),G_(se))}).catch(Rt)}async function h(T){a.state==="running"&&(a.cleanupTasks.forEach(O=>O()),await p(a),a={state:T})}function f(T){a.state!=="running"||!T||a.views.push(T)}function m(T){var O;const A=(O=n.findTrackedSession())===null||O===void 0?void 0:O.id;eS.sendProfile(T,e.profilingEndpointBuilder,e.applicationId,A).catch(Rt)}function g(){d()}function y(T){x(T.getEntries())}function x(T){if(a.state==="running")for(const O of T)O.duration<r.sampleIntervalMs||a.longTasks.push({id:Vh(O),duration:O.duration,entryType:O.entryType,startTime:O.startTime})}function w(){document.visibilityState==="hidden"&&a.state==="running"?h("paused").catch(Rt):document.visibilityState==="visible"&&a.state==="paused"&&d()}function C(){d()}function P(){return s?"long-animation-frame":"longtask"}function R(){return a.state==="stopped"}function b(){return a.state==="running"}function k(){return a.state==="paused"}return{start:c,stop:l,isStopped:R,isRunning:b,isPaused:k}}const nS=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:zh,createRumProfiler:tS},Symbol.toStringTag,{value:"Module"}));Ee.AstroPayCardPayment=z3,Ee.AstroPayCore=ct,Ee.AstroPayFullCheckout=M4,Ee.AstroPayPayment=F4,Ee.Core=ct,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
|
|
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(l=>{e3(i.view.id,l.rawBytesCount),c(i,l)})}return{addRecord:o,flush:a}}const KS=5*ke;let Wh=6e4;function YS(e,t,n,r,s,i){return ZS(e,()=>JS(t.applicationId,n,r),s,i)}function ZS(e,t,n,r){let s={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:i}=e.subscribe(2,()=>{a("view_change")}),{unsubscribe:o}=e.subscribe(11,c=>{a(c.reason)});function a(c){s.status===1&&(s.segment.flush((l,u)=>{const d=qS(u.output,l,u.rawBytesCount);Ed(c)?n.sendOnExit(d):n.send(d)}),Ue(s.expirationTimeoutId)),c!=="stop"?s={status:0,nextSegmentCreationReason:c}:s={status:2}}return{addRecord:c=>{if(s.status!==2){if(s.status===0){const l=t();if(!l)return;s={status:1,segment:GS({encoder:r,context:l,creationReason:s.nextSegmentCreationReason}),expirationTimeoutId:we(()=>{a("segment_duration_limit")},KS)}}s.segment.addRecord(c,l=>{l>Wh&&a("segment_bytes_limit")})}},stop:()=>{a("stop"),i(),o()}}}function JS(e,t,n){const r=t.findTrackedSession(),s=n.findView();if(!(!r||!s))return{application:{id:e},session:{id:r.id},view:{id:s.id}}}function XS(e){const t=Vn();return{addRecord:n=>{const r=e.findView();t.send("record",n,r.id)}}}function QS(e,t,n,r,s,i){const o=[],a=d=>{e.notify(14,{error:d}),Rt("Error reported to customer",{"error.message":d.message})},c=i||Sd(t.sessionReplayEndpointBuilder,Wh,a);let l;if(dn())({addRecord:l}=XS(r));else{const d=YS(e,t,n,r,c,s);l=d.addRecord,o.push(d.stop)}const{stop:u}=WS({emit:l,configuration:t,lifeCycle:e,viewHistory:r});return o.push(u),{stop:()=>{o.forEach(d=>d())}}}const e_=Object.freeze(Object.defineProperty({__proto__:null,startRecording:QS},Symbol.toStringTag,{value:"Module"}));function t_(e){let t=0;for(const n of e)n.stackId!==void 0&&t++;return t}const qr=new Map;let tr=!1;function n_(){tr=performance.now()}function r_(){tr=!1,qr.clear()}function s_(e,t){qr.set(t,e)}function qh(e){if(!(tr===!1||e.startTime<tr))return qr.get(e.startTime)}function i_(e){if(!(tr===!1||e<tr))for(const t of qr.keys())t<e&&qr.delete(t)}function o_({rawRumEvent:e,startTime:t}){if(e.type!=="long_task")return;const n=e.long_task.id;s_(n,t)}const a_=(e,t,n,r)=>{const s=c_(e,t,n,r),i=u_(e,s),o=t.build("fetch",i);return Rt("Sending profile to public profiling intake",{profilingIntakeURL:o,applicationId:n,sessionId:r}),fetch(o,{body:i.data,method:"POST"})};function c_(e,t,n,r){const s=t.tags,i=d_(e,n,r),o=l_(s),a=new Date(e.timeOrigin+e.startTime),c=new Date(e.timeOrigin+e.endTime);return{...i,attachments:["wall-time.json"],start:a.toISOString(),end:c.toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:o.join(",")}}function l_(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function u_(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 d_(e,t,n){const r={application:{id:t}};n&&(r.session={id:n});const s=Array.from(new Set(e.views.map(o=>o.viewId)));s.length&&(r.view={id:s});const i=e.longTasks.map(o=>qh(o)).filter(o=>o!==void 0);return i.length&&(r.long_task={id:i}),r}const p_={sendProfile:a_},Gh={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function f_(e,t,n,r=Gh){const s=fn(J.LONG_ANIMATION_FRAME);let i;const o=[];let a={state:"stopped"};function c(T){a.state!=="running"&&(i=T?{startTime:T.startClocks.relative,viewId:T.id,viewName:T.name}:void 0,o.push(oe(e,window,"visibilitychange",w).stop,oe(e,window,"beforeunload",C).stop),d())}async function l(){await h("stopped"),r_(),o.forEach(T=>T())}function u(T){if(T.state==="running")return{cleanupTasks:T.cleanupTasks,observer:T.observer};const R=[];let k;if(e.trackLongTasks){k=new PerformanceObserver(_),k.observe({entryTypes:[N()]});const L=t.subscribe(12,M=>{o_(M)});n_(),R.push(()=>k==null?void 0:k.disconnect()),R.push(L.unsubscribe)}const O=t.subscribe(2,L=>{f({viewId:L.id,viewName:L.name,startTime:L.startClocks.relative})});return R.push(O.unsubscribe),{cleanupTasks:R,observer:k}}function d(){const T=bt().Profiler;if(!T)throw new Error("RUM Profiler is not supported in this browser.");p(a).catch(kt);const{cleanupTasks:R,observer:k}=u(a);let O;try{O=new T({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(L){W.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",L);return}a={state:"running",startTime:performance.now(),profiler:O,timeoutId:we(d,r.collectIntervalMs),longTasks:[],views:[],cleanupTasks:R,observer:k},f(i),O.addEventListener("samplebufferfull",g)}async function p(T){var R,k;if(T.state!=="running")return;x((k=(R=T.observer)===null||R===void 0?void 0:R.takeRecords())!==null&&k!==void 0?k:[]),Ue(T.timeoutId),T.profiler.removeEventListener("samplebufferfull",g);const{startTime:O,longTasks:L,views:M}=T,ie=performance.now();await T.profiler.stop().then(ee=>{const Pe=performance.now(),he=L.length>0,re=Pe-O<r.minProfileDurationMs,ae=t_(ee.samples)<r.minNumberOfSamples;!he&&(re||ae)||(m(Object.assign(ee,{startTime:O,endTime:Pe,timeOrigin:performance.timeOrigin,longTasks:L,views:M,sampleInterval:r.sampleIntervalMs})),i_(ie))}).catch(kt)}async function h(T){a.state==="running"&&(a.cleanupTasks.forEach(R=>R()),await p(a),a={state:T})}function f(T){a.state!=="running"||!T||a.views.push(T)}function m(T){var R;const k=(R=n.findTrackedSession())===null||R===void 0?void 0:R.id;p_.sendProfile(T,e.profilingEndpointBuilder,e.applicationId,k).catch(kt)}function g(){d()}function _(T){x(T.getEntries())}function x(T){if(a.state==="running")for(const R of T)R.duration<r.sampleIntervalMs||a.longTasks.push({id:qh(R),duration:R.duration,entryType:R.entryType,startTime:R.startTime})}function w(){document.visibilityState==="hidden"&&a.state==="running"?h("paused").catch(kt):document.visibilityState==="visible"&&a.state==="paused"&&d()}function C(){d()}function N(){return s?"long-animation-frame":"longtask"}function A(){return a.state==="stopped"}function b(){return a.state==="running"}function P(){return a.state==="paused"}return{start:c,stop:l,isStopped:A,isRunning:b,isPaused:P}}const h_=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:Gh,createRumProfiler:f_},Symbol.toStringTag,{value:"Module"}));Te.AstroPayCardPayment=ev,Te.AstroPayCore=ct,Te.AstroPayFullCheckout=Gv,Te.AstroPayPayment=Yv,Te.Core=ct,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})}));
|